From 43d71c16c3f318521e35553c93fdfb5e87b10218 Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Fri, 23 Sep 2022 16:17:56 -0500 Subject: [PATCH 1/5] Alphabetically sort output from transforms --- src/transform/headers.ts | 4 ++-- src/transform/parameters.ts | 16 +++++++++++----- src/transform/paths.ts | 3 ++- src/transform/request.ts | 3 ++- src/transform/responses.ts | 4 ++-- src/transform/schema.ts | 6 ++---- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/transform/headers.ts b/src/transform/headers.ts index a746d4758..c881b1b2a 100644 --- a/src/transform/headers.ts +++ b/src/transform/headers.ts @@ -12,8 +12,8 @@ export function transformHeaderObjMap( ): string { let output = ""; - for (const k of Object.keys(headerMap)) { - const v = headerMap[k]; + const sortedEntries = Object.entries(headerMap).sort(([a], [b]) => a.localeCompare(b, "en")); + for (const [k, v] of sortedEntries) { if (!v.schema) continue; if (v.description) output += comment(v.description); diff --git a/src/transform/parameters.ts b/src/transform/parameters.ts index 511cb534e..3fdc0c3d3 100644 --- a/src/transform/parameters.ts +++ b/src/transform/parameters.ts @@ -19,11 +19,16 @@ export function transformParametersArray( // sort into map let mappedParams: Record> = {}; - for (const paramObj of parameters as any[]) { - if (paramObj.$ref && globalParameters) { - const paramName = paramObj.$ref.split('["').pop().replace(PARAM_END_RE, ""); // take last segment + for (const paramObj of parameters) { + if ("$ref" in paramObj && paramObj.$ref && globalParameters) { + // take last segment + let paramName = paramObj.$ref.split('["').pop(); + paramName = String(paramName).replace(PARAM_END_RE, ""); + if (globalParameters[paramName]) { - const reference = globalParameters[paramName] as any; + const reference = globalParameters[paramName]; + if (!reference.in) continue; + if (!mappedParams[reference.in]) mappedParams[reference.in] = {}; switch (ctx.version) { case 3: { @@ -36,7 +41,7 @@ export function transformParametersArray( case 2: { mappedParams[reference.in][reference.name || paramName] = { ...reference, - $ref: paramObj.$ref, + ...("$ref" in paramObj ? { $ref: paramObj.$ref } : null), }; break; } @@ -45,6 +50,7 @@ export function transformParametersArray( continue; } + if (!("in" in paramObj)) continue; if (!paramObj.in || !paramObj.name) continue; if (!mappedParams[paramObj.in]) mappedParams[paramObj.in] = {}; mappedParams[paramObj.in][paramObj.name] = paramObj; diff --git a/src/transform/paths.ts b/src/transform/paths.ts index 00a2ce4f9..edd92fd68 100644 --- a/src/transform/paths.ts +++ b/src/transform/paths.ts @@ -33,7 +33,8 @@ export function transformPathsObj(paths: Record, options let output = ""; - for (const [url, pathItem] of Object.entries(paths)) { + const sortedEntries = Object.entries(paths).sort(([a], [b]) => a.localeCompare(b, "en")); + for (const [url, pathItem] of sortedEntries) { if (pathItem.description) output += comment(pathItem.description); // add comment if (pathItem.$ref) { diff --git a/src/transform/request.ts b/src/transform/request.ts index 59f6485bb..b4e5ab967 100644 --- a/src/transform/request.ts +++ b/src/transform/request.ts @@ -5,7 +5,8 @@ import { transformSchemaObj } from "./schema.js"; export function transformRequestBodies(requestBodies: Record, ctx: GlobalContext) { let output = ""; - for (const [name, requestBody] of Object.entries(requestBodies)) { + const sortedEntries = Object.entries(requestBodies).sort(([a], [b]) => a.localeCompare(b, "en")); + for (const [name, requestBody] of sortedEntries) { if (requestBody && requestBody.description) output += ` ${comment(requestBody.description)}`; output += ` "${name}": {\n ${transformRequestBodyObj(requestBody, ctx)}\n }\n`; } diff --git a/src/transform/responses.ts b/src/transform/responses.ts index aabae07cf..b7f8eb1a4 100644 --- a/src/transform/responses.ts +++ b/src/transform/responses.ts @@ -15,9 +15,9 @@ export function transformResponsesObj(responsesObj: Record, ctx: Gl let output = ""; - for (const httpStatusCode of Object.keys(responsesObj)) { + const sortedEntries = Object.entries(responsesObj).sort(([a], [b]) => a.localeCompare(b, "en")); + for (const [httpStatusCode, response] of sortedEntries) { const statusCode = Number(httpStatusCode) || `"${httpStatusCode}"`; // don’t surround w/ quotes if numeric status code - const response = responsesObj[httpStatusCode]; if (response.description) output += comment(response.description); if (response.$ref) { diff --git a/src/transform/schema.ts b/src/transform/schema.ts index a051dca22..5b332e002 100644 --- a/src/transform/schema.ts +++ b/src/transform/schema.ts @@ -4,7 +4,6 @@ import { nodeType, tsArrayOf, tsIntersectionOf, - tsPartial, tsReadonly, tsTupleOf, tsUnionOf, @@ -28,9 +27,8 @@ function hasDefaultValue(node: any): boolean { export function transformSchemaObjMap(obj: Record, options: TransformSchemaObjOptions): string { let output = ""; - for (const k of Object.keys(obj)) { - const v = obj[k]; - + const sortedEntries = Object.entries(obj).sort(([a], [b]) => a.localeCompare(b, "en")); + for (const [k, v] of sortedEntries) { // 1. Add comment in jsdoc notation const comment = prepareComment(v); if (comment) output += comment; From 94dba4662bdaa0daf1cc5e3dc270cda5a37f92cb Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Sat, 24 Sep 2022 15:40:36 -0500 Subject: [PATCH 2/5] Refactor sort into an --alphabetize flag and add test cases --- CONTRIBUTING.md | 2 +- README.md | 1 + bin/cli.js | 3 + src/index.ts | 1 + src/transform/headers.ts | 5 +- src/transform/paths.ts | 5 +- src/transform/request.ts | 5 +- src/transform/responses.ts | 5 +- src/transform/schema.ts | 4 +- src/types.ts | 3 + src/utils.ts | 8 +- .../expected/falsey-example.alphabetized.ts | 38 + test/v2/expected/manifold.alphabetized.ts | 1114 + test/v2/expected/null-in-enum.alphabetized.ts | 44 + test/v2/expected/petstore.alphabetized.ts | 445 + .../reference-to-properties.alphabetized.ts | 36 + test/v2/expected/stripe.alphabetized.ts | 29467 +++++++++++ test/v2/index.test.js | 11 + .../v3/expected/all-of-string.alphabetized.ts | 30 + test/v3/expected/any-of.alphabetized.ts | 33 + test/v3/expected/consts-enums.alphabetized.ts | 35 + .../v3/expected/consts-object.alphabetized.ts | 28 + .../expected/falsey-example.alphabetized.ts | 41 + test/v3/expected/github.alphabetized.ts | 42903 +++++++++++++++ test/v3/expected/jsdoc.alphabetized.ts | 151 + test/v3/expected/jsdoc2.alphabetized.ts | 50 + test/v3/expected/manifold.alphabetized.ts | 1214 + test/v3/expected/null-in-enum.alphabetized.ts | 44 + test/v3/expected/one-of-empty.alphabetized.ts | 30 + .../petstore-openapitools.alphabetized.ts | 521 + test/v3/expected/petstore.alphabetized.ts | 490 + .../reference-to-properties.alphabetized.ts | 35 + test/v3/expected/stripe.alphabetized.ts | 44038 ++++++++++++++++ test/v3/index.test.js | 11 + 34 files changed, 120835 insertions(+), 16 deletions(-) create mode 100644 test/v2/expected/falsey-example.alphabetized.ts create mode 100644 test/v2/expected/manifold.alphabetized.ts create mode 100644 test/v2/expected/null-in-enum.alphabetized.ts create mode 100644 test/v2/expected/petstore.alphabetized.ts create mode 100644 test/v2/expected/reference-to-properties.alphabetized.ts create mode 100644 test/v2/expected/stripe.alphabetized.ts create mode 100644 test/v3/expected/all-of-string.alphabetized.ts create mode 100644 test/v3/expected/any-of.alphabetized.ts create mode 100644 test/v3/expected/consts-enums.alphabetized.ts create mode 100644 test/v3/expected/consts-object.alphabetized.ts create mode 100644 test/v3/expected/falsey-example.alphabetized.ts create mode 100644 test/v3/expected/github.alphabetized.ts create mode 100644 test/v3/expected/jsdoc.alphabetized.ts create mode 100644 test/v3/expected/jsdoc2.alphabetized.ts create mode 100644 test/v3/expected/manifold.alphabetized.ts create mode 100644 test/v3/expected/null-in-enum.alphabetized.ts create mode 100644 test/v3/expected/one-of-empty.alphabetized.ts create mode 100644 test/v3/expected/petstore-openapitools.alphabetized.ts create mode 100644 test/v3/expected/petstore.alphabetized.ts create mode 100644 test/v3/expected/reference-to-properties.alphabetized.ts create mode 100644 test/v3/expected/stripe.alphabetized.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29eff67c0..bc2ed45a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ If you’ve added a feature or fixed a bug and need to update the generated sche # 1. re-build the package npm run build # 2. run the local CLI (not the npm one!) -./bin/cli.js tests/v3/specs/github.yaml -o tests/v3/expected/github.ts +./bin/cli.js test/v3/specs/github.yaml -o test/v3/expected/github.ts # NOTE: on Windows, try running the script on WSL if getting errors ``` diff --git a/README.md b/README.md index 781367976..118c86ff9 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,7 @@ npx openapi-typescript schema.yaml | `--support-array-length` | | `false` | (optional) Generate tuples using array minItems / maxItems | | `--make-paths-enum` | `-pe` | `false` | (optional) Generate an enum of endpoint paths | | `--path-params-as-types` | | `false` | (optional) Substitute path parameter names with their respective types | +| `--alphabetized` | | `false` | (optional) Sort types alphabetically | | `--raw-schema` | | `false` | Generate TS types from partial schema (e.g. having `components.schema` at the top level) | | `--version` | | | Force OpenAPI version with `--version 3` or `--version 2` (required for `--raw-schema` when version is unknown) | diff --git a/bin/cli.js b/bin/cli.js index aecbd6c04..a6f49d882 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -30,6 +30,7 @@ Options --export-type (optional) Export type instead of interface --support-array-length (optional) Generate tuples using array minItems / maxItems --path-params-as-types (optional) Substitute path parameter names with their respective types + --alphabetize (optional) Sort types alphabetically --version (optional) Force schema parsing version `; @@ -55,6 +56,7 @@ const flags = parser(args, { "supportArrayLength", "makePathsEnum", "pathParamsAsTypes", + "alphabetize", ], number: ["version"], string: ["auth", "header", "headersObject", "httpMethod", "prettierConfig"], @@ -110,6 +112,7 @@ async function generateSchema(pathToSpec) { exportType: flags.exportType, supportArrayLength: flags.supportArrayLength, pathParamsAsTypes: flags.pathParamsAsTypes, + alphabetize: flags.alphabetize, }); // output diff --git a/src/index.ts b/src/index.ts index 4b28da7f5..380b8e10d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,6 +46,7 @@ async function openapiTS( contentNever: options.contentNever || false, makePathsEnum: options.makePathsEnum || false, pathParamsAsTypes: options.pathParamsAsTypes, + alphabetize: options.alphabetize || false, rawSchema: options.rawSchema || false, supportArrayLength: options.supportArrayLength, version: options.version || 3, diff --git a/src/transform/headers.ts b/src/transform/headers.ts index c881b1b2a..3e428ada7 100644 --- a/src/transform/headers.ts +++ b/src/transform/headers.ts @@ -1,5 +1,5 @@ import type { GlobalContext, HeaderObject } from "../types.js"; -import { comment, tsReadonly } from "../utils.js"; +import { comment, getEntries, tsReadonly } from "../utils.js"; import { transformSchemaObj } from "./schema.js"; interface TransformHeadersOptions extends GlobalContext { @@ -12,8 +12,7 @@ export function transformHeaderObjMap( ): string { let output = ""; - const sortedEntries = Object.entries(headerMap).sort(([a], [b]) => a.localeCompare(b, "en")); - for (const [k, v] of sortedEntries) { + for (const [k, v] of getEntries(headerMap, options)) { if (!v.schema) continue; if (v.description) output += comment(v.description); diff --git a/src/transform/paths.ts b/src/transform/paths.ts index edd92fd68..557d187a8 100644 --- a/src/transform/paths.ts +++ b/src/transform/paths.ts @@ -1,5 +1,5 @@ import type { GlobalContext, OperationObject, ParameterObject, PathItemObject } from "../types.js"; -import { comment, tsReadonly, nodeType } from "../utils.js"; +import { comment, tsReadonly, nodeType, getEntries } from "../utils.js"; import { transformOperationObj } from "./operation.js"; import { transformParametersArray } from "./parameters.js"; @@ -33,8 +33,7 @@ export function transformPathsObj(paths: Record, options let output = ""; - const sortedEntries = Object.entries(paths).sort(([a], [b]) => a.localeCompare(b, "en")); - for (const [url, pathItem] of sortedEntries) { + for (const [url, pathItem] of getEntries(paths, options)) { if (pathItem.description) output += comment(pathItem.description); // add comment if (pathItem.$ref) { diff --git a/src/transform/request.ts b/src/transform/request.ts index b4e5ab967..eae4ffef8 100644 --- a/src/transform/request.ts +++ b/src/transform/request.ts @@ -1,12 +1,11 @@ import type { GlobalContext, RequestBody } from "../types.js"; -import { comment, tsReadonly } from "../utils.js"; +import { comment, getEntries, tsReadonly } from "../utils.js"; import { transformSchemaObj } from "./schema.js"; export function transformRequestBodies(requestBodies: Record, ctx: GlobalContext) { let output = ""; - const sortedEntries = Object.entries(requestBodies).sort(([a], [b]) => a.localeCompare(b, "en")); - for (const [name, requestBody] of sortedEntries) { + for (const [name, requestBody] of getEntries(requestBodies, ctx)) { if (requestBody && requestBody.description) output += ` ${comment(requestBody.description)}`; output += ` "${name}": {\n ${transformRequestBodyObj(requestBody, ctx)}\n }\n`; } diff --git a/src/transform/responses.ts b/src/transform/responses.ts index b7f8eb1a4..571f1b5b0 100644 --- a/src/transform/responses.ts +++ b/src/transform/responses.ts @@ -1,5 +1,5 @@ import type { GlobalContext } from "../types.js"; -import { comment, tsReadonly } from "../utils.js"; +import { comment, getEntries, tsReadonly } from "../utils.js"; import { transformHeaderObjMap } from "./headers.js"; import { transformSchemaObj } from "./schema.js"; @@ -15,8 +15,7 @@ export function transformResponsesObj(responsesObj: Record, ctx: Gl let output = ""; - const sortedEntries = Object.entries(responsesObj).sort(([a], [b]) => a.localeCompare(b, "en")); - for (const [httpStatusCode, response] of sortedEntries) { + for (const [httpStatusCode, response] of getEntries(responsesObj, ctx)) { const statusCode = Number(httpStatusCode) || `"${httpStatusCode}"`; // don’t surround w/ quotes if numeric status code if (response.description) output += comment(response.description); diff --git a/src/transform/schema.ts b/src/transform/schema.ts index 5b332e002..8542ae7cc 100644 --- a/src/transform/schema.ts +++ b/src/transform/schema.ts @@ -9,6 +9,7 @@ import { tsUnionOf, parseSingleSimpleValue, ParsedSimpleValue, + getEntries, } from "../utils.js"; interface TransformSchemaObjOptions extends GlobalContext { @@ -27,8 +28,7 @@ function hasDefaultValue(node: any): boolean { export function transformSchemaObjMap(obj: Record, options: TransformSchemaObjOptions): string { let output = ""; - const sortedEntries = Object.entries(obj).sort(([a], [b]) => a.localeCompare(b, "en")); - for (const [k, v] of sortedEntries) { + for (const [k, v] of getEntries(obj, options)) { // 1. Add comment in jsdoc notation const comment = prepareComment(v); if (comment) output += comment; diff --git a/src/types.ts b/src/types.ts index 9a6bc1e0e..b54e212c0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -136,6 +136,8 @@ export interface SwaggerToTSOptions { rawSchema?: boolean; /** (optional) Generate an enum containing all API paths. **/ makePathsEnum?: boolean; + /** (optional) Sort types alphabetically. */ + alphabetize?: boolean; /** (optional) Should logging be suppressed? (necessary for STDOUT) */ silent?: boolean; /** (optional) OpenAPI version. Must be present if parsing raw schema */ @@ -186,6 +188,7 @@ export interface GlobalContext { makePathsEnum: boolean; namespace?: string; pathParamsAsTypes?: boolean; + alphabetize?: boolean; rawSchema: boolean; silent?: boolean; supportArrayLength?: boolean; diff --git a/src/utils.ts b/src/utils.ts index 7f64b517e..7215dddf1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import type { OpenAPI2, OpenAPI3, ReferenceObject } from "./types.js"; +import type { GlobalContext, OpenAPI2, OpenAPI3, ReferenceObject } from "./types.js"; type CommentObject = { const?: boolean; // jsdoc without value @@ -285,3 +285,9 @@ export function replaceKeys(obj: Record): Record { return obj; } } + +export function getEntries(obj: ArrayLike | Record, options: GlobalContext) { + const entries = Object.entries(obj); + if (options.alphabetize) entries.sort(([a], [b]) => a.localeCompare(b, "en")); + return entries; +} diff --git a/test/v2/expected/falsey-example.alphabetized.ts b/test/v2/expected/falsey-example.alphabetized.ts new file mode 100644 index 000000000..e38b5ff93 --- /dev/null +++ b/test/v2/expected/falsey-example.alphabetized.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + parameters: { + query: { + search: string + } + } + responses: { + 200: unknown + } + } + } +} + +export interface definitions { + TestSchema: { + /** + * @default 0 + * @example 0 + */ + count?: number + /** + * @default false + * @example false + */ + isEnabled?: boolean + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v2/expected/manifold.alphabetized.ts b/test/v2/expected/manifold.alphabetized.ts new file mode 100644 index 000000000..3780682c3 --- /dev/null +++ b/test/v2/expected/manifold.alphabetized.ts @@ -0,0 +1,1114 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/internal/products': { + get: { + parameters: { + query: { + /** + * Base32 encoded 18 byte identifier of the provider that these + * products must belong to. + */ + provider_id?: string + /** Filter results to only include those that have this label. */ + label?: parameters['LabelFilter'] + /** Return only products matching at least one of the tags. */ + tags?: string[] + /** Return product listings without plan information */ + include_plans?: boolean + } + } + responses: { + /** A product. */ + 200: { + schema: definitions['ExpandedProduct'][] + } + /** Invalid provider_id supplied */ + 400: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/plans/': { + get: { + parameters: { + query: { + /** Return the plans that are associated with this product. */ + product_id: string[] + /** Filter results to only include those that have this label. */ + label?: parameters['LabelFilter'] + } + } + responses: { + /** A list of plans for the given product. */ + 200: { + schema: definitions['ExpandedPlan'][] + } + /** Invalid Parameters Provided */ + 400: { + schema: definitions['Error'] + } + /** Could not find product */ + 404: { + schema: definitions['Error'] + } + /** Unexpected error */ + 500: { + schema: definitions['Error'] + } + } + } + post: { + parameters: { + body: { + /** Plan create request */ + body: definitions['CreatePlan'] + } + } + responses: { + /** Complete plan object */ + 201: { + schema: definitions['Plan'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Forbidden */ + 403: { + schema: definitions['Error'] + } + /** Plan already exists with that label */ + 409: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/plans/{id}': { + get: { + parameters: { + path: { + /** + * ID of the plan to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** A plan. */ + 200: { + schema: definitions['ExpandedPlan'] + } + /** Invalid Plan ID Provided */ + 400: { + schema: definitions['Error'] + } + /** Unknown plan error */ + 404: { + schema: definitions['Error'] + } + /** Unexpected error */ + default: { + schema: definitions['Error'] + } + } + } + patch: { + parameters: { + path: { + /** + * ID of the plan to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + body: { + /** Plan update request */ + body: definitions['UpdatePlan'] + } + } + responses: { + /** Complete product plan */ + 200: { + schema: definitions['Plan'] + } + /** Invalid Plan ID */ + 400: { + schema: definitions['Error'] + } + /** Plan not found error */ + 404: { + schema: definitions['Error'] + } + /** Unexpected error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/products/': { + get: { + parameters: { + query: { + /** + * Base32 encoded 18 byte identifier of the provider that these + * products must belong to. + */ + provider_id?: string + /** Filter results to only include those that have this label. */ + label?: parameters['LabelFilter'] + /** Return only products matching at least one of the tags. */ + tags?: string[] + } + } + responses: { + /** A product. */ + 200: { + schema: definitions['Product'][] + } + /** Invalid provider_id supplied */ + 400: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + post: { + parameters: { + body: { + /** Product create request */ + body: definitions['CreateProduct'] + } + } + responses: { + /** Complete product object */ + 201: { + schema: definitions['Product'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Forbidden */ + 403: { + schema: definitions['Error'] + } + /** Product already exists with that label */ + 409: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/products/{id}': { + get: { + parameters: { + path: { + /** + * ID of the product to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** A product. */ + 200: { + schema: definitions['Product'] + } + /** Invalid Product ID */ + 400: { + schema: definitions['Error'] + } + /** Product not found error */ + 404: { + schema: definitions['Error'] + } + /** Unexpected error */ + 500: { + schema: definitions['Error'] + } + } + } + patch: { + parameters: { + path: { + /** + * ID of the product to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + body: { + /** Product update request */ + body: definitions['UpdateProduct'] + } + } + responses: { + /** Complete product object */ + 200: { + schema: definitions['Product'] + } + /** Invalid Product ID */ + 400: { + schema: definitions['Error'] + } + /** Product not found error */ + 404: { + schema: definitions['Error'] + } + /** Unexpected error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/providers/': { + get: { + parameters: { + query: { + /** Filter results to only include those that have this label. */ + label?: parameters['LabelFilter'] + } + } + responses: { + /** A list of providers. */ + 200: { + schema: definitions['Provider'][] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + post: { + parameters: { + body: { + /** Provider create request */ + body: definitions['CreateProvider'] + } + } + responses: { + /** Complete provider object */ + 201: { + schema: definitions['Provider'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Forbidden */ + 403: { + schema: definitions['Error'] + } + /** Provider already exists with that label */ + 409: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/providers/{id}': { + get: { + parameters: { + path: { + /** ID of the provider to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** A provider. */ + 200: { + schema: definitions['Provider'] + } + /** Unknown provider error */ + 404: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + patch: { + parameters: { + path: { + /** ID of the provider to update, stored as a base32 encoded 18 byte identifier. */ + id: string + } + body: { + /** Provider update request */ + body: definitions['UpdateProvider'] + } + } + responses: { + /** Complete provider object */ + 200: { + schema: definitions['Provider'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Forbidden */ + 403: { + schema: definitions['Error'] + } + /** Provider not found */ + 404: { + schema: definitions['Error'] + } + /** Provider already exists with that label */ + 409: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/regions/': { + get: { + parameters: { + query: { + /** Filter results to only include the regions that have this location. */ + location?: string + /** + * Filter results to only include the regions that are on this + * platform. + */ + platform?: string + } + } + responses: { + /** A list of regions. */ + 200: { + schema: definitions['Region'][] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + post: { + parameters: { + body: { + /** Region create request */ + body: definitions['CreateRegion'] + } + } + responses: { + /** Complete region object */ + 201: { + schema: definitions['Region'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Region already exists for that platform and location */ + 409: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } + '/regions/{id}': { + get: { + parameters: { + path: { + /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** A region. */ + 200: { + schema: definitions['Region'] + } + /** Provided Region ID is Invalid */ + 400: { + schema: definitions['Error'] + } + /** Region could not be found */ + 404: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + patch: { + parameters: { + path: { + /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + body: { + /** Region update request */ + body: definitions['UpdateRegion'] + } + } + responses: { + /** Complete region object */ + 200: { + schema: definitions['Region'] + } + /** Invalid request provided */ + 400: { + schema: definitions['Error'] + } + /** Unexpected Error */ + 500: { + schema: definitions['Error'] + } + } + } + } +} + +export interface definitions { + CreatePlan: { + body: definitions['PlanBody'] + } + CreateProduct: { + body: definitions['ProductBody'] + } + CreateProvider: { + body: definitions['ProviderBody'] + } + CreateRegion: { + body: definitions['RegionBody'] + } + /** @description Unexpected error */ + Error: { + /** @description Explanation of the errors */ + message: string[] + /** @description The error type */ + type: string + } + ExpandedFeature: definitions['FeatureType'] & { + value: definitions['FeatureValueDetails'] + /** @description The string value set for the feature on the plan, this should only be used if the value property is null. */ + value_string: string + } + ExpandedPlan: { + body: definitions['ExpandedPlanBody'] + id: definitions['ID'] + /** @enum {string} */ + type: 'plan' + /** @enum {integer} */ + version: 1 + } + ExpandedPlanBody: definitions['PlanBody'] & { + /** @description A boolean flag that indicates if a plan has customizable features. */ + customizable?: boolean + /** @description Plan cost using its default features plus base cost. */ + defaultCost?: number + /** @description An array of feature definitions for the plan, as defined on the Product. */ + expanded_features: definitions['ExpandedFeature'][] + /** @description A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + free: boolean + } + ExpandedProduct: { + body: definitions['ProductBody'] + id: definitions['ID'] + plans?: definitions['ExpandedPlan'][] + provider: definitions['Provider'] + /** @enum {string} */ + type: 'product' + /** @enum {integer} */ + version: 1 + } + /** + * @description Optional container for additional details relating to numeric features. + * This is required if the feature is measurable and numeric. + */ + FeatureNumericDetails: { + cost_ranges?: definitions['FeatureNumericRange'][] + /** + * @description Sets the increment at which numbers can be selected if customizable, by + * default this is 1; for example, setting this to 8 would only allow integers + * in increments of 8 ( 0, 8, 16, ... ). This property is not used if the + * feature is measurable; except if it is set to 0, setting the increment to 0 + * means this numeric details has no scale, and will not be or customizable. + * Some plans may not have a measureable or customizable feature. + * + * @default 1 + */ + increment?: number + /** @description Maximum value that can be set by a user if customizable */ + max?: number + /** + * @description Minimum value that can be set by a user if customizable + * @default 0 + */ + min?: number + /** @description Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + suffix?: string + } + FeatureNumericRange: { + /** + * @description An integer in 10,000,000ths of cents, will be multiplied by the + * numeric value set in the feature to determine the cost. + * + * @default 0 + */ + cost_multiple?: number + /** + * @description Defines the end of the range ( inclusive ), from the previous, or 0; + * where the cost_multiple starts taking effect. If set to -1 this defines the + * range to infinity, or the maximum integer the system can handle + * ( whichever comes first ). + */ + limit?: number + } + /** + * @description A feature type represents the different aspects of a product that are + * offered, these features can manifest differently depending on the plan. + */ + FeatureType: { + /** + * @description This sets whether or not the feature can be customized by a consumer. + * @default false + */ + customizable?: boolean + /** + * @description This sets whether or not the feature can be downgraded by the consumer after the + * resource has provisioned. Downgrading means setting a lower value or selecting a + * lower element in the list. + * + * @default false + */ + downgradable?: boolean + label: definitions['Label'] + /** + * @description Sets if this feature’s value is trackable from the provider, + * this only really affects numeric constraints. + * + * @default false + */ + measurable?: boolean + name: definitions['Name'] + /** @enum {string} */ + type: 'boolean' | 'string' | 'number' + /** + * @description This sets whether or not the feature can be upgraded by the consumer after the + * resource has provisioned. Upgrading means setting a higher value or selecting a + * higher element in the list. + * + * @default false + */ + upgradable?: boolean + values?: definitions['FeatureValuesList'] + } + FeatureValue: { + feature: definitions['Label'] + value: definitions['FeatureValueLabel'] + } + FeatureValueDetails: { + /** + * @description The cost that will be added to the monthly plan cost when this value + * is selected or is default for the plan. + * Cost is deprecated in favor of the `price.cost` field. + * + * @default 0 + */ + cost?: number + label: definitions['FeatureValueLabel'] + name: definitions['Name'] + numeric_details?: definitions['FeatureNumericDetails'] + /** + * @description Price describes the cost of a feature. It should be preferred over + * the `cost` property. + */ + price?: { + /** + * @description Cost is the price in cents that will be added to plan's base cost + * when this value is selected or is default for the plan. + * Number features should use the cost range instead. + * + * @default 0 + */ + cost?: number + /** @description Description explains how a feature is calculated to the user. */ + description?: string + /** + * @description Price describes how the feature cost should be calculated. + * + * @example { + * "feature_multiplies_base_cost": "(* plan#base_cost feature-a#multiply_factor)", + * "feature_multiplies_feature_cost": "(* feature-b#cost feature-a#multiply_factor)", + * "feature_multiplies_numeric_value": "(* feature-c#number feature-a#multiply_factor)", + * "feature_multiplies_total_cost": "(* plan#total_cost feature-a#multiply_factor)", + * "feature_nested_formulas": "(+ (- (* feature-a#cost feature-b#multiply_factor) 500) plan#partial_cost)" + * } + */ + formula?: definitions['PriceFormula'] + /** + * @description When a feature is used to multiply the cost of the plan or of + * another feature, multiply factor is used for calculation. + * A feature cannot have both a cost and a multiply factor. + * + * @default 0 + */ + multiply_factor?: number + } + } + /** @description A machine readable unique label, which is url safe. */ + FeatureValueLabel: string + /** + * @description A list of allowable values for the feature. + * To define values for a boolean feature type, only `true` is required, + * using the label `true`, name and numeric_details will be ignored. + * If the feature is set measurable it is expected that these all have a + * `numeric_details` definition, and the plan will determine which + * `numeric_details` set is used based on it's setting. + */ + FeatureValuesList: definitions['FeatureValueDetails'][] + /** @description A flexible identifier for internal or external entities. */ + FlexID: string + /** + * Format: base32ID + * @description A base32 encoded 18 byte identifier. + */ + ID: string + /** @description A machine readable unique label, which is url safe. */ + Label: string + /** @description A location of where a potential resource can be provisioned. */ + Location: string + /** + * Format: url + * @description Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + LogoURL: string + /** @description A name of an entity which is displayed to a human. */ + Name: string + /** @description A flexible identifier for internal or external entities. */ + OptionalFlexID: string + /** + * Format: base32ID + * @description A base32 encoded 18 byte identifier. + */ + OptionalID: string + /** @description A machine readable unique label, which is url safe. */ + OptionalLabel: string + /** + * Format: url + * @description Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + OptionalLogoURL: string + /** @description A name of an entity which is displayed to a human. */ + OptionalName: string + Plan: { + body: definitions['PlanBody'] + id: definitions['ID'] + /** @enum {string} */ + type: 'plan' + /** @enum {integer} */ + version: 1 + } + PlanBody: { + /** @description Dollar value in cents. */ + cost: number + /** @description Array of Feature Values */ + features: definitions['FeatureValue'][] + label: definitions['Label'] + name: definitions['Name'] + product_id: definitions['ID'] + provider_id: definitions['ID'] + /** @description Array of Region IDs */ + regions: definitions['ID'][] + resizable_to?: definitions['PlanResizeList'] + state: definitions['PlanState'] + /** + * @description The number of days a user gets as a free trial when subscribing to + * this plan. Trials are valid only once per product; changing plans + * or adding an additional subscription will not start a new trial. + */ + trial_days?: number + } + /** @description Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ + PlanResizeList: definitions['ID'][] + /** @enum {string} */ + PlanState: 'hidden' | 'available' | 'grandfathered' | 'unlisted' + /** @description A name of a platform which is used to provision resources. */ + Platform: string + /** + * @description Describes how a feature cost should be calculated. An empty + * string defaults to the normal price calculation using the value cost. + * Formula uses Reverse Polish notation for statements. It supports + * addition, subtraction and multiplication operations. Operations must be + * grouped with parenthesis. + * Number literals can be used for formulas. Eg: "(- feature-a#cost 500)" + * will remove 5 dollars from the cost of feature a. + * Multiplication operation supports either a cost multiplied by a + * factor or a number multiplied by a factor. + * In a plan formula the following keywords are available: + * - `plan#base_cost` is the base cost of a plan in cents + * - `plan#partial_cost` is the base cost plus its feature costs calculated + * so far. Feature formulas are calculated in the order they are defined, + * so features can refer to another feature values or the partial_cost of + * the plan. + * - `this-feature-label#multiply_factor` is the multiply_factor of this + * feature as a float number. + * - `another-feature-label#cost` is the cost of a feature matching the label + * in cents. + * - `another-feature-label#number` is the numeric value of a number feature + * In a feature formula, plan base cost and total cost cannot be used + */ + PriceFormula: string + Product: { + body: definitions['ProductBody'] + id: definitions['ID'] + /** @enum {string} */ + type: 'product' + /** @enum {integer} */ + version: 1 + } + ProductBody: { + billing: { + /** @enum {string} */ + currency: 'usd' + /** @enum {string} */ + type: 'monthly-prorated' | 'monthly-anniversary' | 'annual-anniversary' + } + /** Format: url */ + documentation_url: string + feature_types: definitions['FeatureType'][] + images: definitions['ProductImageURL'][] + integration: { + /** Format: url */ + base_url: string + features: definitions['ProductIntegrationFeatures'] + provisioning: definitions['ProductProvisioning'] + /** Format: url */ + sso_url?: string + /** @enum {string} */ + version: 'v1' + } + /** @description Product labels are globally unique and contain the provider name. */ + label: definitions['Label'] + listing: definitions['ProductListing'] + logo_url: definitions['LogoURL'] + name: definitions['Name'] + provider_id: definitions['ID'] + /** @description A list of getting started steps for the product */ + setup_steps?: string[] + state: definitions['ProductState'] + /** Format: email */ + support_email: string + /** @description 140 character sentence positioning the product. */ + tagline: string + tags?: definitions['ProductTags'] + /** + * @description URL to this Product's Terms of Service. If provided is true, then + * a url must be set. Otherwise, provided is false. + */ + terms: { + provided: boolean + /** Format: url */ + url?: string + } + /** @description A list of value propositions of the product. */ + value_props: definitions['ValueProp'][] + } + /** + * Format: url + * @description Image URL used for Product listings. + * + * Minimum 660px wide, 400px high. + */ + ProductImageURL: string + /** @default {} */ + ProductIntegrationFeatures: { + /** + * @description Indicates whether or not this product supports resource transitions to + * manifold by access_code. + */ + access_code?: boolean + /** + * @description Describes the credential type that is supported by this product. + * + * * `none`: The product does not support providing any credentials + * * `single`: Only one credential is supported at the same time. + * * `multiple`: Multiple credentials are supported at the same time. + * * `unknown`: The credential type is unknown. + * + * @default multiple + * @enum {string} + */ + credential?: 'none' | 'single' | 'multiple' | 'unknown' + /** + * @description Represents whether or not this product supports changing + * the plan of a resource. + */ + plan_change?: boolean + /** + * @description Describes how the region for a resource is specified, if + * unspecified, then regions have no impact on this + * resource. + * + * @enum {string} + */ + region?: 'user-specified' | 'unspecified' + /** + * @description Represents whether or not this product supports Single + * Sign On + */ + sso?: boolean + } + /** @default {} */ + ProductListing: { + /** + * @description When true, the product will be displayed in product listings alongside + * other products. When false the product will be excluded from listings, + * but can still be provisioned directly if it's label is known. + * Any pages that display information about the product when not listed, + * should indicate to webcrawlers that the content should not be indexed. + * + * @default false + */ + listed?: boolean + /** + * @description Object to hold various flags for marketing purposes only. These are values + * that need to be stored, but should not affect decision making in code. If + * we find ourselves in a position where we think they should, we should + * consider refactoring our listing definition. + * + * @default {} + */ + marketing?: { + /** + * @description Indicates whether or not the product is in `Beta` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + beta?: boolean + /** + * @description Indicates whether or not the product is in `New` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + featured?: boolean + /** + * @description Indicates whether or not the product is in `New` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + new?: boolean + } + /** + * @description When true, everyone can see the product when requested. When false it will + * not be visible to anyone except those on the provider team. + * + * @default false + */ + public?: boolean + } + /** + * @description Provider Only, implies that the product should only be provisionable by the + * provider; so members of the provider team, no one else should be allowed. + * Pre-Order, should not be used yet. But in the future it should allow people to + * pre-provision a resource for when it does go live. + * Public, means the resource is live and everyone should be able to provision it. + * + * @enum {string} + */ + ProductProvisioning: 'provider-only' | 'pre-order' | 'public' + /** @enum {string} */ + ProductState: 'available' | 'hidden' | 'grandfathered' | 'new' | 'upcoming' + /** @description List of tags for product categorization and search */ + ProductTags: definitions['Label'][] + Provider: { + body: definitions['ProviderBody'] + id: definitions['ID'] + /** @enum {string} */ + type: 'provider' + /** @enum {integer} */ + version: 1 + } + ProviderBody: { + /** Format: url */ + documentation_url?: string + label: definitions['Label'] + logo_url?: definitions['LogoURL'] + name: definitions['Name'] + owner_id?: definitions['OptionalFlexID'] + /** Format: email */ + support_email?: string + team_id?: definitions['OptionalID'] + } + Region: { + body: definitions['RegionBody'] + id: definitions['ID'] + /** @enum {string} */ + type: 'region' + /** @enum {integer} */ + version: 1 + } + RegionBody: { + location: definitions['Location'] + name: string + platform: definitions['Platform'] + priority: number + } + UpdatePlan: { + body: definitions['UpdatePlanBody'] + id: definitions['ID'] + } + UpdatePlanBody: { + /** @description Dollar value in cents */ + cost?: number + /** @description Array of Feature Values */ + features?: definitions['FeatureValue'][] + /** @description Used in conjuction with resizable_to to set or unset the list */ + has_resize_constraints?: boolean + label?: definitions['Label'] + name?: definitions['Name'] + /** @description Array of Region IDs */ + regions?: definitions['ID'][] + resizable_to?: definitions['PlanResizeList'] + state?: definitions['PlanState'] + /** + * @description The number of days a user gets as a free trial when subscribing to + * this plan. Trials are valid only once per product; changing plans + * or adding an additional subscription will not start a new trial. + */ + trial_days?: number + } + UpdateProduct: { + body: definitions['UpdateProductBody'] + id: definitions['ID'] + } + UpdateProductBody: { + /** Format: url */ + documentation_url?: string + feature_types?: definitions['FeatureType'][] + images?: definitions['ProductImageURL'][] + integration?: { + /** Format: url */ + base_url?: string + /** @default {} */ + features?: { + access_code?: boolean + /** + * @default multiple + * @enum {string} + */ + credential?: 'none' | 'single' | 'multiple' | 'unknown' + plan_change?: boolean + sso?: boolean + } + provisioning?: definitions['ProductProvisioning'] + /** Format: url */ + sso_url?: string + /** @enum {string} */ + version?: 'v1' + } + label?: definitions['Label'] + listing?: definitions['ProductListing'] + logo_url?: definitions['LogoURL'] + name?: definitions['Name'] + /** @description An array of platform ids to restrict this product for. */ + platform_ids?: definitions['ID'][] + /** @description A list of getting started steps for the product */ + setup_steps?: string[] + /** Format: email */ + support_email?: string + /** @description 140 character sentence positioning the product. */ + tagline?: string + tags?: definitions['ProductTags'] + /** + * @description URL to this Product's Terms of Service. If provided is true, then + * a url must be set. Otherwise, provided is false. + */ + terms_url?: string + /** @description A list of value propositions of the product. */ + value_props?: definitions['ValueProp'][] + } + UpdateProvider: { + body: definitions['UpdateProviderBody'] + id: definitions['ID'] + } + UpdateProviderBody: { + /** Format: url */ + documentation_url?: string + label?: definitions['OptionalLabel'] + logo_url?: definitions['OptionalLogoURL'] + name?: definitions['OptionalName'] + owner_id?: definitions['OptionalFlexID'] + /** Format: email */ + support_email?: string + team_id?: definitions['OptionalID'] + } + UpdateRegion: { + name: string + } + ValueProp: { + /** @description Body of a value proposition. */ + body: string + /** @description Heading of a value proposition. */ + header: string + } +} + +export interface parameters { + /** + * Format: label + * @description Filter results to only include those that have this label. + */ + LabelFilter: string +} + +export interface operations {} + +export interface external {} diff --git a/test/v2/expected/null-in-enum.alphabetized.ts b/test/v2/expected/null-in-enum.alphabetized.ts new file mode 100644 index 000000000..dca956c09 --- /dev/null +++ b/test/v2/expected/null-in-enum.alphabetized.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + post: operations['addTest'] + } +} + +export interface definitions { + /** @description Enum with null and nullable */ + MyType: { + /** @enum {string|null} */ + myField?: ('foo' | 'bar' | null) | null + } + /** @description Enum with null */ + MyTypeMixed: { + /** @enum {string} */ + myField?: 'foo' | 2 | false | null + } + /** @description Enum with null */ + MyTypeNotNullable: { + /** @enum {string} */ + myField?: 'foo' | 'bar' | null + } + /** @description Enum with null */ + MyTypeNotNullableNotNull: { + /** @enum {string} */ + myField?: 'foo' | 'bar' + } +} + +export interface operations { + addTest: { + responses: { + /** OK */ + 200: unknown + } + } +} + +export interface external {} diff --git a/test/v2/expected/petstore.alphabetized.ts b/test/v2/expected/petstore.alphabetized.ts new file mode 100644 index 000000000..7e4348cfb --- /dev/null +++ b/test/v2/expected/petstore.alphabetized.ts @@ -0,0 +1,445 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/pet': { + put: operations['updatePet'] + post: operations['addPet'] + } + '/pet/{petId}': { + /** Returns a single pet */ + get: operations['getPetById'] + post: operations['updatePetWithForm'] + delete: operations['deletePet'] + } + '/pet/{petId}/uploadImage': { + post: operations['uploadFile'] + } + '/pet/findByStatus': { + /** Multiple status values can be provided with comma separated strings */ + get: operations['findPetsByStatus'] + } + '/pet/findByTags': { + /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + get: operations['findPetsByTags'] + } + '/store/inventory': { + /** Returns a map of status codes to quantities */ + get: operations['getInventory'] + } + '/store/order': { + post: operations['placeOrder'] + } + '/store/order/{orderId}': { + /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + get: operations['getOrderById'] + /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + delete: operations['deleteOrder'] + } + '/user': { + /** This can only be done by the logged in user. */ + post: operations['createUser'] + } + '/user/{username}': { + get: operations['getUserByName'] + /** This can only be done by the logged in user. */ + put: operations['updateUser'] + /** This can only be done by the logged in user. */ + delete: operations['deleteUser'] + } + '/user/createWithArray': { + post: operations['createUsersWithArrayInput'] + } + '/user/createWithList': { + post: operations['createUsersWithListInput'] + } + '/user/login': { + get: operations['loginUser'] + } + '/user/logout': { + get: operations['logoutUser'] + } +} + +export interface definitions { + ApiResponse: { + /** Format: int32 */ + code?: number + message?: string + type?: string + } + Category: { + /** Format: int64 */ + id?: number + name?: string + } + Order: { + /** @default false */ + complete?: boolean + /** Format: int64 */ + id?: number + /** Format: int64 */ + petId?: number + /** Format: int32 */ + quantity?: number + /** Format: date-time */ + shipDate?: string + /** + * @description Order Status + * @enum {string} + */ + status?: 'placed' | 'approved' | 'delivered' + } + Pet: { + category?: definitions['Category'] + /** Format: int64 */ + id?: number + /** @example doggie */ + name: string + photoUrls: string[] + /** + * @description pet status in the store + * @enum {string} + */ + status?: 'available' | 'pending' | 'sold' + tags?: definitions['Tag'][] + } + Tag: { + /** Format: int64 */ + id?: number + name?: string + } + User: { + email?: string + firstName?: string + /** Format: int64 */ + id?: number + lastName?: string + password?: string + phone?: string + username?: string + /** + * Format: int32 + * @description User Status + */ + userStatus?: number + } +} + +export interface operations { + updatePet: { + parameters: { + body: { + /** Pet object that needs to be added to the store */ + body: definitions['Pet'] + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + /** Validation exception */ + 405: unknown + } + } + addPet: { + parameters: { + body: { + /** Pet object that needs to be added to the store */ + body: definitions['Pet'] + } + } + responses: { + /** Invalid input */ + 405: unknown + } + } + /** Returns a single pet */ + getPetById: { + parameters: { + path: { + /** ID of pet to return */ + petId: number + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['Pet'] + } + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + } + } + updatePetWithForm: { + parameters: { + path: { + /** ID of pet that needs to be updated */ + petId: number + } + formData: { + /** Updated name of the pet */ + name?: string + /** Updated status of the pet */ + status?: string + } + } + responses: { + /** Invalid input */ + 405: unknown + } + } + deletePet: { + parameters: { + header: { + api_key?: string + } + path: { + /** Pet id to delete */ + petId: number + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + } + } + uploadFile: { + parameters: { + path: { + /** ID of pet to update */ + petId: number + } + formData: { + /** Additional data to pass to server */ + additionalMetadata?: string + /** file to upload */ + file?: unknown + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['ApiResponse'] + } + } + } + /** Multiple status values can be provided with comma separated strings */ + findPetsByStatus: { + parameters: { + query: { + /** Status values that need to be considered for filter */ + status: ('available' | 'pending' | 'sold')[] + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['Pet'][] + } + /** Invalid status value */ + 400: unknown + } + } + /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + findPetsByTags: { + parameters: { + query: { + /** Tags to filter by */ + tags: string[] + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['Pet'][] + } + /** Invalid tag value */ + 400: unknown + } + } + /** Returns a map of status codes to quantities */ + getInventory: { + parameters: {} + responses: { + /** successful operation */ + 200: { + schema: { [key: string]: number } + } + } + } + placeOrder: { + parameters: { + body: { + /** order placed for purchasing the pet */ + body: definitions['Order'] + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['Order'] + } + /** Invalid Order */ + 400: unknown + } + } + /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + getOrderById: { + parameters: { + path: { + /** ID of pet that needs to be fetched */ + orderId: number + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['Order'] + } + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + deleteOrder: { + parameters: { + path: { + /** ID of the order that needs to be deleted */ + orderId: number + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + createUser: { + parameters: { + body: { + /** Created user object */ + body: definitions['User'] + } + } + responses: { + /** successful operation */ + default: unknown + } + } + getUserByName: { + parameters: { + path: { + /** The name that needs to be fetched. Use user1 for testing. */ + username: string + } + } + responses: { + /** successful operation */ + 200: { + schema: definitions['User'] + } + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + updateUser: { + parameters: { + path: { + /** name that need to be updated */ + username: string + } + body: { + /** Updated user object */ + body: definitions['User'] + } + } + responses: { + /** Invalid user supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + deleteUser: { + parameters: { + path: { + /** The name that needs to be deleted */ + username: string + } + } + responses: { + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + createUsersWithArrayInput: { + parameters: { + body: { + /** List of user object */ + body: definitions['User'][] + } + } + responses: { + /** successful operation */ + default: unknown + } + } + createUsersWithListInput: { + parameters: { + body: { + /** List of user object */ + body: definitions['User'][] + } + } + responses: { + /** successful operation */ + default: unknown + } + } + loginUser: { + parameters: { + query: { + /** The user name for login */ + username: string + /** The password for login in clear text */ + password: string + } + } + responses: { + /** successful operation */ + 200: { + headers: {} + schema: string + } + /** Invalid username/password supplied */ + 400: unknown + } + } + logoutUser: { + parameters: {} + responses: { + /** successful operation */ + default: unknown + } + } +} + +export interface external {} diff --git a/test/v2/expected/reference-to-properties.alphabetized.ts b/test/v2/expected/reference-to-properties.alphabetized.ts new file mode 100644 index 000000000..050d2b3c7 --- /dev/null +++ b/test/v2/expected/reference-to-properties.alphabetized.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/pet': { + post: operations['addPet'] + } +} + +export interface definitions { + Pet: { + /** Format: int64 */ + id?: number + /** @example doggie */ + name: string + } +} + +export interface operations { + addPet: { + parameters: { + body: { + body: { + name?: definitions['Pet']['name'] + } + } + } + responses: { + 200: unknown + } + } +} + +export interface external {} diff --git a/test/v2/expected/stripe.alphabetized.ts b/test/v2/expected/stripe.alphabetized.ts new file mode 100644 index 000000000..a9197b8d4 --- /dev/null +++ b/test/v2/expected/stripe.alphabetized.ts @@ -0,0 +1,29467 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/v1/3d_secure': { + /**

Initiate 3D Secure authentication.

*/ + post: operations['Post3dSecure'] + } + '/v1/3d_secure/{three_d_secure}': { + /**

Retrieves a 3D Secure object.

*/ + get: operations['Get3dSecureThreeDSecure'] + } + '/v1/account': { + /**

Retrieves the details of an account.

*/ + get: operations['GetAccount'] + /** + *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + post: operations['PostAccount'] + /** + *

With Connect, you can delete Custom or Express accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + delete: operations['DeleteAccount'] + } + '/v1/account_links': { + /**

Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect their user to in order to take them through the Connect Onboarding flow.

*/ + post: operations['PostAccountLinks'] + } + '/v1/account/bank_accounts': { + /**

Create an external account for a given account.

*/ + post: operations['PostAccountBankAccounts'] + } + '/v1/account/bank_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountBankAccountsId'] + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountBankAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountBankAccountsId'] + } + '/v1/account/capabilities': { + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + get: operations['GetAccountCapabilities'] + } + '/v1/account/capabilities/{capability}': { + /**

Retrieves information about the specified Account Capability.

*/ + get: operations['GetAccountCapabilitiesCapability'] + /**

Updates an existing Account Capability.

*/ + post: operations['PostAccountCapabilitiesCapability'] + } + '/v1/account/external_accounts': { + /**

List external accounts for an account.

*/ + get: operations['GetAccountExternalAccounts'] + /**

Create an external account for a given account.

*/ + post: operations['PostAccountExternalAccounts'] + } + '/v1/account/external_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountExternalAccountsId'] + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountExternalAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountExternalAccountsId'] + } + '/v1/account/login_links': { + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + post: operations['PostAccountLoginLinks'] + } + '/v1/account/logout': { + /** + *

Invalidates all sessions for a light account, for a platform to use during platform logout.

+ * + *

You may only log out Express accounts connected to your platform.

+ */ + put: operations['PutAccountLogout'] + } + '/v1/account/people': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountPeople'] + /**

Creates a new person.

*/ + post: operations['PostAccountPeople'] + } + '/v1/account/people/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountPeoplePerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountPeoplePerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountPeoplePerson'] + } + '/v1/account/persons': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountPersons'] + /**

Creates a new person.

*/ + post: operations['PostAccountPersons'] + } + '/v1/account/persons/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountPersonsPerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountPersonsPerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountPersonsPerson'] + } + '/v1/accounts': { + /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ + get: operations['GetAccounts'] + /** + *

With Connect, you can create Stripe accounts for your users. + * To do this, you’ll first need to register your platform.

+ * + *

For Standard accounts, parameters other than country, email, and type + * are used to prefill the account application that we ask the account holder to complete.

+ */ + post: operations['PostAccounts'] + } + '/v1/accounts/{account}': { + /**

Retrieves the details of an account.

*/ + get: operations['GetAccountsAccount'] + /** + *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + post: operations['PostAccountsAccount'] + /** + *

With Connect, you can delete Custom or Express accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + delete: operations['DeleteAccountsAccount'] + } + '/v1/accounts/{account}/bank_accounts': { + /**

Create an external account for a given account.

*/ + post: operations['PostAccountsAccountBankAccounts'] + } + '/v1/accounts/{account}/bank_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountsAccountBankAccountsId'] + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountsAccountBankAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountsAccountBankAccountsId'] + } + '/v1/accounts/{account}/capabilities': { + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + get: operations['GetAccountsAccountCapabilities'] + } + '/v1/accounts/{account}/capabilities/{capability}': { + /**

Retrieves information about the specified Account Capability.

*/ + get: operations['GetAccountsAccountCapabilitiesCapability'] + /**

Updates an existing Account Capability.

*/ + post: operations['PostAccountsAccountCapabilitiesCapability'] + } + '/v1/accounts/{account}/external_accounts': { + /**

List external accounts for an account.

*/ + get: operations['GetAccountsAccountExternalAccounts'] + /**

Create an external account for a given account.

*/ + post: operations['PostAccountsAccountExternalAccounts'] + } + '/v1/accounts/{account}/external_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountsAccountExternalAccountsId'] + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountsAccountExternalAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountsAccountExternalAccountsId'] + } + '/v1/accounts/{account}/login_links': { + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + post: operations['PostAccountsAccountLoginLinks'] + } + '/v1/accounts/{account}/logout': { + /** + *

Invalidates all sessions for a light account, for a platform to use during platform logout.

+ * + *

You may only log out Express accounts connected to your platform.

+ */ + put: operations['PutAccountsAccountLogout'] + } + '/v1/accounts/{account}/people': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountsAccountPeople'] + /**

Creates a new person.

*/ + post: operations['PostAccountsAccountPeople'] + } + '/v1/accounts/{account}/people/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountsAccountPeoplePerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountsAccountPeoplePerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountsAccountPeoplePerson'] + } + '/v1/accounts/{account}/persons': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountsAccountPersons'] + /**

Creates a new person.

*/ + post: operations['PostAccountsAccountPersons'] + } + '/v1/accounts/{account}/persons/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountsAccountPersonsPerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountsAccountPersonsPerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountsAccountPersonsPerson'] + } + '/v1/accounts/{account}/reject': { + /** + *

With Connect, you may flag accounts as suspicious.

+ * + *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

+ */ + post: operations['PostAccountsAccountReject'] + } + '/v1/apple_pay/domains': { + /**

List apple pay domains.

*/ + get: operations['GetApplePayDomains'] + /**

Create an apple pay domain.

*/ + post: operations['PostApplePayDomains'] + } + '/v1/apple_pay/domains/{domain}': { + /**

Retrieve an apple pay domain.

*/ + get: operations['GetApplePayDomainsDomain'] + /**

Delete an apple pay domain.

*/ + delete: operations['DeleteApplePayDomainsDomain'] + } + '/v1/application_fees': { + /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ + get: operations['GetApplicationFees'] + } + '/v1/application_fees/{fee}/refunds/{id}': { + /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ + get: operations['GetApplicationFeesFeeRefundsId'] + /** + *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + post: operations['PostApplicationFeesFeeRefundsId'] + } + '/v1/application_fees/{id}': { + /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ + get: operations['GetApplicationFeesId'] + } + '/v1/application_fees/{id}/refund': { + post: operations['PostApplicationFeesIdRefund'] + } + '/v1/application_fees/{id}/refunds': { + /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + get: operations['GetApplicationFeesIdRefunds'] + /** + *

Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected.

+ * + *

You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded.

+ * + *

Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee.

+ */ + post: operations['PostApplicationFeesIdRefunds'] + } + '/v1/balance': { + /** + *

Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see Accounting for negative balances.

+ */ + get: operations['GetBalance'] + } + '/v1/balance_transactions': { + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + get: operations['GetBalanceTransactions'] + } + '/v1/balance_transactions/{id}': { + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + get: operations['GetBalanceTransactionsId'] + } + '/v1/balance/history': { + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + get: operations['GetBalanceHistory'] + } + '/v1/balance/history/{id}': { + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + get: operations['GetBalanceHistoryId'] + } + '/v1/billing_portal/sessions': { + /**

Creates a session of the self-serve Portal.

*/ + post: operations['PostBillingPortalSessions'] + } + '/v1/bitcoin/receivers': { + /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ + get: operations['GetBitcoinReceivers'] + } + '/v1/bitcoin/receivers/{id}': { + /**

Retrieves the Bitcoin receiver with the given ID.

*/ + get: operations['GetBitcoinReceiversId'] + } + '/v1/bitcoin/receivers/{receiver}/transactions': { + /**

List bitcoin transacitons for a given receiver.

*/ + get: operations['GetBitcoinReceiversReceiverTransactions'] + } + '/v1/bitcoin/transactions': { + /**

List bitcoin transacitons for a given receiver.

*/ + get: operations['GetBitcoinTransactions'] + } + '/v1/charges': { + /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ + get: operations['GetCharges'] + /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ + post: operations['PostCharges'] + } + '/v1/charges/{charge}': { + /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ + get: operations['GetChargesCharge'] + /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostChargesCharge'] + } + '/v1/charges/{charge}/capture': { + /** + *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

+ * + *

Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

+ */ + post: operations['PostChargesChargeCapture'] + } + '/v1/charges/{charge}/dispute': { + /**

Retrieve a dispute for a specified charge.

*/ + get: operations['GetChargesChargeDispute'] + post: operations['PostChargesChargeDispute'] + } + '/v1/charges/{charge}/dispute/close': { + post: operations['PostChargesChargeDisputeClose'] + } + '/v1/charges/{charge}/refund': { + /** + *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

+ * + *

Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged.

+ * + *

You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded.

+ * + *

Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge.

+ */ + post: operations['PostChargesChargeRefund'] + } + '/v1/charges/{charge}/refunds': { + /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + get: operations['GetChargesChargeRefunds'] + /**

Create a refund.

*/ + post: operations['PostChargesChargeRefunds'] + } + '/v1/charges/{charge}/refunds/{refund}': { + /**

Retrieves the details of an existing refund.

*/ + get: operations['GetChargesChargeRefundsRefund'] + /**

Update a specified refund.

*/ + post: operations['PostChargesChargeRefundsRefund'] + } + '/v1/checkout/sessions': { + /**

Returns a list of Checkout Sessions.

*/ + get: operations['GetCheckoutSessions'] + /**

Creates a Session object.

*/ + post: operations['PostCheckoutSessions'] + } + '/v1/checkout/sessions/{session}': { + /**

Retrieves a Session object.

*/ + get: operations['GetCheckoutSessionsSession'] + } + '/v1/country_specs': { + /**

Lists all Country Spec objects available in the API.

*/ + get: operations['GetCountrySpecs'] + } + '/v1/country_specs/{country}': { + /**

Returns a Country Spec for a given Country code.

*/ + get: operations['GetCountrySpecsCountry'] + } + '/v1/coupons': { + /**

Returns a list of your coupons.

*/ + get: operations['GetCoupons'] + /** + *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

+ * + *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

+ */ + post: operations['PostCoupons'] + } + '/v1/coupons/{coupon}': { + /**

Retrieves the coupon with the given ID.

*/ + get: operations['GetCouponsCoupon'] + /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ + post: operations['PostCouponsCoupon'] + /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ + delete: operations['DeleteCouponsCoupon'] + } + '/v1/credit_notes': { + /**

Returns a list of credit notes.

*/ + get: operations['GetCreditNotes'] + /** + *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + * in any combination of the following:

+ * + *
    + *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • + *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • + *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • + *
+ * + *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ * + *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount + * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

+ */ + post: operations['PostCreditNotes'] + } + '/v1/credit_notes/{credit_note}/lines': { + /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetCreditNotesCreditNoteLines'] + } + '/v1/credit_notes/{id}': { + /**

Retrieves the credit note object with the given identifier.

*/ + get: operations['GetCreditNotesId'] + /**

Updates an existing credit note.

*/ + post: operations['PostCreditNotesId'] + } + '/v1/credit_notes/{id}/void': { + /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ + post: operations['PostCreditNotesIdVoid'] + } + '/v1/credit_notes/preview': { + /**

Get a preview of a credit note without creating it.

*/ + get: operations['GetCreditNotesPreview'] + } + '/v1/credit_notes/preview/lines': { + /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetCreditNotesPreviewLines'] + } + '/v1/customers': { + /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ + get: operations['GetCustomers'] + /**

Creates a new customer object.

*/ + post: operations['PostCustomers'] + } + '/v1/customers/{customer}': { + /**

Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.

*/ + get: operations['GetCustomersCustomer'] + /** + *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

+ * + *

This request accepts mostly the same arguments as the customer creation call.

+ */ + post: operations['PostCustomersCustomer'] + /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ + delete: operations['DeleteCustomersCustomer'] + } + '/v1/customers/{customer}/balance_transactions': { + /**

Returns a list of transactions that updated the customer’s balance.

*/ + get: operations['GetCustomersCustomerBalanceTransactions'] + /**

Creates an immutable transaction that updates the customer’s balance.

*/ + post: operations['PostCustomersCustomerBalanceTransactions'] + } + '/v1/customers/{customer}/balance_transactions/{transaction}': { + /**

Retrieves a specific transaction that updated the customer’s balance.

*/ + get: operations['GetCustomersCustomerBalanceTransactionsTransaction'] + /**

Most customer balance transaction fields are immutable, but you may update its description and metadata.

*/ + post: operations['PostCustomersCustomerBalanceTransactionsTransaction'] + } + '/v1/customers/{customer}/bank_accounts': { + /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ + get: operations['GetCustomersCustomerBankAccounts'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerBankAccounts'] + } + '/v1/customers/{customer}/bank_accounts/{id}': { + /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ + get: operations['GetCustomersCustomerBankAccountsId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerBankAccountsId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerBankAccountsId'] + } + '/v1/customers/{customer}/bank_accounts/{id}/verify': { + /**

Verify a specified bank account for a given customer.

*/ + post: operations['PostCustomersCustomerBankAccountsIdVerify'] + } + '/v1/customers/{customer}/cards': { + /** + *

You can see a list of the cards belonging to a customer. + * Note that the 10 most recent sources are always available on the Customer object. + * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

+ */ + get: operations['GetCustomersCustomerCards'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerCards'] + } + '/v1/customers/{customer}/cards/{id}': { + /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ + get: operations['GetCustomersCustomerCardsId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerCardsId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerCardsId'] + } + '/v1/customers/{customer}/discount': { + get: operations['GetCustomersCustomerDiscount'] + /**

Removes the currently applied discount on a customer.

*/ + delete: operations['DeleteCustomersCustomerDiscount'] + } + '/v1/customers/{customer}/sources': { + /**

List sources for a specified customer.

*/ + get: operations['GetCustomersCustomerSources'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerSources'] + } + '/v1/customers/{customer}/sources/{id}': { + /**

Retrieve a specified source for a given customer.

*/ + get: operations['GetCustomersCustomerSourcesId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerSourcesId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerSourcesId'] + } + '/v1/customers/{customer}/sources/{id}/verify': { + /**

Verify a specified bank account for a given customer.

*/ + post: operations['PostCustomersCustomerSourcesIdVerify'] + } + '/v1/customers/{customer}/subscriptions': { + /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ + get: operations['GetCustomersCustomerSubscriptions'] + /**

Creates a new subscription on an existing customer.

*/ + post: operations['PostCustomersCustomerSubscriptions'] + } + '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}': { + /**

Retrieves the subscription with the given ID.

*/ + get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedId'] + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + post: operations['PostCustomersCustomerSubscriptionsSubscriptionExposedId'] + /** + *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedId'] + } + '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount': { + get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] + /**

Removes the currently applied discount on a customer.

*/ + delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] + } + '/v1/customers/{customer}/tax_ids': { + /**

Returns a list of tax IDs for a customer.

*/ + get: operations['GetCustomersCustomerTaxIds'] + /**

Creates a new TaxID object for a customer.

*/ + post: operations['PostCustomersCustomerTaxIds'] + } + '/v1/customers/{customer}/tax_ids/{id}': { + /**

Retrieves the TaxID object with the given identifier.

*/ + get: operations['GetCustomersCustomerTaxIdsId'] + /**

Deletes an existing TaxID object.

*/ + delete: operations['DeleteCustomersCustomerTaxIdsId'] + } + '/v1/disputes': { + /**

Returns a list of your disputes.

*/ + get: operations['GetDisputes'] + } + '/v1/disputes/{dispute}': { + /**

Retrieves the dispute with the given ID.

*/ + get: operations['GetDisputesDispute'] + /** + *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

+ * + *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

+ */ + post: operations['PostDisputesDispute'] + } + '/v1/disputes/{dispute}/close': { + /** + *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

+ * + *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

+ */ + post: operations['PostDisputesDisputeClose'] + } + '/v1/ephemeral_keys': { + /**

Creates a short-lived API key for a given resource.

*/ + post: operations['PostEphemeralKeys'] + } + '/v1/ephemeral_keys/{key}': { + /**

Invalidates a short-lived API key for a given resource.

*/ + delete: operations['DeleteEphemeralKeysKey'] + } + '/v1/events': { + /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ + get: operations['GetEvents'] + } + '/v1/events/{id}': { + /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ + get: operations['GetEventsId'] + } + '/v1/exchange_rates': { + /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ + get: operations['GetExchangeRates'] + } + '/v1/exchange_rates/{currency}': { + /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ + get: operations['GetExchangeRatesCurrency'] + } + '/v1/file_links': { + /**

Returns a list of file links.

*/ + get: operations['GetFileLinks'] + /**

Creates a new file link object.

*/ + post: operations['PostFileLinks'] + } + '/v1/file_links/{link}': { + /**

Retrieves the file link with the given ID.

*/ + get: operations['GetFileLinksLink'] + /**

Updates an existing file link object. Expired links can no longer be updated.

*/ + post: operations['PostFileLinksLink'] + } + '/v1/files': { + /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ + get: operations['GetFiles'] + /** + *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

+ * + *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

+ */ + post: operations['PostFiles'] + } + '/v1/files/{file}': { + /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ + get: operations['GetFilesFile'] + } + '/v1/invoiceitems': { + /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ + get: operations['GetInvoiceitems'] + /**

Creates an item to be added to a draft invoice. If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ + post: operations['PostInvoiceitems'] + } + '/v1/invoiceitems/{invoiceitem}': { + /**

Retrieves the invoice item with the given ID.

*/ + get: operations['GetInvoiceitemsInvoiceitem'] + /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ + post: operations['PostInvoiceitemsInvoiceitem'] + /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ + delete: operations['DeleteInvoiceitemsInvoiceitem'] + } + '/v1/invoices': { + /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ + get: operations['GetInvoices'] + /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.

*/ + post: operations['PostInvoices'] + } + '/v1/invoices/{invoice}': { + /**

Retrieves the invoice with the given ID.

*/ + get: operations['GetInvoicesInvoice'] + /** + *

Draft invoices are fully editable. Once an invoice is finalized, + * monetary values, as well as collection_method, become uneditable.

+ * + *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or automatically reconciling invoices, pass + * auto_advance=false.

+ */ + post: operations['PostInvoicesInvoice'] + /**

Permanently deletes a draft invoice. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized, it must be voided.

*/ + delete: operations['DeleteInvoicesInvoice'] + } + '/v1/invoices/{invoice}/finalize': { + /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ + post: operations['PostInvoicesInvoiceFinalize'] + } + '/v1/invoices/{invoice}/lines': { + /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetInvoicesInvoiceLines'] + } + '/v1/invoices/{invoice}/mark_uncollectible': { + /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ + post: operations['PostInvoicesInvoiceMarkUncollectible'] + } + '/v1/invoices/{invoice}/pay': { + /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ + post: operations['PostInvoicesInvoicePay'] + } + '/v1/invoices/{invoice}/send': { + /** + *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

+ * + *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

+ */ + post: operations['PostInvoicesInvoiceSend'] + } + '/v1/invoices/{invoice}/void': { + /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ + post: operations['PostInvoicesInvoiceVoid'] + } + '/v1/invoices/upcoming': { + /** + *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.

+ * + *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

+ * + *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

+ */ + get: operations['GetInvoicesUpcoming'] + } + '/v1/invoices/upcoming/lines': { + /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetInvoicesUpcomingLines'] + } + '/v1/issuer_fraud_records': { + /**

Returns a list of issuer fraud records.

*/ + get: operations['GetIssuerFraudRecords'] + } + '/v1/issuer_fraud_records/{issuer_fraud_record}': { + /** + *

Retrieves the details of an issuer fraud record that has previously been created.

+ * + *

Please refer to the issuer fraud record object reference for more details.

+ */ + get: operations['GetIssuerFraudRecordsIssuerFraudRecord'] + } + '/v1/issuing/authorizations': { + /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingAuthorizations'] + } + '/v1/issuing/authorizations/{authorization}': { + /**

Retrieves an Issuing Authorization object.

*/ + get: operations['GetIssuingAuthorizationsAuthorization'] + /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingAuthorizationsAuthorization'] + } + '/v1/issuing/authorizations/{authorization}/approve': { + /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ + post: operations['PostIssuingAuthorizationsAuthorizationApprove'] + } + '/v1/issuing/authorizations/{authorization}/decline': { + /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ + post: operations['PostIssuingAuthorizationsAuthorizationDecline'] + } + '/v1/issuing/cardholders': { + /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingCardholders'] + /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ + post: operations['PostIssuingCardholders'] + } + '/v1/issuing/cardholders/{cardholder}': { + /**

Retrieves an Issuing Cardholder object.

*/ + get: operations['GetIssuingCardholdersCardholder'] + /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingCardholdersCardholder'] + } + '/v1/issuing/cards': { + /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingCards'] + /**

Creates an Issuing Card object.

*/ + post: operations['PostIssuingCards'] + } + '/v1/issuing/cards/{card}': { + /**

Retrieves an Issuing Card object.

*/ + get: operations['GetIssuingCardsCard'] + /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingCardsCard'] + } + '/v1/issuing/disputes': { + /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingDisputes'] + /**

Creates an Issuing Dispute object.

*/ + post: operations['PostIssuingDisputes'] + } + '/v1/issuing/disputes/{dispute}': { + /**

Retrieves an Issuing Dispute object.

*/ + get: operations['GetIssuingDisputesDispute'] + /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingDisputesDispute'] + } + '/v1/issuing/settlements': { + /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingSettlements'] + } + '/v1/issuing/settlements/{settlement}': { + /**

Retrieves an Issuing Settlement object.

*/ + get: operations['GetIssuingSettlementsSettlement'] + /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingSettlementsSettlement'] + } + '/v1/issuing/transactions': { + /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingTransactions'] + } + '/v1/issuing/transactions/{transaction}': { + /**

Retrieves an Issuing Transaction object.

*/ + get: operations['GetIssuingTransactionsTransaction'] + /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingTransactionsTransaction'] + } + '/v1/mandates/{mandate}': { + /**

Retrieves a Mandate object.

*/ + get: operations['GetMandatesMandate'] + } + '/v1/order_returns': { + /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ + get: operations['GetOrderReturns'] + } + '/v1/order_returns/{id}': { + /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ + get: operations['GetOrderReturnsId'] + } + '/v1/orders': { + /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ + get: operations['GetOrders'] + /**

Creates a new order object.

*/ + post: operations['PostOrders'] + } + '/v1/orders/{id}': { + /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ + get: operations['GetOrdersId'] + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostOrdersId'] + } + '/v1/orders/{id}/pay': { + /**

Pay an order by providing a source to create a payment.

*/ + post: operations['PostOrdersIdPay'] + } + '/v1/orders/{id}/returns': { + /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ + post: operations['PostOrdersIdReturns'] + } + '/v1/payment_intents': { + /**

Returns a list of PaymentIntents.

*/ + get: operations['GetPaymentIntents'] + /** + *

Creates a PaymentIntent object.

+ * + *

After the PaymentIntent is created, attach a payment method and confirm + * to continue the payment. You can read more about the different payment flows + * available via the Payment Intents API here.

+ * + *

When confirm=true is used during creation, it is equivalent to creating + * and confirming the PaymentIntent in the same call. You may use any parameters + * available in the confirm API when confirm=true + * is supplied.

+ */ + post: operations['PostPaymentIntents'] + } + '/v1/payment_intents/{intent}': { + /** + *

Retrieves the details of a PaymentIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

+ */ + get: operations['GetPaymentIntentsIntent'] + /** + *

Updates properties on a PaymentIntent object without confirming.

+ * + *

Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the payment_method will + * always require you to confirm the PaymentIntent again. If you prefer to + * update and confirm at the same time, we recommend updating properties via + * the confirm API instead.

+ */ + post: operations['PostPaymentIntentsIntent'] + } + '/v1/payment_intents/{intent}/cancel': { + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status='requires_capture', the remaining amount_capturable will automatically be refunded.

+ */ + post: operations['PostPaymentIntentsIntentCancel'] + } + '/v1/payment_intents/{intent}/capture': { + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled exactly seven days after they are created.

+ * + *

Learn more about separate authorization and capture.

+ */ + post: operations['PostPaymentIntentsIntentCapture'] + } + '/v1/payment_intents/{intent}/confirm': { + /** + *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

+ * + *

If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the requires_action status and + * suggest additional actions via next_action. If payment fails, + * the PaymentIntent will transition to the requires_payment_method status. If + * payment succeeds, the PaymentIntent will transition to the succeeded + * status (or requires_capture, if capture_method is set to manual).

+ * + *

If the confirmation_method is automatic, payment may be attempted + * using our client SDKs + * and the PaymentIntent’s client_secret. + * After next_actions are handled by the client, no additional + * confirmation is required to complete the payment.

+ * + *

If the confirmation_method is manual, all payment attempts must be + * initiated using a secret key. + * If any actions are required for the payment, the PaymentIntent will + * return to the requires_confirmation state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. Read the expanded documentation + * to learn more about manual confirmation.

+ */ + post: operations['PostPaymentIntentsIntentConfirm'] + } + '/v1/payment_methods': { + /**

Returns a list of PaymentMethods for a given Customer

*/ + get: operations['GetPaymentMethods'] + /**

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

*/ + post: operations['PostPaymentMethods'] + } + '/v1/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object.

*/ + get: operations['GetPaymentMethodsPaymentMethod'] + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + post: operations['PostPaymentMethodsPaymentMethod'] + } + '/v1/payment_methods/{payment_method}/attach': { + /** + *

Attaches a PaymentMethod object to a Customer.

+ * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent + * or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the + * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. + * See Optimizing cards for future payments for more information about setting up future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + post: operations['PostPaymentMethodsPaymentMethodAttach'] + } + '/v1/payment_methods/{payment_method}/detach': { + /**

Detaches a PaymentMethod object from a Customer.

*/ + post: operations['PostPaymentMethodsPaymentMethodDetach'] + } + '/v1/payouts': { + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + get: operations['GetPayouts'] + /** + *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

+ * + *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

+ * + *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

+ */ + post: operations['PostPayouts'] + } + '/v1/payouts/{payout}': { + /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ + get: operations['GetPayoutsPayout'] + /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ + post: operations['PostPayoutsPayout'] + } + '/v1/payouts/{payout}/cancel': { + /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ + post: operations['PostPayoutsPayoutCancel'] + } + '/v1/plans': { + /**

Returns a list of your plans.

*/ + get: operations['GetPlans'] + /**

You can create plans using the API, or in the Stripe Dashboard.

*/ + post: operations['PostPlans'] + } + '/v1/plans/{plan}': { + /**

Retrieves the plan with the given ID.

*/ + get: operations['GetPlansPlan'] + /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ + post: operations['PostPlansPlan'] + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + delete: operations['DeletePlansPlan'] + } + '/v1/products': { + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + get: operations['GetProducts'] + /**

Creates a new product object.

*/ + post: operations['PostProducts'] + } + '/v1/products/{id}': { + /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ + get: operations['GetProductsId'] + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostProductsId'] + /**

Delete a product. Deleting a product with type=good is only possible if it has no SKUs associated with it. Deleting a product with type=service is only possible if it has no plans associated with it.

*/ + delete: operations['DeleteProductsId'] + } + '/v1/radar/early_fraud_warnings': { + /**

Returns a list of early fraud warnings.

*/ + get: operations['GetRadarEarlyFraudWarnings'] + } + '/v1/radar/early_fraud_warnings/{early_fraud_warning}': { + /** + *

Retrieves the details of an early fraud warning that has previously been created.

+ * + *

Please refer to the early fraud warning object reference for more details.

+ */ + get: operations['GetRadarEarlyFraudWarningsEarlyFraudWarning'] + } + '/v1/radar/value_list_items': { + /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetRadarValueListItems'] + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + post: operations['PostRadarValueListItems'] + } + '/v1/radar/value_list_items/{item}': { + /**

Retrieves a ValueListItem object.

*/ + get: operations['GetRadarValueListItemsItem'] + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + delete: operations['DeleteRadarValueListItemsItem'] + } + '/v1/radar/value_lists': { + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetRadarValueLists'] + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + post: operations['PostRadarValueLists'] + } + '/v1/radar/value_lists/{value_list}': { + /**

Retrieves a ValueList object.

*/ + get: operations['GetRadarValueListsValueList'] + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + post: operations['PostRadarValueListsValueList'] + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + delete: operations['DeleteRadarValueListsValueList'] + } + '/v1/recipients': { + /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ + get: operations['GetRecipients'] + /** + *

Creates a new Recipient object and verifies the recipient’s identity. + * Also verifies the recipient’s bank account information or debit card, if either is provided.

+ */ + post: operations['PostRecipients'] + } + '/v1/recipients/{id}': { + /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ + get: operations['GetRecipientsId'] + /** + *

Updates the specified recipient by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged.

+ * + *

If you update the name or tax ID, the identity verification will automatically be rerun. + * If you update the bank account, the bank account validation will automatically be rerun.

+ */ + post: operations['PostRecipientsId'] + /**

Permanently deletes a recipient. It cannot be undone.

*/ + delete: operations['DeleteRecipientsId'] + } + '/v1/refunds': { + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + get: operations['GetRefunds'] + /**

Create a refund.

*/ + post: operations['PostRefunds'] + } + '/v1/refunds/{refund}': { + /**

Retrieves the details of an existing refund.

*/ + get: operations['GetRefundsRefund'] + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + post: operations['PostRefundsRefund'] + } + '/v1/reporting/report_runs': { + /**

Returns a list of Report Runs, with the most recent appearing first. (Requires a live-mode API key.)

*/ + get: operations['GetReportingReportRuns'] + /**

Creates a new object and begin running the report. (Requires a live-mode API key.)

*/ + post: operations['PostReportingReportRuns'] + } + '/v1/reporting/report_runs/{report_run}': { + /**

Retrieves the details of an existing Report Run. (Requires a live-mode API key.)

*/ + get: operations['GetReportingReportRunsReportRun'] + } + '/v1/reporting/report_types': { + /**

Returns a full list of Report Types. (Requires a live-mode API key.)

*/ + get: operations['GetReportingReportTypes'] + } + '/v1/reporting/report_types/{report_type}': { + /**

Retrieves the details of a Report Type. (Requires a live-mode API key.)

*/ + get: operations['GetReportingReportTypesReportType'] + } + '/v1/reviews': { + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetReviews'] + } + '/v1/reviews/{review}': { + /**

Retrieves a Review object.

*/ + get: operations['GetReviewsReview'] + } + '/v1/reviews/{review}/approve': { + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + post: operations['PostReviewsReviewApprove'] + } + '/v1/setup_intents': { + /**

Returns a list of SetupIntents.

*/ + get: operations['GetSetupIntents'] + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + post: operations['PostSetupIntents'] + } + '/v1/setup_intents/{intent}': { + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + get: operations['GetSetupIntentsIntent'] + /**

Updates a SetupIntent object.

*/ + post: operations['PostSetupIntentsIntent'] + } + '/v1/setup_intents/{intent}/cancel': { + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + post: operations['PostSetupIntentsIntentCancel'] + } + '/v1/setup_intents/{intent}/confirm': { + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + post: operations['PostSetupIntentsIntentConfirm'] + } + '/v1/sigma/scheduled_query_runs': { + /**

Returns a list of scheduled query runs.

*/ + get: operations['GetSigmaScheduledQueryRuns'] + } + '/v1/sigma/scheduled_query_runs/{scheduled_query_run}': { + /**

Retrieves the details of an scheduled query run.

*/ + get: operations['GetSigmaScheduledQueryRunsScheduledQueryRun'] + } + '/v1/skus': { + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + get: operations['GetSkus'] + /**

Creates a new SKU associated with a product.

*/ + post: operations['PostSkus'] + } + '/v1/skus/{id}': { + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + get: operations['GetSkusId'] + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + post: operations['PostSkusId'] + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + delete: operations['DeleteSkusId'] + } + '/v1/sources': { + /**

Creates a new source object.

*/ + post: operations['PostSources'] + } + '/v1/sources/{source}': { + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + get: operations['GetSourcesSource'] + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + post: operations['PostSourcesSource'] + } + '/v1/sources/{source}/mandate_notifications/{mandate_notification}': { + /**

Retrieves a new Source MandateNotification.

*/ + get: operations['GetSourcesSourceMandateNotificationsMandateNotification'] + } + '/v1/sources/{source}/source_transactions': { + /**

List source transactions for a given source.

*/ + get: operations['GetSourcesSourceSourceTransactions'] + } + '/v1/sources/{source}/source_transactions/{source_transaction}': { + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + get: operations['GetSourcesSourceSourceTransactionsSourceTransaction'] + } + '/v1/sources/{source}/verify': { + /**

Verify a given source.

*/ + post: operations['PostSourcesSourceVerify'] + } + '/v1/subscription_items': { + /**

Returns a list of your subscription items for a given subscription.

*/ + get: operations['GetSubscriptionItems'] + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + post: operations['PostSubscriptionItems'] + } + '/v1/subscription_items/{item}': { + /**

Retrieves the invoice item with the given ID.

*/ + get: operations['GetSubscriptionItemsItem'] + /**

Updates the plan or quantity of an item on a current subscription.

*/ + post: operations['PostSubscriptionItemsItem'] + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + delete: operations['DeleteSubscriptionItemsItem'] + } + '/v1/subscription_items/{subscription_item}/usage_record_summaries': { + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the billing plan’s month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + get: operations['GetSubscriptionItemsSubscriptionItemUsageRecordSummaries'] + } + '/v1/subscription_items/{subscription_item}/usage_records': { + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + post: operations['PostSubscriptionItemsSubscriptionItemUsageRecords'] + } + '/v1/subscription_schedules': { + /**

Retrieves the list of your subscription schedules.

*/ + get: operations['GetSubscriptionSchedules'] + /**

Creates a new subscription schedule object. Each customer can have up to 25 active or scheduled subscriptions.

*/ + post: operations['PostSubscriptionSchedules'] + } + '/v1/subscription_schedules/{schedule}': { + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + get: operations['GetSubscriptionSchedulesSchedule'] + /**

Updates an existing subscription schedule.

*/ + post: operations['PostSubscriptionSchedulesSchedule'] + } + '/v1/subscription_schedules/{schedule}/cancel': { + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + post: operations['PostSubscriptionSchedulesScheduleCancel'] + } + '/v1/subscription_schedules/{schedule}/release': { + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + post: operations['PostSubscriptionSchedulesScheduleRelease'] + } + '/v1/subscriptions': { + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + get: operations['GetSubscriptions'] + /**

Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.

*/ + post: operations['PostSubscriptions'] + } + '/v1/subscriptions/{subscription_exposed_id}': { + /**

Retrieves the subscription with the given ID.

*/ + get: operations['GetSubscriptionsSubscriptionExposedId'] + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + post: operations['PostSubscriptionsSubscriptionExposedId'] + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + delete: operations['DeleteSubscriptionsSubscriptionExposedId'] + } + '/v1/subscriptions/{subscription_exposed_id}/discount': { + /**

Removes the currently applied discount on a subscription.

*/ + delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] + } + '/v1/tax_rates': { + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + get: operations['GetTaxRates'] + /**

Creates a new tax rate.

*/ + post: operations['PostTaxRates'] + } + '/v1/tax_rates/{tax_rate}': { + /**

Retrieves a tax rate with the given ID

*/ + get: operations['GetTaxRatesTaxRate'] + /**

Updates an existing tax rate.

*/ + post: operations['PostTaxRatesTaxRate'] + } + '/v1/terminal/connection_tokens': { + /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ + post: operations['PostTerminalConnectionTokens'] + } + '/v1/terminal/locations': { + /**

Returns a list of Location objects.

*/ + get: operations['GetTerminalLocations'] + /**

Creates a new Location object.

*/ + post: operations['PostTerminalLocations'] + } + '/v1/terminal/locations/{location}': { + /**

Retrieves a Location object.

*/ + get: operations['GetTerminalLocationsLocation'] + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostTerminalLocationsLocation'] + /**

Deletes a Location object.

*/ + delete: operations['DeleteTerminalLocationsLocation'] + } + '/v1/terminal/readers': { + /**

Returns a list of Reader objects.

*/ + get: operations['GetTerminalReaders'] + /**

Creates a new Reader object.

*/ + post: operations['PostTerminalReaders'] + } + '/v1/terminal/readers/{reader}': { + /**

Retrieves a Reader object.

*/ + get: operations['GetTerminalReadersReader'] + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostTerminalReadersReader'] + /**

Deletes a Reader object.

*/ + delete: operations['DeleteTerminalReadersReader'] + } + '/v1/tokens': { + /** + *

Creates a single-use token that represents a bank account’s details. + * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

+ */ + post: operations['PostTokens'] + } + '/v1/tokens/{token}': { + /**

Retrieves the token with the given ID.

*/ + get: operations['GetTokensToken'] + } + '/v1/topups': { + /**

Returns a list of top-ups.

*/ + get: operations['GetTopups'] + /**

Top up the balance of an account

*/ + post: operations['PostTopups'] + } + '/v1/topups/{topup}': { + /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ + get: operations['GetTopupsTopup'] + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + post: operations['PostTopupsTopup'] + } + '/v1/topups/{topup}/cancel': { + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + post: operations['PostTopupsTopupCancel'] + } + '/v1/transfers': { + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + get: operations['GetTransfers'] + /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ + post: operations['PostTransfers'] + } + '/v1/transfers/{id}/reversals': { + /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ + get: operations['GetTransfersIdReversals'] + /** + *

When you create a new reversal, you must specify a transfer to create it on.

+ * + *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

+ * + *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

+ */ + post: operations['PostTransfersIdReversals'] + } + '/v1/transfers/{transfer}': { + /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ + get: operations['GetTransfersTransfer'] + /** + *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts only metadata as an argument.

+ */ + post: operations['PostTransfersTransfer'] + } + '/v1/transfers/{transfer}/reversals/{id}': { + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + get: operations['GetTransfersTransferReversalsId'] + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + post: operations['PostTransfersTransferReversalsId'] + } + '/v1/webhook_endpoints': { + /**

Returns a list of your webhook endpoints.

*/ + get: operations['GetWebhookEndpoints'] + /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ + post: operations['PostWebhookEndpoints'] + } + '/v1/webhook_endpoints/{webhook_endpoint}': { + /**

Retrieves the webhook endpoint with the given ID.

*/ + get: operations['GetWebhookEndpointsWebhookEndpoint'] + /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ + post: operations['PostWebhookEndpointsWebhookEndpoint'] + /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ + delete: operations['DeleteWebhookEndpointsWebhookEndpoint'] + } +} + +export interface definitions { + /** + * Account + * @description This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current e-mail address or if the account is + * enabled yet to make live charges. + * + * Some properties, marked below, are available only to platforms that want to + * [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts). + */ + account: { + business_profile?: definitions['account_business_profile'] + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + capabilities?: definitions['account_capabilities'] + /** @description Whether the account can create live charges. */ + charges_enabled?: boolean + company?: definitions['legal_entity_company'] + /** @description The account's country. */ + country?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created?: number + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** @description Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. */ + details_submitted?: boolean + /** @description The primary user's email address. */ + email?: string + /** + * ExternalAccountList + * @description External accounts (bank accounts and debit cards) currently attached to this account + */ + external_accounts?: { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: definitions['bank_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Unique identifier for the object. */ + id: string + individual?: definitions['person'] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account' + /** @description Whether Stripe can send payouts to this account. */ + payouts_enabled?: boolean + requirements?: definitions['account_requirements'] + settings?: definitions['account_settings'] + tos_acceptance?: definitions['account_tos_acceptance'] + /** + * @description The Stripe account type. Can be `standard`, `express`, or `custom`. + * @enum {string} + */ + type?: 'custom' | 'express' | 'standard' + } + /** AccountBrandingSettings */ + account_branding_settings: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. */ + icon?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. */ + logo?: string + /** @description A CSS hex color value representing the primary branding color for this account */ + primary_color?: string + /** @description A CSS hex color value representing the secondary branding color for this account */ + secondary_color?: string + } + /** AccountBusinessProfile */ + account_business_profile: { + /** @description [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. */ + mcc?: string + /** @description The customer-facing business name. */ + name?: string + /** @description Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ + product_description?: string + support_address?: definitions['address'] + /** @description A publicly available email address for sending support issues to. */ + support_email?: string + /** @description A publicly available phone number to call with support issues. */ + support_phone?: string + /** @description A publicly available website for handling support issues. */ + support_url?: string + /** @description The business's publicly available website. */ + url?: string + } + /** AccountCapabilities */ + account_capabilities: { + /** + * @description The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + * @enum {string} + */ + au_becs_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + * @enum {string} + */ + card_issuing?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + * @enum {string} + */ + card_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + * @enum {string} + */ + jcb_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the legacy payments capability of the account. + * @enum {string} + */ + legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the tax reporting 1099-K (US) capability of the account. + * @enum {string} + */ + tax_reporting_us_1099_k?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the tax reporting 1099-MISC (US) capability of the account. + * @enum {string} + */ + tax_reporting_us_1099_misc?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + * @enum {string} + */ + transfers?: 'active' | 'inactive' | 'pending' + } + /** AccountCapabilityRequirements */ + account_capability_requirements: { + /** @description The date the fields in `currently_due` must be collected by to keep the capability enabled for the account. */ + current_deadline?: number + /** @description The fields that need to be collected to keep the capability enabled. If not collected by the `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. */ + currently_due: string[] + /** @description If the capability is disabled, this string describes why. Possible values are `requirement.fields_needed`, `pending.onboarding`, `pending.review`, `rejected_fraud`, or `rejected.other`. */ + disabled_reason?: string + /** @description The fields that need to be collected again because validation or verification failed for some reason. */ + errors: definitions['account_requirements_error'][] + /** @description The fields that need to be collected assuming all volume thresholds are reached. As they become required, these fields appear in `currently_due` as well, and the `current_deadline` is set. */ + eventually_due: string[] + /** @description The fields that weren't collected by the `current_deadline`. These fields need to be collected to enable the capability for the account. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ + pending_verification: string[] + } + /** AccountCardPaymentsSettings */ + account_card_payments_settings: { + decline_on?: definitions['account_decline_charge_on'] + /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix?: string + } + /** AccountDashboardSettings */ + account_dashboard_settings: { + /** @description The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ + display_name?: string + /** @description The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). */ + timezone?: string + } + /** AccountDeclineChargeOn */ + account_decline_charge_on: { + /** @description Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. */ + avs_failure: boolean + /** @description Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. */ + cvc_failure: boolean + } + /** + * AccountLink + * @description Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. + * + * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding). + */ + account_link: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The timestamp at which this account link will expire. */ + expires_at: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account_link' + /** @description The URL for the account link. */ + url: string + } + /** AccountPaymentsSettings */ + account_payments_settings: { + /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. */ + statement_descriptor?: string + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) */ + statement_descriptor_kana?: string + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ + statement_descriptor_kanji?: string + } + /** AccountPayoutSettings */ + account_payout_settings: { + /** @description A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `true` for Express accounts and `false` for Custom accounts. */ + debit_negative_balances: boolean + schedule: definitions['transfer_schedule'] + /** @description The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. */ + statement_descriptor?: string + } + /** AccountRequirements */ + account_requirements: { + /** @description The date the fields in `currently_due` must be collected by to keep payouts enabled for the account. These fields might block payouts sooner if the next threshold is reached before these fields are collected. */ + current_deadline?: number + /** @description The fields that need to be collected to keep the account enabled. If not collected by the `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ + currently_due?: string[] + /** @description If the account is disabled, this string describes why the account can’t create charges or receive payouts. Can be `requirements.past_due`, `requirements.pending_verification`, `rejected.fraud`, `rejected.terms_of_service`, `rejected.listed`, `rejected.other`, `listed`, `under_review`, or `other`. */ + disabled_reason?: string + /** @description The fields that need to be collected again because validation or verification failed for some reason. */ + errors?: definitions['account_requirements_error'][] + /** @description The fields that need to be collected assuming all volume thresholds are reached. As they become required, these fields appear in `currently_due` as well, and the `current_deadline` is set. */ + eventually_due?: string[] + /** @description The fields that weren't collected by the `current_deadline`. These fields need to be collected to re-enable the account. */ + past_due?: string[] + /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ + pending_verification?: string[] + } + /** AccountRequirementsError */ + account_requirements_error: { + /** + * @description The code for the type of error. + * @enum {string} + */ + code: + | 'invalid_address_city_state_postal_code' + | 'invalid_street_address' + | 'invalid_value_other' + | 'verification_document_address_mismatch' + | 'verification_document_address_missing' + | 'verification_document_corrupt' + | 'verification_document_country_not_supported' + | 'verification_document_dob_mismatch' + | 'verification_document_duplicate_type' + | 'verification_document_expired' + | 'verification_document_failed_copy' + | 'verification_document_failed_greyscale' + | 'verification_document_failed_other' + | 'verification_document_failed_test_mode' + | 'verification_document_fraudulent' + | 'verification_document_id_number_mismatch' + | 'verification_document_id_number_missing' + | 'verification_document_incomplete' + | 'verification_document_invalid' + | 'verification_document_manipulated' + | 'verification_document_missing_back' + | 'verification_document_missing_front' + | 'verification_document_name_mismatch' + | 'verification_document_name_missing' + | 'verification_document_nationality_mismatch' + | 'verification_document_not_readable' + | 'verification_document_not_uploaded' + | 'verification_document_photo_mismatch' + | 'verification_document_too_large' + | 'verification_document_type_not_supported' + | 'verification_failed_address_match' + | 'verification_failed_business_iec_number' + | 'verification_failed_document_match' + | 'verification_failed_id_number_match' + | 'verification_failed_keyed_identity' + | 'verification_failed_keyed_match' + | 'verification_failed_name_match' + | 'verification_failed_other' + /** @description An informative message that indicates the error type and provides additional details about the error. */ + reason: string + /** @description The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ + requirement: string + } + /** AccountSettings */ + account_settings: { + branding: definitions['account_branding_settings'] + card_payments: definitions['account_card_payments_settings'] + dashboard: definitions['account_dashboard_settings'] + payments: definitions['account_payments_settings'] + payouts?: definitions['account_payout_settings'] + } + /** AccountTOSAcceptance */ + account_tos_acceptance: { + /** @description The Unix timestamp marking when the Stripe Services Agreement was accepted by the account representative */ + date?: number + /** @description The IP address from which the Stripe Services Agreement was accepted by the account representative */ + ip?: string + /** @description The user agent of the browser from which the Stripe Services Agreement was accepted by the account representative */ + user_agent?: string + } + /** Address */ + address: { + /** @description City, district, suburb, town, or village. */ + city?: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description Address line 1 (e.g., street, PO Box, or company name). */ + line1?: string + /** @description Address line 2 (e.g., apartment, suite, unit, or building). */ + line2?: string + /** @description ZIP or postal code. */ + postal_code?: string + /** @description State, county, province, or region. */ + state?: string + } + /** AlipayAccount */ + alipay_account: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The ID of the customer associated with this Alipay Account. */ + customer?: string + /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ + fingerprint: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'alipay_account' + /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ + payment_amount?: number + /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ + payment_currency?: string + /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ + reusable: boolean + /** @description Whether this Alipay account object has ever been used for a payment. */ + used: boolean + /** @description The username for the Alipay account. */ + username: string + } + /** APIErrors */ + api_errors: { + /** @description For card errors, the ID of the failed charge. */ + charge?: string + /** @description For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ + code?: string + /** @description For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. */ + decline_code?: string + /** @description A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ + doc_url?: string + /** @description A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ + message?: string + /** @description If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */ + param?: string + payment_intent?: definitions['payment_intent'] + payment_method?: definitions['payment_method'] + setup_intent?: definitions['setup_intent'] + source?: definitions['bank_account'] + /** + * @description The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error` + * @enum {string} + */ + type: + | 'api_connection_error' + | 'api_error' + | 'authentication_error' + | 'card_error' + | 'idempotency_error' + | 'invalid_request_error' + | 'rate_limit_error' + } + /** ApplePayDomain */ + apple_pay_domain: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + domain_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apple_pay_domain' + } + /** Application */ + application: { + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the application. */ + name?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'application' + } + /** PlatformFee */ + application_fee: { + /** @description ID of the Stripe account this fee was taken from. */ + account: string + /** @description Amount earned, in %s. */ + amount: number + /** @description Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ + amount_refunded: number + /** @description ID of the Connect application that earned the fee. */ + application: string + /** @description Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ + balance_transaction?: string + /** @description ID of the charge that the application fee was taken from. */ + charge: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'application_fee' + /** @description ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ + originating_transaction?: string + /** @description Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ + refunded: boolean + /** + * FeeRefundList + * @description A list of refunds that have been applied to the fee. + */ + refunds: { + /** @description Details about each object. */ + data: definitions['fee_refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** + * Balance + * @description This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * You can also retrieve the balance history, which contains a list of + * [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance + * (charges, payouts, and so forth). + * + * The available and pending amounts for each currency are broken down further by + * payment source types. + * + * Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + */ + balance: { + /** @description Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property. */ + available: definitions['balance_amount'][] + /** @description Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property. */ + connect_reserved?: definitions['balance_amount'][] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'balance' + /** @description Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. */ + pending: definitions['balance_amount'][] + } + /** BalanceAmount */ + balance_amount: { + /** @description Balance amount. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + source_types?: definitions['balance_amount_by_source_type'] + } + /** BalanceAmountBySourceType */ + balance_amount_by_source_type: { + /** @description Amount for bank account. */ + bank_account?: number + /** @description Amount for card. */ + card?: number + /** @description Amount for FPX. */ + fpx?: number + } + /** + * BalanceTransaction + * @description Balance transactions represent funds moving through your Stripe account. + * They're created for every type of transaction that comes into or flows out of your Stripe account balance. + * + * Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types). + */ + balance_transaction: { + /** @description Gross amount of the transaction, in %s. */ + amount: number + /** @description The date the transaction's net funds will become available in the Stripe balance. */ + available_on: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. */ + exchange_rate?: number + /** @description Fees (in %s) paid for this transaction. */ + fee: number + /** @description Detailed breakdown of fees (in %s) paid for this transaction. */ + fee_details: definitions['fee'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Net amount of the transaction, in %s. */ + net: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'balance_transaction' + /** @description [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. */ + reporting_category: string + /** @description The Stripe object to which this transaction is related. */ + source?: string + /** @description If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ + status: string + /** + * @description Transaction type: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + * @enum {string} + */ + type: + | 'adjustment' + | 'advance' + | 'advance_funding' + | 'application_fee' + | 'application_fee_refund' + | 'charge' + | 'connect_collection_transfer' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_transaction' + | 'payment' + | 'payment_failure_refund' + | 'payment_refund' + | 'payout' + | 'payout_cancel' + | 'payout_failure' + | 'refund' + | 'refund_failure' + | 'reserve_transaction' + | 'reserved_funds' + | 'stripe_fee' + | 'stripe_fx_fee' + | 'tax_fee' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_cancel' + | 'transfer_failure' + | 'transfer_refund' + } + /** + * BankAccount + * @description These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer + * destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Processing ACH & Bank Transfers](https://stripe.com/docs/payments/ach-bank-transfers). + */ + bank_account: { + /** @description The ID of the account that the bank account is associated with. */ + account?: string + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** @description The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: string + /** @description Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ + bank_name?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country: string + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: string + /** @description The ID of the customer that the bank account is associated with. */ + customer?: string + /** @description Whether this bank account is the default external account for its currency. */ + default_for_currency?: boolean + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Unique identifier for the object. */ + id: string + /** @description The last four digits of the bank account number. */ + last4: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + /** @description The routing transit number for the bank account. */ + routing_number?: string + /** + * @description For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. + * + * For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + */ + status: string + } + /** billing_details */ + billing_details: { + address?: definitions['address'] + /** @description Email address. */ + email?: string + /** @description Full name. */ + name?: string + /** @description Billing phone number (including extension). */ + phone?: string + } + /** + * PortalSession + * @description A Session describes the instantiation of the self-serve portal for + * a particular customer. By visiting the self-serve portal's URL, the customer + * can manage their subscriptions and view their invoice payment history. For security reasons, + * Sessions are short-lived and will expire if the customer does not visit the URL. + * Create Sessions on-demand. + * + * Related guide: [self-serve Portal](https://stripe.com/docs/billing/subscriptions/integrating-self-serve). + */ + 'billing_portal.session': { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The ID of the customer for this session. */ + customer: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'billing_portal.session' + /** @description The URL to which Stripe should send customers when they click on the link to return to your website. */ + return_url: string + /** @description The short-lived URL of the session giving customers access to the self-serve portal. */ + url: string + } + /** BitcoinReceiver */ + bitcoin_receiver: { + /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ + active: boolean + /** @description The amount of `currency` that you are collecting as payment. */ + amount: number + /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ + amount_received: number + /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ + bitcoin_amount: number + /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ + bitcoin_amount_received: number + /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ + bitcoin_uri: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ + currency: string + /** @description The customer ID of the bitcoin receiver. */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The customer's email address, set by the API call that creates the receiver. */ + email?: string + /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ + filled: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ + inbound_address: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_receiver' + /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ + payment?: string + /** @description The refund address of this bitcoin receiver. */ + refund_address?: string + /** + * BitcoinTransactionList + * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. + */ + transactions?: { + /** @description Details about each object. */ + data: definitions['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ + uncaptured_funds: boolean + /** @description Indicate if this source is used for payment. */ + used_for_payment?: boolean + } + /** BitcoinTransaction */ + bitcoin_transaction: { + /** @description The amount of `currency` that the transaction was converted to in real-time. */ + amount: number + /** @description The amount of bitcoin contained in the transaction. */ + bitcoin_amount: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_transaction' + /** @description The receiver to which this transaction was sent. */ + receiver: string + } + /** + * AccountCapability + * @description This is an object representing a capability for a Stripe account. + * + * Related guide: [Capabilities Overview](https://stripe.com/docs/connect/capabilities-overview). + */ + capability: { + /** @description The account for which the capability enables functionality. */ + account: string + /** @description The identifier for the capability. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'capability' + /** @description Whether the capability has been requested. */ + requested: boolean + /** @description Time at which the capability was requested. Measured in seconds since the Unix epoch. */ + requested_at?: number + requirements?: definitions['account_capability_requirements'] + /** + * @description The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. + * @enum {string} + */ + status: 'active' | 'disabled' | 'inactive' | 'pending' | 'unrequested' + } + /** + * Card + * @description You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards). + */ + card: { + /** @description The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. */ + account?: string + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_zip_check?: string + /** @description A set of available payout methods for this card. Will be either `["standard"]` or `["standard", "instant"]`. Only values from this set should be passed as the `method` when creating a transfer. */ + available_payout_methods?: ('instant' | 'standard')[] + /** @description Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ + brand: string + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string + currency?: string + /** @description The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. */ + customer?: string + /** @description If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string + /** @description Whether this card is the default external account for its currency. */ + default_for_currency?: boolean + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ + fingerprint?: string + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string + /** @description Unique identifier for the object. */ + id: string + /** @description The last four digits of the card. */ + last4: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description Cardholder name. */ + name?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'card' + /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ + recipient?: string + /** @description If the card number is tokenized, this is the method that was used. Can be `amex_express_checkout`, `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ + tokenization_method?: string + } + /** card_mandate_payment_method_details */ + card_mandate_payment_method_details: { [key: string]: unknown } + /** + * Charge + * @description To charge a credit or a debit card, you create a `Charge` object. You can + * retrieve and refund individual charges as well as list all charges. Charges + * are identified by a unique, random ID. + * + * Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). + */ + charge: { + /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ + amount_refunded: number + /** @description ID of the Connect application that created the charge. */ + application?: string + /** @description The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ + application_fee?: string + /** @description The amount of the application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ + application_fee_amount?: number + /** @description ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ + balance_transaction?: string + billing_details: definitions['billing_details'] + /** @description The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. */ + calculated_statement_descriptor?: string + /** @description If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ + captured: boolean + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the customer this charge is for if one exists. */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Whether the charge has been disputed. */ + disputed: boolean + /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ + failure_code?: string + /** @description Message to user further explaining reason for charge failure if available. */ + failure_message?: string + fraud_details?: definitions['charge_fraud_details'] + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice this charge is for if one exists. */ + invoice?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'charge' + /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ + on_behalf_of?: string + /** @description ID of the order this charge is for if one exists. */ + order?: string + outcome?: definitions['charge_outcome'] + /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ + paid: boolean + /** @description ID of the PaymentIntent associated with this charge, if one exists. */ + payment_intent?: string + /** @description ID of the payment method used in this charge. */ + payment_method?: string + payment_method_details?: definitions['payment_method_details'] + /** @description This is the email address that the receipt for this charge was sent to. */ + receipt_email?: string + /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ + receipt_number?: string + /** @description This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. */ + receipt_url?: string + /** @description Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ + refunded: boolean + /** + * RefundList + * @description A list of refunds that have been applied to the charge. + */ + refunds: { + /** @description Details about each object. */ + data: definitions['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description ID of the review associated with this charge if one exists. */ + review?: string + shipping?: definitions['shipping'] + /** @description The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ + source_transfer?: string + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** @description The status of the payment is either `succeeded`, `pending`, or `failed`. */ + status: string + /** @description ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ + transfer?: string + transfer_data?: definitions['charge_transfer_data'] + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + /** ChargeFraudDetails */ + charge_fraud_details: { + /** @description Assessments from Stripe. If set, the value is `fraudulent`. */ + stripe_report?: string + /** @description Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ + user_report?: string + } + /** ChargeOutcome */ + charge_outcome: { + /** @description Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. */ + network_status?: string + /** @description An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. */ + reason?: string + /** @description Stripe's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. */ + risk_level?: string + /** @description Stripe's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. */ + risk_score?: number + /** @description The ID of the Radar rule that matched the payment, if applicable. */ + rule?: string + /** @description A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ + seller_message?: string + /** @description Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. */ + type: string + } + /** ChargeTransferData */ + charge_transfer_data: { + /** @description The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ + amount?: number + /** @description ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ + destination: string + } + /** checkout_session_custom_display_item_description */ + checkout_session_custom_display_item_description: { + /** @description The description of the line item. */ + description?: string + /** @description The images of the line item. */ + images?: string[] + /** @description The name of the line item. */ + name: string + } + /** checkout_session_display_item */ + checkout_session_display_item: { + /** @description Amount for the display item. */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + custom?: definitions['checkout_session_custom_display_item_description'] + plan?: definitions['plan'] + /** @description Quantity of the display item being purchased. */ + quantity?: number + sku?: definitions['sku'] + /** @description The type of display item. One of `custom`, `plan` or `sku` */ + type?: string + } + /** + * Session + * @description A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout). + * We recommend creating a new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and pass its ID to the + * client to begin Checkout. + * + * Related guide: [Checkout Server Quickstart](https://stripe.com/docs/payments/checkout/api). + */ + 'checkout.session': { + /** + * @description The value (`auto` or `required`) for whether Checkout collected the + * customer's billing address. + */ + billing_address_collection?: string + /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string + /** + * @description A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * session with your internal systems. + */ + client_reference_id?: string + /** + * @description The ID of the customer for this session. + * For Checkout Sessions in `payment` or `subscription` mode, Checkout + * will create a new customer object based on information provided + * during the session unless an existing customer was provided when + * the session was created. + */ + customer?: string + /** + * @description If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once a session is + * complete, use the `customer` field. + */ + customer_email?: string + /** @description The line items, plans, or SKUs purchased by the customer. */ + display_items?: definitions['checkout_session_display_item'][] + /** + * @description Unique identifier for the object. Used to pass to `redirectToCheckout` + * in Stripe.js. + */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + * @enum {string} + */ + locale?: 'auto' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'it' | 'ja' | 'ms' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'sv' | 'zh' + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. + * @enum {string} + */ + mode?: 'payment' | 'setup' | 'subscription' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'checkout.session' + /** @description The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ + payment_intent?: string + /** + * @description A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ + payment_method_types: string[] + /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ + setup_intent?: string + shipping?: definitions['shipping'] + shipping_address_collection?: definitions['payment_pages_payment_page_resources_shipping_address_collection'] + /** + * @description Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ + subscription?: string + /** + * @description The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ + success_url: string + } + /** ConnectCollectionTransfer */ + connect_collection_transfer: { + /** @description Amount transferred, in %s. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the account that funds are being collected for. */ + destination: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'connect_collection_transfer' + } + /** + * CountrySpec + * @description Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. + * + * You can also view the information from this API call as [an online + * guide](/docs/connect/required-verification-information). + */ + country_spec: { + /** @description The default currency for this country. This applies to both payment methods and bank accounts. */ + default_currency: string + /** @description Unique identifier for the object. Represented as the ISO country code for this country. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'country_spec' + /** @description Currencies that can be accepted in the specific country (for transfers). */ + supported_bank_account_currencies: { [key: string]: unknown } + /** @description Currencies that can be accepted in the specified country (for payments). */ + supported_payment_currencies: string[] + /** @description Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). */ + supported_payment_methods: string[] + /** @description Countries that can accept transfers from the specified country. */ + supported_transfer_countries: string[] + verification_fields: definitions['country_spec_verification_fields'] + } + /** CountrySpecVerificationFieldDetails */ + country_spec_verification_field_details: { + /** @description Additional fields which are only required for some users. */ + additional: string[] + /** @description Fields which every account must eventually provide. */ + minimum: string[] + } + /** CountrySpecVerificationFields */ + country_spec_verification_fields: { + company: definitions['country_spec_verification_field_details'] + individual: definitions['country_spec_verification_field_details'] + } + /** + * Coupon + * @description A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or + * [orders](https://stripe.com/docs/api#create_order-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + */ + coupon: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off?: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ + currency?: string + /** + * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + * @enum {string} + */ + duration: 'forever' | 'once' | 'repeating' + /** @description If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ + duration_in_months?: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ + max_redemptions?: number + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description Name of the coupon displayed to customers on for instance invoices or receipts. */ + name?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'coupon' + /** @description Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. */ + percent_off?: number + /** @description Date after which the coupon can no longer be redeemed. */ + redeem_by?: number + /** @description Number of times this coupon has been applied to a customer. */ + times_redeemed: number + /** @description Taking account of the above properties, whether this coupon can still be applied to a customer. */ + valid: boolean + } + /** + * CreditNote + * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes). + */ + credit_note: { + /** @description The integer amount in **%s** representing the total amount of the credit note, including tax. */ + amount: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the customer. */ + customer: string + /** @description Customer balance transaction related to this credit note. */ + customer_balance_transaction?: string + /** @description The integer amount in **%s** representing the amount of the discount that was credited. */ + discount_amount: number + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice. */ + invoice: string + /** + * CreditNoteLinesList + * @description Line items that make up the credit note + */ + lines: { + /** @description Details about each object. */ + data: definitions['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Customer-facing text that appears on the credit note PDF. */ + memo?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ + number: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'credit_note' + /** @description Amount that was credited outside of Stripe. */ + out_of_band_amount?: number + /** @description The link to download the PDF of the credit note. */ + pdf: string + /** + * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + * @enum {string} + */ + reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' + /** @description Refund related to this credit note. */ + refund?: string + /** + * @description Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + * @enum {string} + */ + status: 'issued' | 'void' + /** @description The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ + subtotal: number + /** @description The aggregate amounts calculated per tax rate for all line items. */ + tax_amounts: definitions['credit_note_tax_amount'][] + /** @description The integer amount in **%s** representing the total amount of the credit note, including tax and discount. */ + total: number + /** + * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + * @enum {string} + */ + type: 'post_payment' | 'pre_payment' + /** @description The time that the credit note was voided. */ + voided_at?: number + } + /** CreditNoteLineItem */ + credit_note_line_item: { + /** @description The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ + amount: number + /** @description Description of the item being credited. */ + description?: string + /** @description The integer amount in **%s** representing the discount being credited for this line item. */ + discount_amount: number + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice line item being credited */ + invoice_line_item?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'credit_note_line_item' + /** @description The number of units of product being credited. */ + quantity?: number + /** @description The amount of tax calculated per tax rate for this line item */ + tax_amounts: definitions['credit_note_tax_amount'][] + /** @description The tax rates which apply to the line item. */ + tax_rates: definitions['tax_rate'][] + /** + * @description The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + * @enum {string} + */ + type: 'custom_line_item' | 'invoice_line_item' + /** @description The cost of each unit of product being credited. */ + unit_amount?: number + /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string + } + /** CreditNoteTaxAmount */ + credit_note_tax_amount: { + /** @description The amount, in %s, of the tax. */ + amount: number + /** @description Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean + /** @description The tax rate that was applied to get this tax amount. */ + tax_rate: string + } + /** + * Customer + * @description `Customer` objects allow you to perform recurring charges, and to track + * multiple charges, that are associated with the same customer. The API allows + * you to create, delete, and update your customers. You can retrieve individual + * customers as well as a list of all your customers. + * + * Related guide: [Saving Cards with Customers](https://stripe.com/docs/saving-cards). + */ + customer: { + address?: definitions['address'] + /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ + balance?: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. */ + currency?: string + /** + * @description ID of the default payment source for the customer. + * + * If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ + default_source?: string + /** @description When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge is failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice is not paid by its due date. */ + delinquent?: boolean + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + discount?: definitions['discount'] + /** @description The customer's email address. */ + email?: string + /** @description Unique identifier for the object. */ + id: string + /** @description The prefix for the customer used to generate unique invoice numbers. */ + invoice_prefix?: string + invoice_settings?: definitions['invoice_setting_customer_setting'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** @description The customer's full name or business name. */ + name?: string + /** @description The suffix of the customer's next invoice number, e.g., 0001. */ + next_invoice_sequence?: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer' + /** @description The customer's phone number. */ + phone?: string + /** @description The customer's preferred locales (languages), ordered by preference. */ + preferred_locales?: string[] + shipping?: definitions['shipping'] + /** + * ApmsSourcesSourceList + * @description The customer's payment sources, if any. + */ + sources: { + /** @description Details about each object. */ + data: definitions['alipay_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * SubscriptionList + * @description The customer's current subscriptions, if any. + */ + subscriptions?: { + /** @description Details about each object. */ + data: definitions['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * @description Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. + * @enum {string} + */ + tax_exempt?: 'exempt' | 'none' | 'reverse' + /** + * TaxIDsList + * @description The customer's tax IDs. + */ + tax_ids?: { + /** @description Details about each object. */ + data: definitions['tax_id'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** customer_acceptance */ + customer_acceptance: { + /** @description The time at which the customer accepted the Mandate. */ + accepted_at?: number + offline?: definitions['offline_acceptance'] + online?: definitions['online_acceptance'] + /** + * @description The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + * @enum {string} + */ + type: 'offline' | 'online' + } + /** + * CustomerBalanceTransaction + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. + */ + customer_balance_transaction: { + /** @description The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. */ + amount: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The ID of the credit note (if any) related to the transaction. */ + credit_note?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of the customer the transaction belongs to. */ + customer: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. */ + ending_balance: number + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the invoice (if any) related to the transaction. */ + invoice?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_balance_transaction' + /** + * @description Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + * @enum {string} + */ + type: + | 'adjustment' + | 'applied_to_invoice' + | 'credit_note' + | 'initial' + | 'invoice_too_large' + | 'invoice_too_small' + | 'migration' + | 'unapplied_from_invoice' + | 'unspent_receiver_credit' + } + /** DeletedAccount */ + deleted_account: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account' + } + /** AlipayDeletedAccount */ + deleted_alipay_account: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'alipay_account' + } + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apple_pay_domain' + } + /** DeletedBankAccount */ + deleted_bank_account: { + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + } + /** BitcoinDeletedReceiver */ + deleted_bitcoin_receiver: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_receiver' + } + /** DeletedCard */ + deleted_card: { + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'card' + } + /** DeletedCoupon */ + deleted_coupon: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'coupon' + } + /** DeletedCustomer */ + deleted_customer: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer' + } + /** DeletedDiscount */ + deleted_discount: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'discount' + } + /** Polymorphic */ + deleted_external_account: { + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + } + /** DeletedInvoice */ + deleted_invoice: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoice' + } + /** DeletedInvoiceItem */ + deleted_invoiceitem: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoiceitem' + } + /** Polymorphic */ + deleted_payment_source: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'alipay_account' + } + /** DeletedPerson */ + deleted_person: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'person' + } + /** DeletedPlan */ + deleted_plan: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'plan' + } + /** DeletedProduct */ + deleted_product: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'product' + } + /** RadarListDeletedList */ + 'deleted_radar.value_list': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list' + } + /** RadarListDeletedListItem */ + 'deleted_radar.value_list_item': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list_item' + } + /** DeletedTransferRecipient */ + deleted_recipient: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'recipient' + } + /** DeletedSKU */ + deleted_sku: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'sku' + } + /** DeletedSubscriptionItem */ + deleted_subscription_item: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_item' + } + /** deleted_tax_id */ + deleted_tax_id: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_id' + } + /** TerminalLocationDeletedLocation */ + 'deleted_terminal.location': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.location' + } + /** TerminalReaderDeletedReader */ + 'deleted_terminal.reader': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.reader' + } + /** NotificationWebhookEndpointDeleted */ + deleted_webhook_endpoint: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'webhook_endpoint' + } + /** DeliveryEstimate */ + delivery_estimate: { + /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ + date?: string + /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ + earliest?: string + /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ + latest?: string + /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ + type: string + } + /** + * Discount + * @description A discount represents the actual application of a coupon to a particular + * customer. It contains information about when the discount began and when it + * will end. + * + * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). + */ + discount: { + coupon: definitions['coupon'] + /** @description The ID of the customer associated with this discount. */ + customer?: string + /** @description If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. */ + end?: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'discount' + /** @description Date that the coupon was applied. */ + start: number + /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription?: string + } + /** + * Dispute + * @description A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you're given the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. You can find more + * information about the dispute process in our [Disputes and + * Fraud](/docs/disputes) documentation. + * + * Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). + */ + dispute: { + /** @description Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). */ + amount: number + /** @description List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ + balance_transactions: definitions['balance_transaction'][] + /** @description ID of the charge that was disputed. */ + charge: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + evidence: definitions['dispute_evidence'] + evidence_details: definitions['dispute_evidence_details'] + /** @description Unique identifier for the object. */ + id: string + /** @description If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. */ + is_charge_refundable: boolean + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'dispute' + /** @description ID of the PaymentIntent that was disputed. */ + payment_intent?: string + /** @description Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ + reason: string + /** + * @description Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. + * @enum {string} + */ + status: + | 'charge_refunded' + | 'lost' + | 'needs_response' + | 'under_review' + | 'warning_closed' + | 'warning_needs_response' + | 'warning_under_review' + | 'won' + } + /** DisputeEvidence */ + dispute_evidence: { + /** @description Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. */ + access_activity_log?: string + /** @description The billing address provided by the customer. */ + billing_address?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ + cancellation_policy?: string + /** @description An explanation of how and when the customer was shown your refund policy prior to purchase. */ + cancellation_policy_disclosure?: string + /** @description A justification for why the customer's subscription was not canceled. */ + cancellation_rebuttal?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. */ + customer_communication?: string + /** @description The email address of the customer. */ + customer_email_address?: string + /** @description The name of the customer. */ + customer_name?: string + /** @description The IP address that the customer used when making the purchase. */ + customer_purchase_ip?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ + customer_signature?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. */ + duplicate_charge_documentation?: string + /** @description An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ + duplicate_charge_explanation?: string + /** @description The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ + duplicate_charge_id?: string + /** @description A description of the product or service that was sold. */ + product_description?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. */ + receipt?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ + refund_policy?: string + /** @description Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ + refund_policy_disclosure?: string + /** @description A justification for why the customer is not entitled to a refund. */ + refund_refusal_explanation?: string + /** @description The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ + service_date?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. */ + service_documentation?: string + /** @description The address to which a physical product was shipped. You should try to include as complete address information as possible. */ + shipping_address?: string + /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. */ + shipping_carrier?: string + /** @description The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ + shipping_date?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. */ + shipping_documentation?: string + /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ + shipping_tracking_number?: string + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ + uncategorized_file?: string + /** @description Any additional evidence or statements. */ + uncategorized_text?: string + } + /** DisputeEvidenceDetails */ + dispute_evidence_details: { + /** @description Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute. */ + due_by?: number + /** @description Whether evidence has been staged for this dispute. */ + has_evidence: boolean + /** @description Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. */ + past_due: boolean + /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ + submission_count: number + } + /** EphemeralKey */ + ephemeral_key: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Time at which the key will expire. Measured in seconds since the Unix epoch. */ + expires: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'ephemeral_key' + /** @description The key's secret. You can use this value to make authorized requests to the Stripe API. */ + secret?: string + } + /** @description An error response from the Stripe API */ + error: { + error: definitions['api_errors'] + } + /** + * NotificationEvent + * @description Events are our way of letting you know when something interesting happens in + * your account. When an interesting event occurs, we create a new `Event` + * object. For example, when a charge succeeds, we create a `charge.succeeded` + * event; and when an invoice payment attempt fails, we create an + * `invoice.payment_failed` event. Note that many API requests may cause multiple + * events to be created. For example, if you create a new subscription for a + * customer, you will receive both a `customer.subscription.created` event and a + * `charge.succeeded` event. + * + * Events occur when the state of another API resource changes. The state of that + * resource at the time of the change is embedded in the event's data field. For + * example, a `charge.succeeded` event will contain a charge, and an + * `invoice.payment_failed` event will contain an invoice. + * + * As with other API resources, you can use endpoints to retrieve an + * [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) + * from the API. We also have a separate + * [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the + * `Event` objects directly to an endpoint on your server. Webhooks are managed + * in your + * [account settings](https://dashboard.stripe.com/account/webhooks'), + * and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up. + * + * When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of + * events that occur in connected accounts. For these events, there will be an + * additional `account` attribute in the received `Event` object. + * + * **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is + * guaranteed only for 30 days. + */ + event: { + /** @description The connected account that originated the event. */ + account?: string + /** @description The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*. */ + api_version?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + data: definitions['notification_event_data'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'event' + /** @description Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ + pending_webhooks: number + request?: definitions['notification_event_request'] + /** @description Description of the event (e.g., `invoice.created` or `charge.refunded`). */ + type: string + } + /** + * ExchangeRate + * @description `Exchange Rate` objects allow you to determine the rates that Stripe is + * currently using to convert from one currency to another. Since this number is + * variable throughout the day, there are various reasons why you might want to + * know the current rate (for example, to dynamically price an item for a user + * with a default payment in a foreign currency). + * + * If you want a guarantee that the charge is made with a certain exchange rate + * you expect is current, you can pass in `exchange_rate` to charges endpoints. + * If the value is no longer up to date, the charge won't go through. Please + * refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more + * details. + */ + exchange_rate: { + /** @description Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'exchange_rate' + /** @description Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. */ + rates: { [key: string]: unknown } + } + /** Polymorphic */ + external_account: { + /** @description The ID of the account that the bank account is associated with. */ + account?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country: string + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: string + /** @description The ID of the customer that the bank account is associated with. */ + customer?: string + /** @description Whether this bank account is the default external account for its currency. */ + default_for_currency?: boolean + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Unique identifier for the object. */ + id: string + /** @description The last four digits of the bank account number. */ + last4: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + } + /** Fee */ + fee: { + /** @description Amount of the fee, in cents. */ + amount: number + /** @description ID of the Connect application that earned the fee. */ + application?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ + type: string + } + /** + * FeeRefund + * @description `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). + */ + fee_refund: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the application fee that was refunded. */ + fee: string + /** @description Unique identifier for the object. */ + id: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'fee_refund' + } + /** + * File + * @description This is an object representing a file hosted on Stripe's servers. The + * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) + * request (for example, when uploading dispute evidence) or it may have + * been created by Stripe (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). + */ + file: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description A filename for the file, suitable for saving to a filesystem. */ + filename?: string + /** @description Unique identifier for the object. */ + id: string + /** + * FileFileLinkList + * @description A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ + links?: { + /** @description Details about each object. */ + data: definitions['file_link'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'file' + /** @description The purpose of the file. Possible values are `additional_verification`, `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document`, `pci_document`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + purpose: string + /** @description The size in bytes of the file object. */ + size: number + /** @description A user friendly title for the document. */ + title?: string + /** @description The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). */ + type?: string + /** @description The URL from which the file can be downloaded using your live secret API key. */ + url?: string + } + /** + * FileLink + * @description To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that can be used to + * retrieve the contents of the file without authentication. + */ + file_link: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Whether this link is already expired. */ + expired: boolean + /** @description Time at which the link expires. */ + expires_at?: number + /** @description The file object this link points to. */ + file: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'file_link' + /** @description The publicly accessible URL to download the file. */ + url?: string + } + /** FinancialReportingFinanceReportRunRunParameters */ + financial_reporting_finance_report_run_run_parameters: { + /** @description The set of output columns requested for inclusion in the report run. */ + columns?: string[] + /** @description Connected account ID by which to filter the report run. */ + connected_account?: string + /** @description Currency of objects to be included in the report run. */ + currency?: string + /** @description Ending timestamp of data to be included in the report run (exclusive). */ + interval_end?: number + /** @description Starting timestamp of data to be included in the report run. */ + interval_start?: number + /** @description Payout ID by which to filter the report run. */ + payout?: string + /** @description Category of balance transactions to be included in the report run. */ + reporting_category?: string + /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ + timezone?: string + } + /** Inventory */ + inventory: { + /** @description The count of inventory available. Will be present if and only if `type` is `finite`. */ + quantity?: number + /** @description Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`. */ + type: string + /** @description An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`. */ + value?: string + } + /** + * Invoice + * @description Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic'), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's running account balance which is applied to the next invoice. + * + * More details on the customer's account balance are + * [here](https://stripe.com/docs/api/customers/object#customer_object-account_balance). + * + * Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending). + */ + invoice: { + /** @description The country of the business associated with this invoice, most often the business creating the invoice. */ + account_country?: string + /** @description The public name of the business associated with this invoice, most often the business creating the invoice. */ + account_name?: string + /** @description Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. */ + amount_due: number + /** @description The amount, in %s, that was paid. */ + amount_paid: number + /** @description The amount remaining, in %s, that is due. */ + amount_remaining: number + /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ + application_fee_amount?: number + /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ + attempt_count: number + /** @description Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. */ + attempted: boolean + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + /** + * @description Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. + * @enum {string} + */ + billing_reason?: + | 'automatic_pending_invoice_item_invoice' + | 'manual' + | 'subscription' + | 'subscription_create' + | 'subscription_cycle' + | 'subscription_threshold' + | 'subscription_update' + | 'upcoming' + /** @description ID of the latest charge generated for this invoice, if any. */ + charge?: string + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Custom fields displayed on the invoice. */ + custom_fields?: definitions['invoice_setting_custom_field'][] + /** @description The ID of the customer who will be billed. */ + customer: string + customer_address?: definitions['address'] + /** @description The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. */ + customer_email?: string + /** @description The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. */ + customer_name?: string + /** @description The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. */ + customer_phone?: string + customer_shipping?: definitions['shipping'] + /** + * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + * @enum {string} + */ + customer_tax_exempt?: 'exempt' | 'none' | 'reverse' + /** @description The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. */ + customer_tax_ids?: definitions['invoices_resource_invoice_tax_id'][] + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string + /** @description The tax rates applied to this invoice, if any. */ + default_tax_rates?: definitions['tax_rate'][] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string + discount?: definitions['discount'] + /** @description The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. */ + due_date?: number + /** @description Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. */ + ending_balance?: number + /** @description Footer displayed on the invoice. */ + footer?: string + /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ + hosted_invoice_url?: string + /** @description Unique identifier for the object. */ + id?: string + /** @description The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ + invoice_pdf?: string + /** + * InvoiceLinesList + * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. + */ + lines: { + /** @description Details about each object. */ + data: definitions['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** @description The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. */ + next_payment_attempt?: number + /** @description A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. */ + number?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoice' + /** @description Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ + paid: boolean + /** @description The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ + payment_intent?: string + /** @description End of the usage period during which invoice items were added to this invoice. */ + period_end: number + /** @description Start of the usage period during which invoice items were added to this invoice. */ + period_start: number + /** @description Total amount of all post-payment credit notes issued for this invoice. */ + post_payment_credit_notes_amount: number + /** @description Total amount of all pre-payment credit notes issued for this invoice. */ + pre_payment_credit_notes_amount: number + /** @description This is the transaction number that appears on email receipts sent for this invoice. */ + receipt_number?: string + /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ + starting_balance: number + /** @description Extra information about an invoice for the customer's credit card statement. */ + statement_descriptor?: string + /** + * @description The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + * @enum {string} + */ + status?: 'deleted' | 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' + status_transitions: definitions['invoices_status_transitions'] + /** @description The subscription that this invoice was prepared for, if any. */ + subscription?: string + /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ + subscription_proration_date?: number + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ + subtotal: number + /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ + tax?: number + /** @description This percentage of the subtotal has been added to the total amount of the invoice, including invoice line items and discounts. This field is inherited from the subscription's `tax_percent` field, but can be changed before the invoice is paid. This field defaults to null. */ + tax_percent?: number + threshold_reason?: definitions['invoice_threshold_reason'] + /** @description Total after discounts and taxes. */ + total: number + /** @description The aggregate amounts calculated per tax rate for all line items. */ + total_tax_amounts?: definitions['invoice_tax_amount'][] + /** @description Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. */ + webhooks_delivered_at?: number + } + /** InvoiceItemThresholdReason */ + invoice_item_threshold_reason: { + /** @description The IDs of the line items that triggered the threshold invoice. */ + line_item_ids: string[] + /** @description The quantity threshold boundary that applied to the given line item. */ + usage_gte: number + } + /** InvoiceLineItemPeriod */ + invoice_line_item_period: { + /** @description End of the line item's billing period */ + end: number + /** @description Start of the line item's billing period */ + start: number + } + /** InvoiceSettingCustomField */ + invoice_setting_custom_field: { + /** @description The name of the custom field. */ + name: string + /** @description The value of the custom field. */ + value: string + } + /** InvoiceSettingCustomerSetting */ + invoice_setting_customer_setting: { + /** @description Default custom fields to be displayed on invoices for this customer. */ + custom_fields?: definitions['invoice_setting_custom_field'][] + /** @description ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. */ + default_payment_method?: string + /** @description Default footer to be displayed on invoices for this customer. */ + footer?: string + } + /** InvoiceSettingSubscriptionScheduleSetting */ + invoice_setting_subscription_schedule_setting: { + /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ + days_until_due?: number + } + /** InvoiceTaxAmount */ + invoice_tax_amount: { + /** @description The amount, in %s, of the tax. */ + amount: number + /** @description Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean + /** @description The tax rate that was applied to get this tax amount. */ + tax_rate: string + } + /** InvoiceThresholdReason */ + invoice_threshold_reason: { + /** @description The total invoice amount threshold boundary if it triggered the threshold invoice. */ + amount_gte?: number + /** @description Indicates which line items triggered a threshold invoice. */ + item_reasons: definitions['invoice_item_threshold_reason'][] + } + /** + * InvoiceItem + * @description Sometimes you want to add a charge or credit to a customer, but actually + * charge or credit the customer's card only at the end of a regular billing + * cycle. This is useful for combining several charges (to minimize + * per-transaction fees), or for having Stripe tabulate your usage-based billing + * totals. + * + * Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ + invoiceitem: { + /** @description Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of the customer who will be billed when this invoice item is billed. */ + customer: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + date: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description If true, discounts will apply to this invoice item. Always false for prorations. */ + discountable: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the invoice this invoice item belongs to. */ + invoice?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoiceitem' + period: definitions['invoice_line_item_period'] + plan?: definitions['plan'] + /** @description Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ + proration: boolean + /** @description Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ + quantity: number + /** @description The subscription that this invoice item has been created for, if any. */ + subscription?: string + /** @description The subscription item that this invoice item has been created for, if any. */ + subscription_item?: string + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ + tax_rates?: definitions['tax_rate'][] + /** @description Unit Amount (in the `currency` specified) of the invoice item. */ + unit_amount?: number + /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string + } + /** InvoicesResourceInvoiceTaxID */ + invoices_resource_invoice_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, `sg_gst`, or `unknown` + * @enum {string} + */ + type: + | 'au_abn' + | 'ca_bn' + | 'ca_qst' + | 'ch_vat' + | 'es_cif' + | 'eu_vat' + | 'hk_br' + | 'in_gst' + | 'jp_cn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string + } + /** InvoicesStatusTransitions */ + invoices_status_transitions: { + /** @description The time that the invoice draft was finalized. */ + finalized_at?: number + /** @description The time that the invoice was marked uncollectible. */ + marked_uncollectible_at?: number + /** @description The time that the invoice was paid. */ + paid_at?: number + /** @description The time that the invoice was voided. */ + voided_at?: number + } + /** + * IssuerFraudRecord + * @description This resource has been renamed to [Early Fraud + * Warning](#early_fraud_warning_object) and will be removed in a future API + * version. + */ + issuer_fraud_record: { + /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ + actionable: boolean + /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ + charge: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ + fraud_type: string + /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ + has_liability_shift: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuer_fraud_record' + /** @description The timestamp at which the card issuer posted the issuer fraud record. */ + post_date: number + } + /** IssuingAuthorizationMerchantData */ + issuing_authorization_merchant_data: { + /** @description A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. */ + category: string + /** @description City where the seller is located */ + city?: string + /** @description Country where the seller is located */ + country?: string + /** @description Name of the seller */ + name?: string + /** @description Identifier assigned to the seller by the card brand */ + network_id: string + /** @description Postal code where the seller is located */ + postal_code?: string + /** @description State where the seller is located */ + state?: string + } + /** IssuingAuthorizationPendingRequest */ + issuing_authorization_pending_request: { + /** @description The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. */ + is_amount_controllable: boolean + /** @description The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The local currency the merchant is requesting to authorize. */ + merchant_currency: string + } + /** IssuingAuthorizationRequest */ + issuing_authorization_request: { + /** @description The authorization amount in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. */ + amount: number + /** @description Whether this request was approved. */ + approved: boolean + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The amount that was authorized at the time of this request. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + merchant_currency: string + /** + * @description The reason for the approval or decline. + * @enum {string} + */ + reason: + | 'account_disabled' + | 'card_active' + | 'card_inactive' + | 'cardholder_inactive' + | 'cardholder_verification_required' + | 'insufficient_funds' + | 'not_allowed' + | 'spending_controls' + | 'suspected_fraud' + | 'verification_failed' + | 'webhook_approved' + | 'webhook_declined' + | 'webhook_timeout' + } + /** IssuingAuthorizationVerificationData */ + issuing_authorization_verification_data: { + /** + * @description Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + * @enum {string} + */ + address_line1_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + * @enum {string} + */ + address_postal_code_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided a CVC and if it matched Stripe’s record. + * @enum {string} + */ + cvc_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided an expiry date and if it matched Stripe’s record. + * @enum {string} + */ + expiry_check: 'match' | 'mismatch' | 'not_provided' + } + /** IssuingCardAuthorizationControls */ + issuing_card_authorization_controls: { + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this card. */ + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to always decline on this card. */ + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @description Limit the spending with rules based on time intervals and categories. */ + spending_limits?: definitions['issuing_card_spending_limit'][] + /** @description Currency for the amounts within spending_limits. Locked to the currency of the card. */ + spending_limits_currency?: string + } + /** IssuingCardShipping */ + issuing_card_shipping: { + address: definitions['address'] + /** + * @description The delivery company that shipped a card. + * @enum {string} + */ + carrier?: 'fedex' | 'usps' + /** @description A unix timestamp representing a best estimate of when the card will be delivered. */ + eta?: number + /** @description Recipient name. */ + name: string + /** + * @description Shipment service, such as `standard` or `express`. + * @enum {string} + */ + service: 'express' | 'priority' | 'standard' + /** + * @description The delivery status of the card. + * @enum {string} + */ + status?: 'canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped' + /** @description A tracking number for a card shipment. */ + tracking_number?: string + /** @description A link to the shipping carrier's site where you can view detailed information about a card shipment. */ + tracking_url?: string + /** + * @description Packaging options. + * @enum {string} + */ + type: 'bulk' | 'individual' + } + /** IssuingCardSpendingLimit */ + issuing_card_spending_limit: { + /** @description Maximum amount allowed to spend per time interval. */ + amount: number + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) on which to apply the spending limit. Leave this blank to limit all charges. */ + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** + * @description The time interval or event with which to apply this spending limit towards. + * @enum {string} + */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + } + /** IssuingCardholderAddress */ + issuing_cardholder_address: { + address: definitions['address'] + } + /** IssuingCardholderAuthorizationControls */ + issuing_cardholder_authorization_controls: { + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this cardholder's cards. */ + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to always decline on this cardholder's cards. */ + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @description Limit the spending with rules based on time intervals and categories. */ + spending_limits?: definitions['issuing_cardholder_spending_limit'][] + /** @description Currency for the amounts within spending_limits. */ + spending_limits_currency?: string + } + /** IssuingCardholderCompany */ + issuing_cardholder_company: { + /** @description Whether the company's business ID number was provided. */ + tax_id_provided: boolean + } + /** IssuingCardholderIdDocument */ + issuing_cardholder_id_document: { + /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + back?: string + /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + front?: string + } + /** IssuingCardholderIndividual */ + issuing_cardholder_individual: { + dob?: definitions['issuing_cardholder_individual_dob'] + /** @description The first name of this cardholder. */ + first_name: string + /** @description The last name of this cardholder. */ + last_name: string + verification?: definitions['issuing_cardholder_verification'] + } + /** IssuingCardholderIndividualDOB */ + issuing_cardholder_individual_dob: { + /** @description The day of birth, between 1 and 31. */ + day?: number + /** @description The month of birth, between 1 and 12. */ + month?: number + /** @description The four-digit year of birth. */ + year?: number + } + /** IssuingCardholderRequirements */ + issuing_cardholder_requirements: { + /** + * @description If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + * @enum {string} + */ + disabled_reason?: 'listed' | 'rejected.listed' | 'under_review' + /** @description Array of fields that need to be collected in order to verify and re-enable the cardholder. */ + past_due?: ( + | 'company.tax_id' + | 'individual.dob.day' + | 'individual.dob.month' + | 'individual.dob.year' + | 'individual.first_name' + | 'individual.last_name' + | 'individual.verification.document' + )[] + } + /** IssuingCardholderSpendingLimit */ + issuing_cardholder_spending_limit: { + /** @description Maximum amount allowed to spend per time interval. */ + amount: number + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) on which to apply the spending limit. Leave this blank to limit all charges. */ + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** + * @description The time interval or event with which to apply this spending limit towards. + * @enum {string} + */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + } + /** IssuingCardholderVerification */ + issuing_cardholder_verification: { + document?: definitions['issuing_cardholder_id_document'] + } + /** + * IssuingAuthorization + * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations). + */ + 'issuing.authorization': { + /** @description The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description Whether the authorization has been approved. */ + approved: boolean + /** + * @description How the card details were provided. + * @enum {string} + */ + authorization_method: 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe' + /** @description List of balance transactions associated with this authorization. */ + balance_transactions: definitions['balance_transaction'][] + card: definitions['issuing.card'] + /** @description The cardholder to whom this authorization belongs. */ + cardholder?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + merchant_currency: string + merchant_data: definitions['issuing_authorization_merchant_data'] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.authorization' + pending_request?: definitions['issuing_authorization_pending_request'] + /** @description History of every time the authorization was approved/denied (whether approved/denied by you directly or by Stripe based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization or partial capture](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous states of the authorization. */ + request_history: definitions['issuing_authorization_request'][] + /** + * @description The current status of the authorization in its lifecycle. + * @enum {string} + */ + status: 'closed' | 'pending' | 'reversed' + /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ + transactions: definitions['issuing.transaction'][] + verification_data: definitions['issuing_authorization_verification_data'] + /** @description What, if any, digital wallet was used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ + wallet?: string + } + /** + * IssuingCard + * @description You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + */ + 'issuing.card': { + /** @description The brand of the card. */ + brand: string + /** + * @description The reason why the card was canceled. + * @enum {string} + */ + cancellation_reason?: 'lost' | 'stolen' + cardholder: definitions['issuing.cardholder'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ + cvc?: string + /** @description The expiration month of the card. */ + exp_month: number + /** @description The expiration year of the card. */ + exp_year: number + /** @description Unique identifier for the object. */ + id: string + /** @description The last 4 digits of the card number. */ + last4: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ + number?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.card' + /** @description The latest card that replaces this card, if any. */ + replaced_by?: string + /** @description The card this card replaces, if any. */ + replacement_for?: string + /** + * @description The reason why the previous card needed to be replaced. + * @enum {string} + */ + replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' + shipping?: definitions['issuing_card_shipping'] + spending_controls: definitions['issuing_card_authorization_controls'] + /** + * @description Whether authorizations can be approved on this card. + * @enum {string} + */ + status: 'active' | 'canceled' | 'inactive' + /** + * @description The type of the card. + * @enum {string} + */ + type: 'physical' | 'virtual' + } + /** + * IssuingCardholder + * @description An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + */ + 'issuing.cardholder': { + billing: definitions['issuing_cardholder_address'] + company?: definitions['issuing_cardholder_company'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The cardholder's email address. */ + email?: string + /** @description Unique identifier for the object. */ + id: string + individual?: definitions['issuing_cardholder_individual'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The cardholder's name. This will be printed on cards issued to them. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.cardholder' + /** @description The cardholder's phone number. */ + phone_number?: string + requirements: definitions['issuing_cardholder_requirements'] + spending_controls?: definitions['issuing_cardholder_authorization_controls'] + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. + * @enum {string} + */ + status: 'active' | 'blocked' | 'inactive' + /** + * @description One of `individual` or `company`. + * @enum {string} + */ + type: 'company' | 'individual' + } + /** + * IssuingDispute + * @description As a [card issuer](https://stripe.com/docs/issuing), you can [dispute](https://stripe.com/docs/issuing/purchases/disputes) transactions that you do not recognize, suspect to be fraudulent, or have some other issue. + * + * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) + */ + 'issuing.dispute': { + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.dispute' + } + /** + * IssuingSettlement + * @description When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + */ + 'issuing.settlement': { + /** @description The Bank Identification Number reflecting this settlement record. */ + bin: string + /** @description The date that the transactions are cleared and posted to user's accounts. */ + clearing_date: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The total interchange received as reimbursement for the transactions. */ + interchange_fees: number + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The total net amount required to settle with the network. */ + net_total: number + /** + * @description The card network for this settlement report. One of ["visa"] + * @enum {string} + */ + network: 'visa' + /** @description The total amount of fees owed to the network. */ + network_fees: number + /** @description The Settlement Identification Number assigned by the network. */ + network_settlement_identifier: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.settlement' + /** @description One of `international` or `uk_national_net`. */ + settlement_service: string + /** @description The total number of transactions reflected in this settlement. */ + transaction_count: number + /** @description The total transaction amount reflected in this settlement. */ + transaction_volume: number + } + /** + * IssuingTransaction + * @description Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions). + */ + 'issuing.transaction': { + /** @description The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description The `Authorization` object that led to this transaction. */ + authorization?: string + /** @description ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ + balance_transaction?: string + /** @description The card used to make this transaction. */ + card: string + /** @description The cardholder to whom this transaction belongs. */ + cardholder?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. */ + merchant_amount: number + /** @description The currency with which the merchant is taking payment. */ + merchant_currency: string + merchant_data: definitions['issuing_authorization_merchant_data'] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.transaction' + /** + * @description The nature of the transaction. + * @enum {string} + */ + type: 'capture' | 'refund' + } + /** LegalEntityCompany */ + legal_entity_company: { + address?: definitions['address'] + address_kana?: definitions['legal_entity_japan_address'] + address_kanji?: definitions['legal_entity_japan_address'] + /** @description Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). */ + directors_provided?: boolean + /** @description Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. */ + executives_provided?: boolean + /** @description The company's legal name. */ + name?: string + /** @description The Kana variation of the company's legal name (Japan only). */ + name_kana?: string + /** @description The Kanji variation of the company's legal name (Japan only). */ + name_kanji?: string + /** @description Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). */ + owners_provided?: boolean + /** @description The company's phone number (used for verification). */ + phone?: string + /** + * @description The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + * @enum {string} + */ + structure?: + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + /** @description Whether the company's business ID number was provided. */ + tax_id_provided?: boolean + /** @description The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ + tax_id_registrar?: string + /** @description Whether the company's business VAT number was provided. */ + vat_id_provided?: boolean + verification?: definitions['legal_entity_company_verification'] + } + /** LegalEntityCompanyVerification */ + legal_entity_company_verification: { + document: definitions['legal_entity_company_verification_document'] + } + /** LegalEntityCompanyVerificationDocument */ + legal_entity_company_verification_document: { + /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + back?: string + /** @description A user-displayable string describing the verification state of this document. */ + details?: string + /** @description One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. */ + details_code?: string + /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + front?: string + } + /** LegalEntityDOB */ + legal_entity_dob: { + /** @description The day of birth, between 1 and 31. */ + day?: number + /** @description The month of birth, between 1 and 12. */ + month?: number + /** @description The four-digit year of birth. */ + year?: number + } + /** LegalEntityJapanAddress */ + legal_entity_japan_address: { + /** @description City/Ward. */ + city?: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description Block/Building number. */ + line1?: string + /** @description Building details. */ + line2?: string + /** @description ZIP or postal code. */ + postal_code?: string + /** @description Prefecture. */ + state?: string + /** @description Town/cho-me. */ + town?: string + } + /** LegalEntityPersonVerification */ + legal_entity_person_verification: { + additional_document?: definitions['legal_entity_person_verification_document'] + /** @description A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ + details?: string + /** @description One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. */ + details_code?: string + document?: definitions['legal_entity_person_verification_document'] + /** @description The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ + status: string + } + /** LegalEntityPersonVerificationDocument */ + legal_entity_person_verification_document: { + /** @description The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + back?: string + /** @description A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". */ + details?: string + /** @description One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. */ + details_code?: string + /** @description The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + front?: string + } + /** LightAccountLogout */ + light_account_logout: { [key: string]: unknown } + /** InvoiceLineItem */ + line_item: { + /** @description The amount, in %s. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description If true, discounts will apply to this line item. Always false for prorations. */ + discountable: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ + invoice_item?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'line_item' + period: definitions['invoice_line_item_period'] + plan?: definitions['plan'] + /** @description Whether this is a proration. */ + proration: boolean + /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ + quantity?: number + /** @description The subscription that the invoice item pertains to, if any. */ + subscription?: string + /** @description The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. */ + subscription_item?: string + /** @description The amount of tax calculated per tax rate for this line item */ + tax_amounts?: definitions['invoice_tax_amount'][] + /** @description The tax rates which apply to the line item. */ + tax_rates?: definitions['tax_rate'][] + /** + * @description A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + * @enum {string} + */ + type: 'invoiceitem' | 'subscription' + } + /** LoginLink */ + login_link: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'login_link' + /** @description The URL for the login link. */ + url: string + } + /** + * Mandate + * @description A Mandate is a record of the permission a customer has given you to debit their payment method. + */ + mandate: { + customer_acceptance: definitions['customer_acceptance'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + multi_use?: definitions['mandate_multi_use'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'mandate' + /** @description ID of the payment method associated with this mandate. */ + payment_method: string + payment_method_details: definitions['mandate_payment_method_details'] + single_use?: definitions['mandate_single_use'] + /** + * @description The status of the mandate, which indicates whether it can be used to initiate a payment. + * @enum {string} + */ + status: 'active' | 'inactive' | 'pending' + /** + * @description The type of the mandate. + * @enum {string} + */ + type: 'multi_use' | 'single_use' + } + /** mandate_au_becs_debit */ + mandate_au_becs_debit: { + /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string + } + /** mandate_multi_use */ + mandate_multi_use: { [key: string]: unknown } + /** mandate_payment_method_details */ + mandate_payment_method_details: { + au_becs_debit?: definitions['mandate_au_becs_debit'] + card?: definitions['card_mandate_payment_method_details'] + sepa_debit?: definitions['mandate_sepa_debit'] + /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ + type: string + } + /** mandate_sepa_debit */ + mandate_sepa_debit: { + /** @description The unique reference of the mandate. */ + reference: string + /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string + } + /** mandate_single_use */ + mandate_single_use: { + /** @description On a single use mandate, the amount of the payment. */ + amount: number + /** @description On a single use mandate, the currency of the payment. */ + currency: string + } + /** NotificationEventData */ + notification_event_data: { + /** @description Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. */ + object: { [key: string]: unknown } + /** @description Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ + previous_attributes?: { [key: string]: unknown } + } + /** NotificationEventRequest */ + notification_event_request: { + /** @description ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. */ + id?: string + /** @description The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ + idempotency_key?: string + } + /** offline_acceptance */ + offline_acceptance: { [key: string]: unknown } + /** online_acceptance */ + online_acceptance: { + /** @description The IP address from which the Mandate was accepted by the customer. */ + ip_address?: string + /** @description The user agent of the browser from which the Mandate was accepted by the customer. */ + user_agent?: string + } + /** + * Order + * @description Order objects are created to handle end customers' purchases of previously + * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well + * as list all orders. Orders are identified by a unique, random ID. + * + * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + */ + order: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ + amount: number + /** @description The total amount that was returned to the customer. */ + amount_returned?: number + /** @description ID of the Connect Application that created the order. */ + application?: string + /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ + application_fee?: number + /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ + charge?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer used for the order. */ + customer?: string + /** @description The email address of the customer placing the order. */ + email?: string + /** @description External coupon code to load for this order. */ + external_coupon_code?: string + /** @description Unique identifier for the object. */ + id: string + /** @description List of items constituting the order. An order can have up to 25 items. */ + items: definitions['order_item'][] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order' + /** + * OrderReturnList + * @description A list of returns that have taken place for this order. + */ + returns?: { + /** @description Details about each object. */ + data: definitions['order_return'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ + selected_shipping_method?: string + shipping?: definitions['shipping'] + /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ + shipping_methods?: definitions['shipping_method'][] + /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ + status: string + status_transitions?: definitions['status_transitions'] + /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated?: number + /** @description The user's order ID if it is different from the Stripe order ID. */ + upstream_id?: string + } + /** + * OrderItem + * @description A representation of the constituent items of any given order. Can be used to + * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. + * + * Related guide: [Orders](https://stripe.com/docs/orders/guide). + */ + order_item: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ + description: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order_item' + /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ + parent?: string + /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ + quantity?: number + /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ + type: string + } + /** + * OrderReturn + * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). + * Returns always belong to an order, and may optionally contain a refund. + * + * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). + */ + order_return: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ + amount: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The items included in this order return. */ + items: definitions['order_item'][] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order_return' + /** @description The order that this return includes items from. */ + order?: string + /** @description The ID of the refund issued for this return. */ + refund?: string + } + /** PackageDimensions */ + package_dimensions: { + /** @description Height, in inches. */ + height: number + /** @description Length, in inches. */ + length: number + /** @description Weight, in ounces. */ + weight: number + /** @description Width, in inches. */ + width: number + } + /** + * PaymentIntent + * @description A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). + */ + payment_intent: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description Amount that can be captured from this PaymentIntent. */ + amount_capturable?: number + /** @description Amount that was collected by this PaymentIntent. */ + amount_received?: number + /** @description ID of the Connect application that created the PaymentIntent. */ + application?: string + /** @description The amount of the application fee (if any) for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + application_fee_amount?: number + /** @description Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ + canceled_at?: number + /** + * @description Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'automatic' | 'duplicate' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice' + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * PaymentFlowsPaymentIntentResourceChargeList + * @description Charges that were created by this PaymentIntent, if any. + */ + charges?: { + /** @description This list only contains the latest charge, even if there were previously multiple unsuccessful charges. To view all previous charges for a PaymentIntent, you can filter the charges list using the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). */ + data: definitions['charge'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment) and learn about how `client_secret` should be handled. + */ + client_secret?: string + /** @enum {string} */ + confirmation_method: 'automatic' | 'manual' + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice that created this PaymentIntent, if it exists. */ + invoice?: string + last_payment_error?: definitions['api_errors'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ + metadata?: { [key: string]: unknown } + next_action?: definitions['payment_intent_next_action'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payment_intent' + /** @description The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + on_behalf_of?: string + /** @description ID of the payment method used in this PaymentIntent. */ + payment_method?: string + payment_method_options?: definitions['payment_intent_payment_method_options'] + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string + /** @description ID of the review associated with this PaymentIntent, if any. */ + review?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'off_session' | 'on_session' + shipping?: definitions['shipping'] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * @description Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + * @enum {string} + */ + status: 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' + transfer_data?: definitions['transfer_data'] + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string + } + /** PaymentIntentNextAction */ + payment_intent_next_action: { + redirect_to_url?: definitions['payment_intent_next_action_redirect_to_url'] + /** @description Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ + type: string + /** @description When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ + use_stripe_sdk?: { [key: string]: unknown } + } + /** PaymentIntentNextActionRedirectToUrl */ + payment_intent_next_action_redirect_to_url: { + /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string + /** @description The URL you must redirect your customer to in order to authenticate the payment. */ + url?: string + } + /** PaymentIntentPaymentMethodOptions */ + payment_intent_payment_method_options: { + card?: definitions['payment_intent_payment_method_options_card'] + } + /** payment_intent_payment_method_options_card */ + payment_intent_payment_method_options_card: { + installments?: definitions['payment_method_options_card_installments'] + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string} + */ + request_three_d_secure?: 'any' | 'automatic' | 'challenge_only' + } + /** + * PaymentMethod + * @description PaymentMethod objects represent your customer's payment instruments. + * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ + payment_method: { + au_becs_debit?: definitions['payment_method_au_becs_debit'] + billing_details: definitions['billing_details'] + card?: definitions['payment_method_card'] + card_present?: definitions['payment_method_card_present'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ + customer?: string + fpx?: definitions['payment_method_fpx'] + /** @description Unique identifier for the object. */ + id: string + ideal?: definitions['payment_method_ideal'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payment_method' + sepa_debit?: definitions['payment_method_sepa_debit'] + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type: 'au_becs_debit' | 'card' | 'fpx' | 'ideal' | 'sepa_debit' + } + /** payment_method_au_becs_debit */ + payment_method_au_becs_debit: { + /** @description Six-digit number identifying bank and branch associated with this bank account. */ + bsb_number?: string + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Last four digits of the bank account number. */ + last4?: string + } + /** payment_method_card */ + payment_method_card: { + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: string + checks?: definitions['payment_method_card_checks'] + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ + fingerprint?: string + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string + generated_from?: definitions['payment_method_card_generated_card'] + /** @description The last four digits of the card. */ + last4: string + three_d_secure_usage?: definitions['three_d_secure_usage'] + wallet?: definitions['payment_method_card_wallet'] + } + /** payment_method_card_checks */ + payment_method_card_checks: { + /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string + /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string + /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string + } + /** payment_method_card_generated_card */ + payment_method_card_generated_card: { + /** @description The charge that created this object. */ + charge?: string + payment_method_details?: definitions['payment_method_details'] + } + /** payment_method_card_present */ + payment_method_card_present: { [key: string]: unknown } + /** payment_method_card_wallet */ + payment_method_card_wallet: { + amex_express_checkout?: definitions['payment_method_card_wallet_amex_express_checkout'] + apple_pay?: definitions['payment_method_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string + google_pay?: definitions['payment_method_card_wallet_google_pay'] + masterpass?: definitions['payment_method_card_wallet_masterpass'] + samsung_pay?: definitions['payment_method_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: definitions['payment_method_card_wallet_visa_checkout'] + } + /** payment_method_card_wallet_amex_express_checkout */ + payment_method_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_card_wallet_apple_pay */ + payment_method_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_card_wallet_google_pay */ + payment_method_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_card_wallet_masterpass */ + payment_method_card_wallet_masterpass: { + billing_address?: definitions['address'] + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string + shipping_address?: definitions['address'] + } + /** payment_method_card_wallet_samsung_pay */ + payment_method_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_card_wallet_visa_checkout */ + payment_method_card_wallet_visa_checkout: { + billing_address?: definitions['address'] + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string + shipping_address?: definitions['address'] + } + /** payment_method_details */ + payment_method_details: { + ach_credit_transfer?: definitions['payment_method_details_ach_credit_transfer'] + ach_debit?: definitions['payment_method_details_ach_debit'] + alipay?: definitions['payment_method_details_alipay'] + au_becs_debit?: definitions['payment_method_details_au_becs_debit'] + bancontact?: definitions['payment_method_details_bancontact'] + card?: definitions['payment_method_details_card'] + card_present?: definitions['payment_method_details_card_present'] + eps?: definitions['payment_method_details_eps'] + fpx?: definitions['payment_method_details_fpx'] + giropay?: definitions['payment_method_details_giropay'] + ideal?: definitions['payment_method_details_ideal'] + klarna?: definitions['payment_method_details_klarna'] + multibanco?: definitions['payment_method_details_multibanco'] + p24?: definitions['payment_method_details_p24'] + sepa_debit?: definitions['payment_method_details_sepa_debit'] + sofort?: definitions['payment_method_details_sofort'] + stripe_account?: definitions['payment_method_details_stripe_account'] + /** + * @description The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ + type: string + wechat?: definitions['payment_method_details_wechat'] + } + /** payment_method_details_ach_credit_transfer */ + payment_method_details_ach_credit_transfer: { + /** @description Account number to transfer funds to. */ + account_number?: string + /** @description Name of the bank associated with the routing number. */ + bank_name?: string + /** @description Routing transit number for the bank account to transfer funds to. */ + routing_number?: string + /** @description SWIFT code of the bank associated with the routing number. */ + swift_code?: string + } + /** payment_method_details_ach_debit */ + payment_method_details_ach_debit: { + /** + * @description Type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description Name of the bank associated with the bank account. */ + bank_name?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Last four digits of the bank account number. */ + last4?: string + /** @description Routing transit number of the bank account. */ + routing_number?: string + } + /** payment_method_details_alipay */ + payment_method_details_alipay: { [key: string]: unknown } + /** payment_method_details_au_becs_debit */ + payment_method_details_au_becs_debit: { + /** @description Bank-State-Branch number of the bank account. */ + bsb_number?: string + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Last four digits of the bank account number. */ + last4?: string + /** @description ID of the mandate used to make this payment. */ + mandate?: string + } + /** payment_method_details_bancontact */ + payment_method_details_bancontact: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string + /** @description Name of the bank associated with the bank account. */ + bank_name?: string + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string + /** @description Last four characters of the IBAN. */ + iban_last4?: string + /** + * @description Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + * @enum {string} + */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_card */ + payment_method_details_card: { + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string + checks?: definitions['payment_method_details_card_checks'] + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string + /** @description Two-digit number representing the card's expiration month. */ + exp_month?: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year?: number + /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ + fingerprint?: string + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string + installments?: definitions['payment_method_details_card_installments'] + /** @description The last four digits of the card. */ + last4?: string + /** @description Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string + three_d_secure?: definitions['three_d_secure_details'] + wallet?: definitions['payment_method_details_card_wallet'] + } + /** payment_method_details_card_checks */ + payment_method_details_card_checks: { + /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string + /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string + /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string + } + /** payment_method_details_card_installments */ + payment_method_details_card_installments: { + plan?: definitions['payment_method_details_card_installments_plan'] + } + /** payment_method_details_card_installments_plan */ + payment_method_details_card_installments_plan: { + /** @description For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ + count?: number + /** + * @description For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + * @enum {string} + */ + interval?: 'month' + /** + * @description Type of installment plan, one of `fixed_count`. + * @enum {string} + */ + type: 'fixed_count' + } + /** payment_method_details_card_present */ + payment_method_details_card_present: { + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). */ + cardholder_name?: string + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string + /** @description Authorization response cryptogram. */ + emv_auth_data?: string + /** @description Two-digit number representing the card's expiration month. */ + exp_month?: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year?: number + /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ + fingerprint?: string + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string + /** @description The last four digits of the card. */ + last4?: string + /** @description Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string + /** @description How were card details read in this transaction. Can be contact_emv, contactless_emv, magnetic_stripe_fallback, magnetic_stripe_track2, or contactless_magstripe_mode */ + read_method?: string + receipt?: definitions['payment_method_details_card_present_receipt'] + } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string + /** @description Identifier for this transaction. */ + authorization_code?: string + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string + } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: definitions['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: definitions['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string + google_pay?: definitions['payment_method_details_card_wallet_google_pay'] + masterpass?: definitions['payment_method_details_card_wallet_masterpass'] + samsung_pay?: definitions['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: definitions['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + billing_address?: definitions['address'] + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string + shipping_address?: definitions['address'] + } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + billing_address?: definitions['address'] + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string + shipping_address?: definitions['address'] + } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string + } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string + /** @description Name of the bank associated with the bank account. */ + bank_name?: string + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string} + */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string} + */ + bic?: + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'SNSBNL2A' + | 'TRIONL2U' + /** @description Last four characters of the IBAN. */ + iban_last4?: string + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_klarna */ + payment_method_details_klarna: { [key: string]: unknown } + /** payment_method_details_multibanco */ + payment_method_details_multibanco: { + /** @description Entity number associated with this Multibanco payment. */ + entity?: string + /** @description Reference number associated with this Multibanco payment. */ + reference?: string + } + /** payment_method_details_p24 */ + payment_method_details_p24: { + /** @description Unique reference for this Przelewy24 payment. */ + reference?: string + /** + * @description Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_sepa_debit */ + payment_method_details_sepa_debit: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string + /** @description Branch code of bank associated with the bank account. */ + branch_code?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Last four characters of the IBAN. */ + last4?: string + /** @description ID of the mandate used to make this payment. */ + mandate?: string + } + /** payment_method_details_sofort */ + payment_method_details_sofort: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string + /** @description Name of the bank associated with the bank account. */ + bank_name?: string + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string + /** @description Last four characters of the IBAN. */ + iban_last4?: string + /** + * @description Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string + } + /** payment_method_details_stripe_account */ + payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_wechat */ + payment_method_details_wechat: { [key: string]: unknown } + /** payment_method_fpx */ + payment_method_fpx: { + /** + * @description The customer's bank, if provided. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** payment_method_ideal */ + payment_method_ideal: { + /** + * @description The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string} + */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + /** + * @description The Bank Identifier Code of the customer's bank, if the bank was provided. + * @enum {string} + */ + bic?: + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'SNSBNL2A' + | 'TRIONL2U' + } + /** payment_method_options_card_installments */ + payment_method_options_card_installments: { + /** @description Installment plans that may be selected for this PaymentIntent. */ + available_plans?: definitions['payment_method_details_card_installments_plan'][] + /** @description Whether Installments are enabled for this PaymentIntent. */ + enabled: boolean + plan?: definitions['payment_method_details_card_installments_plan'] + } + /** payment_method_sepa_debit */ + payment_method_sepa_debit: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string + /** @description Branch code of bank associated with the bank account. */ + branch_code?: string + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string + /** @description Last four characters of the IBAN. */ + last4?: string + } + /** PaymentPagesPaymentPageResourcesShippingAddressCollection */ + payment_pages_payment_page_resources_shipping_address_collection: { + /** + * @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** Polymorphic */ + payment_source: { + /** @description Unique identifier for the object. */ + id: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account' + } + /** + * Payout + * @description A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/payouts). You can retrieve individual payouts, + * as well as list all payouts. Payouts are made on [varying + * schedules](/docs/payouts#payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). + */ + payout: { + /** @description Amount (in %s) to be transferred to your bank account or debit card. */ + amount: number + /** @description Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. */ + arrival_date: number + /** @description Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). */ + automatic: boolean + /** @description ID of the balance transaction that describes the impact of this payout on your account balance. */ + balance_transaction?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description ID of the bank account or card the payout was sent to. */ + destination?: string + /** @description If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. */ + failure_balance_transaction?: string + /** @description Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. */ + failure_code?: string + /** @description Message to user further explaining reason for payout failure if available. */ + failure_message?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) */ + method: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payout' + /** @description The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ + source_type: string + /** @description Extra information about a payout to be displayed on the user's bank statement. */ + statement_descriptor?: string + /** @description Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. */ + status: string + /** + * @description Can be `bank_account` or `card`. + * @enum {string} + */ + type: 'bank_account' | 'card' + } + /** Period */ + period: { + /** @description The end date of this usage period. All usage up to and including this point in time is included. */ + end?: number + /** @description The start date of this usage period. All usage after this point in time is included. */ + start?: number + } + /** + * Person + * @description This is an object representing a person associated with a Stripe account. + * + * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). + */ + person: { + account: string + address?: definitions['address'] + address_kana?: definitions['legal_entity_japan_address'] + address_kanji?: definitions['legal_entity_japan_address'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + dob?: definitions['legal_entity_dob'] + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + /** @description Unique identifier for the object. */ + id: string + id_number_provided?: boolean + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'person' + phone?: string + relationship?: definitions['person_relationship'] + requirements?: definitions['person_requirements'] + ssn_last_4_provided?: boolean + verification?: definitions['legal_entity_person_verification'] + } + /** PersonRelationship */ + person_relationship: { + /** @description Whether the person is a director of the account's legal entity. Currently only required for accounts in the EU. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. */ + director?: boolean + /** @description Whether the person has significant responsibility to control, manage, or direct the organization. */ + executive?: boolean + /** @description Whether the person is an owner of the account’s legal entity. */ + owner?: boolean + /** @description The percent owned by the person of the account's legal entity. */ + percent_ownership?: number + /** @description Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. */ + representative?: boolean + /** @description The person's title (e.g., CEO, Support Engineer). */ + title?: string + } + /** PersonRequirements */ + person_requirements: { + /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ + currently_due: string[] + /** @description The fields that need to be collected again because validation or verification failed for some reason. */ + errors: definitions['account_requirements_error'][] + /** @description Fields that need to be collected assuming all volume thresholds are reached. As fields are needed, they are moved to `currently_due` and the account's `current_deadline` is set. */ + eventually_due: string[] + /** @description Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable payouts for the person's account. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ + pending_verification: string[] + } + /** + * Plan + * @description Plans define the base price, currency, and billing cycle for recurring purchases of products. + * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and plans](https://stripe.com/docs/billing/subscriptions/products-and-plans). + */ + plan: { + /** @description Whether the plan can be used for new purchases. */ + active: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description The amount in %s to be charged on the interval specified. */ + amount?: number + /** @description Same as `amount`, but contains a decimal value with at most 12 decimal places. */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme: 'per_unit' | 'tiered' + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ + interval_count: number + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'plan' + /** @description The product whose pricing this plan determines. */ + product?: string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: definitions['plan_tier'][] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + transform_usage?: definitions['transform_usage'] + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type: 'licensed' | 'metered' + } + /** PlanTier */ + plan_tier: { + /** @description Price for the entire tier. */ + flat_amount?: number + /** @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. */ + flat_amount_decimal?: string + /** @description Per unit price for units relevant to the tier. */ + unit_amount?: number + /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string + /** @description Up to and including to this quantity will be contained in the tier. */ + up_to?: number + } + /** PlatformTax */ + platform_tax_fee: { + /** @description The Connected account that incurred this charge. */ + account: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'platform_tax_fee' + /** @description The payment object that caused this tax to be inflicted. */ + source_transaction: string + /** @description The type of tax (VAT). */ + type: string + } + /** + * Product + * @description Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjuction with [SKUs](https://stripe.com/docs/api#skus) and [Plans](https://stripe.com/docs/api#plans) to configure pricing in Checkout and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) or accept [one-time payments with Checkout](https://stripe.com/docs/payments/checkout/client#create-products) and more about [Products and Plans](https://stripe.com/docs/billing/subscriptions/products-and-plans) + */ + product: { + /** @description Whether the product is currently available for purchase. */ + active: boolean + /** @description A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`). */ + attributes?: string[] + /** @description A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of `type=good`. */ + caption?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description An array of connect application identifiers that cannot purchase this product. Only applicable to products of `type=good`. */ + deactivate_on?: string[] + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Unique identifier for the object. */ + id: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images: string[] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'product' + package_dimensions?: definitions['package_dimensions'] + /** @description Whether this product is a shipped good. Only applicable to products of `type=good`. */ + shippable?: boolean + /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ + statement_descriptor?: string + /** + * @description The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + * @enum {string} + */ + type: 'good' | 'service' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: number + /** @description A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`. */ + url?: string + } + /** RadarReviewResourceLocation */ + radar_review_resource_location: { + /** @description The city where the payment originated. */ + city?: string + /** @description Two-letter ISO code representing the country where the payment originated. */ + country?: string + /** @description The geographic latitude where the payment originated. */ + latitude?: number + /** @description The geographic longitude where the payment originated. */ + longitude?: number + /** @description The state/county/province/region where the payment originated. */ + region?: string + } + /** RadarReviewResourceSession */ + radar_review_resource_session: { + /** @description The browser used in this browser session (e.g., `Chrome`). */ + browser?: string + /** @description Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ + device?: string + /** @description The platform for the browser session (e.g., `Macintosh`). */ + platform?: string + /** @description The version for the browser session (e.g., `61.0.3163.100`). */ + version?: string + } + /** + * RadarEarlyFraudWarning + * @description An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). + */ + 'radar.early_fraud_warning': { + /** @description An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. */ + actionable: boolean + /** @description ID of the charge this early fraud warning is for, optionally expanded. */ + charge: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ + fraud_type: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.early_fraud_warning' + } + /** + * RadarListList + * @description Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). + */ + 'radar.value_list': { + /** @description The name of the value list for use in rules. */ + alias: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The name or email address of the user who created this value list. */ + created_by: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. + * @enum {string} + */ + item_type: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'email' | 'ip_address' | 'string' + /** + * RadarListListItemList + * @description List of items contained within this value list. + */ + list_items: { + /** @description Details about each object. */ + data: definitions['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The name of the value list. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list' + } + /** + * RadarListListItem + * @description Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). + */ + 'radar.value_list_item': { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The name or email address of the user who added this item to the value list. */ + created_by: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list_item' + /** @description The value of the item. */ + value: string + /** @description The identifier of the value list this item belongs to. */ + value_list: string + } + /** + * TransferRecipient + * @description With `Recipient` objects, you can transfer money from your Stripe account to a + * third-party bank account or debit card. The API allows you to create, delete, + * and update your recipients. You can retrieve individual recipients as well as + * a list of all your recipients. + * + * **`Recipient` objects have been deprecated in favor of + * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful + * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use + * recipients can no longer begin doing so. Please use `Account` objects + * instead. If you are already using recipients, please see our + * [migration guide](https://stripe.com/docs/connect/recipient-account-migrations) for more information.** + */ + recipient: { + active_account?: definitions['bank_account'] + /** CardList */ + cards?: { + data: definitions['card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description The default card to use for creating transfers to this recipient. */ + default_card?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + email?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ + migrated_to?: string + /** @description Full, legal name of the recipient. */ + name?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'recipient' + rolled_back_from?: string + /** @description Type of the recipient, one of `individual` or `corporation`. */ + type: string + } + /** + * Refund + * @description `Refund` objects allow you to refund a charge that has previously been created + * but not yet refunded. Funds will be refunded to the credit or debit card that + * was originally charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds). + */ + refund: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: string + /** @description ID of the charge that was refunded. */ + charge?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ + description?: string + /** @description If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ + failure_balance_transaction?: string + /** @description If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ + failure_reason?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'refund' + /** @description ID of the PaymentIntent that was refunded. */ + payment_intent?: string + /** @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ + reason?: string + /** @description This is the transaction number that appears on email receipts sent for this refund. */ + receipt_number?: string + /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ + source_transfer_reversal?: string + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + status?: string + /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ + transfer_reversal?: string + } + /** + * reporting_report_run + * @description The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that reports can only be run based on your live-mode data (not test-mode + * data), and thus related requests must be made with a + * [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ + 'reporting.report_run': { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** + * @description If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ + error?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Always `true`: reports can only be run on live-mode data. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reporting.report_run' + parameters: definitions['financial_reporting_finance_report_run_run_parameters'] + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + result?: definitions['file'] + /** + * @description Status of this report run. This will be `pending` when the run is initially created. + * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + */ + status: string + /** + * @description Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ + succeeded_at?: number + } + /** + * reporting_report_type + * @description The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that reports can only be run based on your live-mode data (not test-mode + * data), and thus related requests must be made with a + * [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ + 'reporting.report_type': { + /** @description Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_end: number + /** @description Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_start: number + /** @description List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) */ + default_columns?: string[] + /** @description The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ + id: string + /** @description Human-readable name of the Report Type */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reporting.report_type' + /** @description When this Report Type was latest updated. Measured in seconds since the Unix epoch. */ + updated: number + /** @description Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. */ + version: number + } + /** ReserveTransaction */ + reserve_transaction: { + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reserve_transaction' + } + /** + * RadarReview + * @description Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ + review: { + /** @description The ZIP or postal code of the card used, if applicable. */ + billing_zip?: string + /** @description The charge associated with this review. */ + charge?: string + /** + * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. + * @enum {string} + */ + closed_reason?: 'approved' | 'disputed' | 'refunded' | 'refunded_as_fraud' + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description The IP address where the payment originated. */ + ip_address?: string + ip_address_location?: definitions['radar_review_resource_location'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'review' + /** @description If `true`, the review needs action. */ + open: boolean + /** + * @description The reason the review was opened. One of `rule` or `manual`. + * @enum {string} + */ + opened_reason: 'manual' | 'rule' + /** @description The PaymentIntent ID associated with this review, if one exists. */ + payment_intent?: string + /** @description The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ + reason: string + session?: definitions['radar_review_resource_session'] + } + /** RadarRule */ + rule: { + /** @description The action taken on the payment. */ + action: string + /** @description Unique identifier for the object. */ + id: string + /** @description The predicate to evaluate the payment against. */ + predicate: string + } + /** + * ScheduledQueryRun + * @description If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + * receive a `sigma.scheduled_query_run.created` webhook each time the query + * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + * retrieve the query results. + */ + scheduled_query_run: { + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description When the query was run, Sigma contained a snapshot of your Stripe data at this time. */ + data_load_time: number + error?: definitions['sigma_scheduled_query_run_error'] + file?: definitions['file'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'scheduled_query_run' + /** @description Time at which the result expires and is no longer available for download. */ + result_available_until: number + /** @description SQL for the query. */ + sql: string + /** @description The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ + status: string + /** @description Title of the query. */ + title: string + } + /** + * SetupIntent + * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. + * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. + * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](/guides/strong-customer-authentication) may need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection + * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, + * it will automatically attach the resulting payment method to that Customer. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, + * even as regulations change over time. + * + * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). + */ + setup_intent: { + /** @description ID of the Connect application that created the SetupIntent. */ + application?: string + /** + * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** + * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ + client_secret?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Unique identifier for the object. */ + id: string + last_setup_error?: definitions['api_errors'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description ID of the multi use Mandate generated by the SetupIntent. */ + mandate?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + next_action?: definitions['setup_intent_next_action'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'setup_intent' + /** @description The account (if any) for which the setup is intended. */ + on_behalf_of?: string + /** @description ID of the payment method used with this SetupIntent. */ + payment_method?: string + payment_method_options?: definitions['setup_intent_payment_method_options'] + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ + payment_method_types: string[] + /** @description ID of the single_use Mandate generated by the SetupIntent. */ + single_use_mandate?: string + /** + * @description [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + * @enum {string} + */ + status: 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' + /** + * @description Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ + usage: string + } + /** SetupIntentNextAction */ + setup_intent_next_action: { + redirect_to_url?: definitions['setup_intent_next_action_redirect_to_url'] + /** @description Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ + type: string + /** @description When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ + use_stripe_sdk?: { [key: string]: unknown } + } + /** SetupIntentNextActionRedirectToUrl */ + setup_intent_next_action_redirect_to_url: { + /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string + /** @description The URL you must redirect your customer to in order to authenticate. */ + url?: string + } + /** SetupIntentPaymentMethodOptions */ + setup_intent_payment_method_options: { + card?: definitions['setup_intent_payment_method_options_card'] + } + /** setup_intent_payment_method_options_card */ + setup_intent_payment_method_options_card: { + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string} + */ + request_three_d_secure?: 'any' | 'automatic' | 'challenge_only' + } + /** Shipping */ + shipping: { + address?: definitions['address'] + /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ + carrier?: string + /** @description Recipient name. */ + name?: string + /** @description Recipient phone (including extension). */ + phone?: string + /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ + tracking_number?: string + } + /** ShippingMethod */ + shipping_method: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + delivery_estimate?: definitions['delivery_estimate'] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** @description Unique identifier for the object. */ + id: string + } + /** SigmaScheduledQueryRunError */ + sigma_scheduled_query_run_error: { + /** @description Information about the run failure. */ + message: string + } + /** + * SKU + * @description Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). + * SKUs describe specific product variations, taking into account any combination of: attributes, + * currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents + * the `size: large`, `color: red` version of that shirt. + * + * Can also be used to manage inventory. + * + * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + */ + sku: { + /** @description Whether the SKU is available for purchase. */ + active: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes: { [key: string]: unknown } + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + inventory: definitions['inventory'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'sku' + package_dimensions?: definitions['package_dimensions'] + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. The product must be currently active. */ + product: string + /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: number + } + /** + * Source + * @description `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ + source: { + ach_credit_transfer?: definitions['source_type_ach_credit_transfer'] + ach_debit?: definitions['source_type_ach_debit'] + alipay?: definitions['source_type_alipay'] + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. */ + amount?: number + au_becs_debit?: definitions['source_type_au_becs_debit'] + bancontact?: definitions['source_type_bancontact'] + card?: definitions['source_type_card'] + card_present?: definitions['source_type_card_present'] + /** @description The client secret of the source. Used for client-side retrieval using a publishable key. */ + client_secret: string + code_verification?: definitions['source_code_verification_flow'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. */ + currency?: string + /** @description The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. */ + customer?: string + eps?: definitions['source_type_eps'] + /** @description The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ + flow: string + giropay?: definitions['source_type_giropay'] + /** @description Unique identifier for the object. */ + id: string + ideal?: definitions['source_type_ideal'] + klarna?: definitions['source_type_klarna'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + multibanco?: definitions['source_type_multibanco'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source' + owner?: definitions['source_owner'] + p24?: definitions['source_type_p24'] + receiver?: definitions['source_receiver_flow'] + redirect?: definitions['source_redirect_flow'] + sepa_debit?: definitions['source_type_sepa_debit'] + sofort?: definitions['source_type_sofort'] + source_order?: definitions['source_order'] + /** @description Extra information about a source. This will appear on your customer's statement every time you charge the source. */ + statement_descriptor?: string + /** @description The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. */ + status: string + three_d_secure?: definitions['source_type_three_d_secure'] + /** + * @description The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + * @enum {string} + */ + type: + | 'ach_credit_transfer' + | 'ach_debit' + | 'alipay' + | 'au_becs_debit' + | 'bancontact' + | 'card' + | 'card_present' + | 'eps' + | 'giropay' + | 'ideal' + | 'klarna' + | 'multibanco' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'three_d_secure' + | 'wechat' + /** @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. */ + usage?: string + wechat?: definitions['source_type_wechat'] + } + /** SourceCodeVerificationFlow */ + source_code_verification_flow: { + /** @description The number of attempts remaining to authenticate the source object with a verification code. */ + attempts_remaining: number + /** @description The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). */ + status: string + } + /** + * SourceMandateNotification + * @description Source mandate notifications should be created when a notification related to + * a source mandate must be sent to the payer. They will trigger a webhook or + * deliver an email to the customer. + */ + source_mandate_notification: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. */ + amount?: number + bacs_debit?: definitions['source_mandate_notification_bacs_debit_data'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source_mandate_notification' + /** @description The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. */ + reason: string + sepa_debit?: definitions['source_mandate_notification_sepa_debit_data'] + source: definitions['source'] + /** @description The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ + status: string + /** @description The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. */ + type: string + } + /** SourceMandateNotificationBacsDebitData */ + source_mandate_notification_bacs_debit_data: { + /** @description Last 4 digits of the account number associated with the debit. */ + last4?: string + } + /** SourceMandateNotificationSepaDebitData */ + source_mandate_notification_sepa_debit_data: { + /** @description SEPA creditor ID. */ + creditor_identifier?: string + /** @description Last 4 digits of the account number associated with the debit. */ + last4?: string + /** @description Mandate reference associated with the debit. */ + mandate_reference?: string + } + /** SourceOrder */ + source_order: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The email address of the customer placing the order. */ + email?: string + /** @description List of items constituting the order. */ + items?: definitions['source_order_item'][] + shipping?: definitions['shipping'] + } + /** SourceOrderItem */ + source_order_item: { + /** @description The amount (price) for this order item. */ + amount?: number + /** @description This currency of this order item. Required when `amount` is present. */ + currency?: string + /** @description Human-readable description for this order item. */ + description?: string + /** @description The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ + quantity?: number + /** @description The type of this order item. Must be `sku`, `tax`, or `shipping`. */ + type?: string + } + /** SourceOwner */ + source_owner: { + address?: definitions['address'] + /** @description Owner's email address. */ + email?: string + /** @description Owner's full name. */ + name?: string + /** @description Owner's phone number (including extension). */ + phone?: string + verified_address?: definitions['address'] + /** @description Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_email?: string + /** @description Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_name?: string + /** @description Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_phone?: string + } + /** SourceReceiverFlow */ + source_receiver_flow: { + /** @description The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ + address?: string + /** @description The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. */ + amount_charged: number + /** @description The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. */ + amount_received: number + /** @description The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ + amount_returned: number + /** @description Type of refund attribute method, one of `email`, `manual`, or `none`. */ + refund_attributes_method: string + /** @description Type of refund attribute status, one of `missing`, `requested`, or `available`. */ + refund_attributes_status: string + } + /** SourceRedirectFlow */ + source_redirect_flow: { + /** @description The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. */ + failure_reason?: string + /** @description The URL you provide to redirect the customer to after they authenticated their payment. */ + return_url: string + /** @description The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). */ + status: string + /** @description The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ + url: string + } + /** + * SourceTransaction + * @description Some payment methods have no required amount that a customer must send. + * Customers can be instructed to send any amount, and it can be made up of + * multiple transactions. As such, sources can have multiple associated + * transactions. + */ + source_transaction: { + ach_credit_transfer?: definitions['source_transaction_ach_credit_transfer_data'] + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. */ + amount: number + chf_credit_transfer?: definitions['source_transaction_chf_credit_transfer_data'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + gbp_credit_transfer?: definitions['source_transaction_gbp_credit_transfer_data'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source_transaction' + paper_check?: definitions['source_transaction_paper_check_data'] + sepa_credit_transfer?: definitions['source_transaction_sepa_credit_transfer_data'] + /** @description The ID of the source this transaction is attached to. */ + source: string + /** @description The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ + status: string + /** + * @description The type of source this transaction is attached to. + * @enum {string} + */ + type: + | 'ach_credit_transfer' + | 'ach_debit' + | 'alipay' + | 'bancontact' + | 'card' + | 'card_present' + | 'eps' + | 'giropay' + | 'ideal' + | 'klarna' + | 'multibanco' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'three_d_secure' + | 'wechat' + } + /** SourceTransactionAchCreditTransferData */ + source_transaction_ach_credit_transfer_data: { + /** @description Customer data associated with the transfer. */ + customer_data?: string + /** @description Bank account fingerprint associated with the transfer. */ + fingerprint?: string + /** @description Last 4 digits of the account number associated with the transfer. */ + last4?: string + /** @description Routing number associated with the transfer. */ + routing_number?: string + } + /** SourceTransactionChfCreditTransferData */ + source_transaction_chf_credit_transfer_data: { + /** @description Reference associated with the transfer. */ + reference?: string + /** @description Sender's country address. */ + sender_address_country?: string + /** @description Sender's line 1 address. */ + sender_address_line1?: string + /** @description Sender's bank account IBAN. */ + sender_iban?: string + /** @description Sender's name. */ + sender_name?: string + } + /** SourceTransactionGbpCreditTransferData */ + source_transaction_gbp_credit_transfer_data: { + /** @description Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ + fingerprint?: string + /** @description The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. */ + funding_method?: string + /** @description Last 4 digits of sender account number associated with the transfer. */ + last4?: string + /** @description Sender entered arbitrary information about the transfer. */ + reference?: string + /** @description Sender account number associated with the transfer. */ + sender_account_number?: string + /** @description Sender name associated with the transfer. */ + sender_name?: string + /** @description Sender sort code associated with the transfer. */ + sender_sort_code?: string + } + /** SourceTransactionPaperCheckData */ + source_transaction_paper_check_data: { + /** @description Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ + available_at?: string + /** @description Comma-separated list of invoice IDs associated with the paper check. */ + invoices?: string + } + /** SourceTransactionSepaCreditTransferData */ + source_transaction_sepa_credit_transfer_data: { + /** @description Reference associated with the transfer. */ + reference?: string + /** @description Sender's bank account IBAN. */ + sender_iban?: string + /** @description Sender's name. */ + sender_name?: string + } + source_type_ach_credit_transfer: { + account_number?: string + bank_name?: string + fingerprint?: string + refund_account_holder_name?: string + refund_account_holder_type?: string + refund_routing_number?: string + routing_number?: string + swift_code?: string + } + source_type_ach_debit: { + bank_name?: string + country?: string + fingerprint?: string + last4?: string + routing_number?: string + type?: string + } + source_type_alipay: { + data_string?: string + native_url?: string + statement_descriptor?: string + } + source_type_au_becs_debit: { + bsb_number?: string + fingerprint?: string + last4?: string + } + source_type_bancontact: { + bank_code?: string + bank_name?: string + bic?: string + iban_last4?: string + preferred_language?: string + statement_descriptor?: string + } + source_type_card: { + address_line1_check?: string + address_zip_check?: string + brand?: string + country?: string + cvc_check?: string + dynamic_last4?: string + exp_month?: number + exp_year?: number + fingerprint?: string + funding?: string + last4?: string + name?: string + three_d_secure?: string + tokenization_method?: string + } + source_type_card_present: { + application_cryptogram?: string + application_preferred_name?: string + authorization_code?: string + authorization_response_code?: string + brand?: string + country?: string + cvm_type?: string + data_type?: string + dedicated_file_name?: string + emv_auth_data?: string + evidence_customer_signature?: string + evidence_transaction_certificate?: string + exp_month?: number + exp_year?: number + fingerprint?: string + funding?: string + last4?: string + pos_device_id?: string + pos_entry_mode?: string + read_method?: string + reader?: string + terminal_verification_results?: string + transaction_status_information?: string + } + source_type_eps: { + reference?: string + statement_descriptor?: string + } + source_type_giropay: { + bank_code?: string + bank_name?: string + bic?: string + statement_descriptor?: string + } + source_type_ideal: { + bank?: string + bic?: string + iban_last4?: string + statement_descriptor?: string + } + source_type_klarna: { + background_image_url?: string + client_token?: string + first_name?: string + last_name?: string + locale?: string + logo_url?: string + page_title?: string + pay_later_asset_urls_descriptive?: string + pay_later_asset_urls_standard?: string + pay_later_name?: string + pay_later_redirect_url?: string + pay_now_asset_urls_descriptive?: string + pay_now_asset_urls_standard?: string + pay_now_name?: string + pay_now_redirect_url?: string + pay_over_time_asset_urls_descriptive?: string + pay_over_time_asset_urls_standard?: string + pay_over_time_name?: string + pay_over_time_redirect_url?: string + payment_method_categories?: string + purchase_country?: string + purchase_type?: string + redirect_url?: string + shipping_first_name?: string + shipping_last_name?: string + } + source_type_multibanco: { + entity?: string + reference?: string + refund_account_holder_address_city?: string + refund_account_holder_address_country?: string + refund_account_holder_address_line1?: string + refund_account_holder_address_line2?: string + refund_account_holder_address_postal_code?: string + refund_account_holder_address_state?: string + refund_account_holder_name?: string + refund_iban?: string + } + source_type_p24: { + reference?: string + } + source_type_sepa_debit: { + bank_code?: string + branch_code?: string + country?: string + fingerprint?: string + last4?: string + mandate_reference?: string + mandate_url?: string + } + source_type_sofort: { + bank_code?: string + bank_name?: string + bic?: string + country?: string + iban_last4?: string + preferred_language?: string + statement_descriptor?: string + } + source_type_three_d_secure: { + address_line1_check?: string + address_zip_check?: string + authenticated?: boolean + brand?: string + card?: string + country?: string + customer?: string + cvc_check?: string + dynamic_last4?: string + exp_month?: number + exp_year?: number + fingerprint?: string + funding?: string + last4?: string + name?: string + three_d_secure?: string + tokenization_method?: string + } + source_type_wechat: { + prepay_id?: string + qr_code_url?: string + statement_descriptor?: string + } + /** StatusTransitions */ + status_transitions: { + /** @description The time that the order was canceled. */ + canceled?: number + /** @description The time that the order was fulfilled. */ + fulfiled?: number + /** @description The time that the order was paid. */ + paid?: number + /** @description The time that the order was returned. */ + returned?: number + } + /** + * Subscription + * @description Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + */ + subscription: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ + application_fee_percent?: number + /** @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ + billing_cycle_anchor: number + billing_thresholds?: definitions['subscription_billing_thresholds'] + /** @description A date in the future at which the subscription will automatically get canceled */ + cancel_at?: number + /** @description If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. */ + cancel_at_period_end: boolean + /** @description If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will still reflect the date of the initial cancellation request, not the end of the subscription period when the subscription is automatically moved to a canceled state. */ + canceled_at?: number + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. */ + current_period_end: number + /** @description Start of the current period that the subscription has been invoiced for. */ + current_period_start: number + /** @description ID of the customer who owns the subscription. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: definitions['tax_rate'][] + discount?: definitions['discount'] + /** @description If the subscription has ended, the date the subscription ended. */ + ended_at?: number + /** @description Unique identifier for the object. */ + id: string + /** + * SubscriptionItemList + * @description List of subscription items, each with an attached plan. + */ + items: { + /** @description Details about each object. */ + data: definitions['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description The most recent invoice this subscription has generated. */ + latest_invoice?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** @description Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. */ + next_pending_invoice_item_invoice?: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription' + pause_collection?: definitions['subscriptions_resource_pause_collection'] + pending_invoice_item_interval?: definitions['subscription_pending_invoice_item_interval'] + /** @description You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). */ + pending_setup_intent?: string + pending_update?: definitions['subscriptions_resource_pending_update'] + plan?: definitions['plan'] + /** @description The quantity of the plan to which the customer is subscribed. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. Only set if the subscription contains a single plan. */ + quantity?: number + /** @description The schedule attached to the subscription */ + schedule?: string + /** @description Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ + start_date: number + /** + * @description Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + * @enum {string} + */ + status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer. */ + tax_percent?: number + /** @description If the subscription has a trial, the end of that trial. */ + trial_end?: number + /** @description If the subscription has a trial, the beginning of that trial. */ + trial_start?: number + } + /** SubscriptionBillingThresholds */ + subscription_billing_thresholds: { + /** @description Monetary threshold that triggers the subscription to create an invoice */ + amount_gte?: number + /** @description Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. */ + reset_billing_cycle_anchor?: boolean + } + /** + * SubscriptionItem + * @description Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ + subscription_item: { + billing_thresholds?: definitions['subscription_item_billing_thresholds'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_item' + plan: definitions['plan'] + /** @description The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ + quantity?: number + /** @description The `subscription` this `subscription_item` belongs to. */ + subscription: string + /** @description The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. */ + tax_rates?: definitions['tax_rate'][] + } + /** SubscriptionItemBillingThresholds */ + subscription_item_billing_thresholds: { + /** @description Usage threshold that triggers the subscription to create an invoice */ + usage_gte?: number + } + /** SubscriptionPendingInvoiceItemInterval */ + subscription_pending_invoice_item_interval: { + /** + * @description Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count: number + } + /** + * SubscriptionSchedule + * @description A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ + subscription_schedule: { + /** @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. */ + canceled_at?: number + /** @description Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. */ + completed_at?: number + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + current_phase?: definitions['subscription_schedule_current_phase'] + /** @description ID of the customer who owns the subscription schedule. */ + customer: string + default_settings: definitions['subscription_schedules_resource_default_settings'] + /** + * @description Behavior of the subscription schedule and underlying subscription when it ends. + * @enum {string} + */ + end_behavior: 'cancel' | 'none' | 'release' | 'renew' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_schedule' + /** @description Configuration for the subscription schedule's phases. */ + phases: definitions['subscription_schedule_phase_configuration'][] + /** @description Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. */ + released_at?: number + /** @description ID of the subscription once managed by the subscription schedule (if it is released). */ + released_subscription?: string + /** + * @description The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + * @enum {string} + */ + status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' + /** @description ID of the subscription managed by the subscription schedule. */ + subscription?: string + } + /** + * SubscriptionScheduleConfigurationItem + * @description A phase item describes the plan and quantity of a phase. + */ + subscription_schedule_configuration_item: { + billing_thresholds?: definitions['subscription_item_billing_thresholds'] + /** @description ID of the plan to which the customer should be subscribed. */ + plan: string + /** @description Quantity of the plan to which the customer should be subscribed. */ + quantity?: number + /** @description The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. */ + tax_rates?: definitions['tax_rate'][] + } + /** SubscriptionScheduleCurrentPhase */ + subscription_schedule_current_phase: { + /** @description The end of this phase of the subscription schedule. */ + end_date: number + /** @description The start of this phase of the subscription schedule. */ + start_date: number + } + /** + * SubscriptionSchedulePhaseConfiguration + * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ + subscription_schedule_phase_configuration: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ + application_fee_percent?: number + billing_thresholds?: definitions['subscription_billing_thresholds'] + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description ID of the coupon to use during this phase of the subscription schedule. */ + coupon?: string + /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ + default_tax_rates?: definitions['tax_rate'][] + /** @description The end of this phase of the subscription schedule. */ + end_date: number + invoice_settings?: definitions['invoice_setting_subscription_schedule_setting'] + /** @description Plans to subscribe during this phase of the subscription schedule. */ + plans: definitions['subscription_schedule_configuration_item'][] + /** + * @description Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description The start of this phase of the subscription schedule. */ + start_date: number + /** @description If provided, each invoice created during this phase of the subscription schedule will apply the tax rate, increasing the amount billed to the customer. */ + tax_percent?: number + /** @description When the trial ends within the phase. */ + trial_end?: number + } + /** SubscriptionSchedulesResourceDefaultSettings */ + subscription_schedules_resource_default_settings: { + billing_thresholds?: definitions['subscription_billing_thresholds'] + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + invoice_settings?: definitions['invoice_setting_subscription_schedule_setting'] + } + /** + * SubscriptionsResourcePauseCollection + * @description The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ + subscriptions_resource_pause_collection: { + /** + * @description The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + * @enum {string} + */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** @description The time after which the subscription will resume collecting payments. */ + resumes_at?: number + } + /** + * SubscriptionsResourcePendingUpdate + * @description Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ + subscriptions_resource_pending_update: { + /** @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ + billing_cycle_anchor?: number + /** @description The point after which the changes reflected by this update will be discarded and no longer applied. */ + expires_at: number + /** @description List of subscription items, each with an attached plan, that will be set if the update is applied. */ + subscription_items?: definitions['subscription_item'][] + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. */ + trial_end?: number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ + trial_from_plan?: boolean + } + /** TaxDeductedAtSource */ + tax_deducted_at_source: { + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_deducted_at_source' + /** @description The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_end: number + /** @description The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_start: number + /** @description The TAN that was supplied to Stripe when TDS was assessed */ + tax_deduction_account_number: string + } + /** + * tax_id + * @description You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). + * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + * + * Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + */ + tax_id: { + /** @description Two-letter ISO code representing the country of the tax ID. */ + country?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description ID of the customer. */ + customer: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_id' + /** + * @description Type of the tax ID, one of `au_abn`, `ca_bn`, `ca_qst`, `ch_vat`, `es_cif`, `eu_vat`, `hk_br`, `in_gst`, `jp_cn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @enum {string} + */ + type: + | 'au_abn' + | 'ca_bn' + | 'ca_qst' + | 'ch_vat' + | 'es_cif' + | 'eu_vat' + | 'hk_br' + | 'in_gst' + | 'jp_cn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description Value of the tax ID. */ + value: string + verification: definitions['tax_id_verification'] + } + /** tax_id_verification */ + tax_id_verification: { + /** + * @description Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + * @enum {string} + */ + status: 'pending' | 'unavailable' | 'unverified' | 'verified' + /** @description Verified address. */ + verified_address?: string + /** @description Verified name. */ + verified_name?: string + } + /** + * TaxRate + * @description Tax rates can be applied to invoices and subscriptions to collect tax. + * + * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). + */ + tax_rate: { + /** @description Defaults to `true`. When set to `false`, this tax rate cannot be applied to objects in the API, but will still be applied to subscriptions and invoices that already have it set. */ + active: boolean + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. */ + display_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. */ + jurisdiction?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_rate' + /** @description This represents the tax rate percent out of 100. */ + percentage: number + } + /** + * TerminalConnectionToken + * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet Management](https://stripe.com/docs/terminal/readers/fleet-management#create). + */ + 'terminal.connection_token': { + /** @description The id of the location that this connection token is scoped to. */ + location?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.connection_token' + /** @description Your application should pass this token to the Stripe Terminal SDK. */ + secret: string + } + /** + * TerminalLocationLocation + * @description A Location represents a grouping of readers. + * + * Related guide: [Fleet Management](https://stripe.com/docs/terminal/readers/fleet-management#create). + */ + 'terminal.location': { + address: definitions['address'] + /** @description The display name of the location. */ + display_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.location' + } + /** + * TerminalReaderReader + * @description A Reader represents a physical device for accepting payment details. + * + * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/readers/connecting). + */ + 'terminal.reader': { + /** @description The current software version of the reader. */ + device_sw_version?: string + /** + * @description Type of reader, one of `bbpos_chipper2x` or `verifone_P400`. + * @enum {string} + */ + device_type: 'bbpos_chipper2x' | 'verifone_P400' + /** @description Unique identifier for the object. */ + id: string + /** @description The local IP address of the reader. */ + ip_address?: string + /** @description Custom label given to the reader for easier identification. */ + label: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The location identifier of the reader. */ + location?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.reader' + /** @description Serial number of the reader. */ + serial_number: string + /** @description The networking status of the reader. */ + status?: string + } + /** + * ThreeDSecure + * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` + * object. Once the object has been created, you can use it to authenticate the + * cardholder and create a charge. + */ + three_d_secure: { + /** @description Amount of the charge that you will create when authentication completes. */ + amount: number + /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ + authenticated: boolean + card: definitions['card'] + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'three_d_secure' + /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ + redirect_url?: string + /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ + status: string + } + /** three_d_secure_details */ + three_d_secure_details: { + /** @description Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled. */ + authenticated?: boolean + /** @description Whether or not 3D Secure succeeded. */ + succeeded?: boolean + /** @description The version of 3D Secure that was used for this payment. */ + version: string + } + /** three_d_secure_usage */ + three_d_secure_usage: { + /** @description Whether 3D Secure is supported on this card. */ + supported: boolean + } + /** + * Token + * @description Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. You should use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * client-side. This ensures that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you cannot use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. Keep in mind that if + * your integration uses this method, you are responsible for any PCI compliance + * that may be required, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information is not sent directly to + * Stripe, so we cannot determine how it is handled or stored. + * + * Tokens cannot be stored or used more than once. To store card or bank account + * information for later use, you can create [Customer](https://stripe.com/docs/api#customers) + * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * supports only integrations that use client-side tokenization. + * + * Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) + */ + token: { + bank_account?: definitions['bank_account'] + card?: definitions['card'] + /** @description IP address of the client that generated the token. */ + client_ip?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'token' + /** @description Type of the token: `account`, `bank_account`, `card`, or `pii`. */ + type: string + /** @description Whether this token has already been used (tokens can be used only once). */ + used: boolean + } + /** + * Topup + * @description To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). + */ + topup: { + /** @description Amount transferred. */ + amount: number + /** @description ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. */ + balance_transaction?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. */ + expected_availability_date?: number + /** @description Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ + failure_code?: string + /** @description Message to user further explaining reason for top-up failure if available. */ + failure_message?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'topup' + source: definitions['source'] + /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ + statement_descriptor?: string + /** + * @description The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded' + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string + } + /** + * Transfer + * @description A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). + */ + transfer: { + /** @description Amount in %s to be transferred. */ + amount: number + /** @description Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ + amount_reversed: number + /** @description Balance transaction that describes the impact of this transfer on your account balance. */ + balance_transaction?: string + /** @description Time that this record of the transfer was first created. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description ID of the Stripe account the transfer was sent to. */ + destination?: string + /** @description If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ + destination_payment?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'transfer' + /** + * TransferReversalList + * @description A list of reversals that have been applied to the transfer. + */ + reversals: { + /** @description Details about each object. */ + data: definitions['transfer_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ + reversed: boolean + /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ + source_transaction?: string + /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ + source_type?: string + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + /** transfer_data */ + transfer_data: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** + * @description The account (if any) the payment will be attributed to for tax + * reporting, and where funds from the payment will be transferred to upon + * payment success. + */ + destination: string + } + /** + * TransferReversal + * @description [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). + */ + transfer_reversal: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Linked payment refund for the transfer reversal. */ + destination_payment_refund?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'transfer_reversal' + /** @description ID of the refund responsible for the transfer reversal. */ + source_refund?: string + /** @description ID of the transfer that was reversed. */ + transfer: string + } + /** TransferSchedule */ + transfer_schedule: { + /** @description The number of days charges for the account will be held before being paid out. */ + delay_days: number + /** @description How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ + interval: string + /** @description The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. */ + monthly_anchor?: number + /** @description The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ + weekly_anchor?: string + } + /** TransformUsage */ + transform_usage: { + /** @description Divide usage by this number. */ + divide_by: number + /** + * @description After division, either round the result `up` or `down`. + * @enum {string} + */ + round: 'down' | 'up' + } + /** + * UsageRecord + * @description Usage records allow you to report customer usage and metrics to Stripe for + * metered billing of subscription plans. + * + * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). + */ + usage_record: { + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'usage_record' + /** @description The usage quantity for the specified date. */ + quantity: number + /** @description The ID of the subscription item this usage record contains data for. */ + subscription_item: string + /** @description The timestamp when this usage occurred. */ + timestamp: number + } + /** UsageRecordSummary */ + usage_record_summary: { + /** @description Unique identifier for the object. */ + id: string + /** @description The invoice in which this usage period has been billed for. */ + invoice?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'usage_record_summary' + period: definitions['period'] + /** @description The ID of the subscription item this summary is describing. */ + subscription_item: string + /** @description The total usage within this usage period. */ + total_usage: number + } + /** + * NotificationWebhookEndpoint + * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + */ + webhook_endpoint: { + /** @description The API version events are rendered as for this webhook endpoint. */ + api_version?: string + /** @description The ID of the associated Connect application. */ + application?: string + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description An optional description of what the wehbook is used for. */ + description?: string + /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ + enabled_events: string[] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: unknown } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'webhook_endpoint' + /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ + secret?: string + /** @description The status of the webhook. It can be `enabled` or `disabled`. */ + status: string + /** @description The URL of the webhook endpoint. */ + url: string + } +} + +export interface operations { + /**

Initiate 3D Secure authentication.

*/ + Post3dSecure: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Amount of the charge that you will create when authentication completes. */ + amount: number + /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ + card?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer associated with this 3D secure authentication. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ + return_url: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['three_d_secure'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a 3D Secure object.

*/ + Get3dSecureThreeDSecure: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + three_d_secure: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['three_d_secure'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an account.

*/ + GetAccount: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccount: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + support_email?: string + support_phone?: string + support_url?: string + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * company_specs + * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + phone?: string + /** @enum {string} */ + structure?: + | '' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** @description Email address of the account representative. For Standard accounts, this is used to ask them to claim their Stripe account. For Custom accounts, this only makes the account easier to identify to platforms; Stripe does not email the account representative. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: unknown + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: unknown + phone?: string + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ + requested_capabilities?: ( + | 'au_becs_debit_payments' + | 'card_issuing' + | 'card_payments' + | 'jcb_payments' + | 'legacy_payments' + | 'tax_reporting_us_1099_k' + | 'tax_reporting_us_1099_misc' + | 'transfers' + )[] + /** + * settings_specs + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: unknown + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + date?: number + ip?: string + user_agent?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

With Connect, you can delete Custom or Express accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + DeleteAccount: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + account?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect their user to in order to take them through the Connect Onboarding flow.

*/ + PostAccountLinks: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The identifier of the account to create an account link for. */ + account: string + /** + * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. + * @enum {string} + */ + collect?: 'currently_due' | 'eventually_due' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL that the user will be redirected to if the account link is no longer valid. */ + failure_url: string + /** @description The URL that the user will be redirected to upon leaving or completing the linked flow successfully. */ + success_url: string + /** + * @description The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`. + * @enum {string} + */ + type: 'custom_account_update' | 'custom_account_verification' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountBankAccounts: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountBankAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountBankAccountsId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountBankAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + GetAccountCapabilities: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['capability'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves information about the specified Account Capability.

*/ + GetAccountCapabilitiesCapability: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + capability: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['capability'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing Account Capability.

*/ + PostAccountCapabilitiesCapability: { + parameters: { + path: { + capability: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ + requested?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['capability'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List external accounts for an account.

*/ + GetAccountExternalAccounts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: definitions['bank_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountExternalAccounts: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountExternalAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountExternalAccountsId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountExternalAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + PostAccountLoginLinks: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + account: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['login_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Invalidates all sessions for a light account, for a platform to use during platform logout.

+ * + *

You may only log out Express accounts connected to your platform.

+ */ + PutAccountLogout: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + account: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['light_account_logout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountPeople: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new person.

*/ + PostAccountPeople: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountPeoplePerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing person.

*/ + PostAccountPeoplePerson: { + parameters: { + path: { + person: string + } + body: { + /** Body parameters for the request. */ + payload?: { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountPeoplePerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountPersons: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new person.

*/ + PostAccountPersons: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountPersonsPerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing person.

*/ + PostAccountPersonsPerson: { + parameters: { + path: { + person: string + } + body: { + /** Body parameters for the request. */ + payload?: { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountPersonsPerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ + GetAccounts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

With Connect, you can create Stripe accounts for your users. + * To do this, you’ll first need to register your platform.

+ * + *

For Standard accounts, parameters other than country, email, and type + * are used to prefill the account application that we ask the account holder to complete.

+ */ + PostAccounts: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + support_email?: string + support_phone?: string + support_url?: string + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * company_specs + * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + phone?: string + /** @enum {string} */ + structure?: + | '' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + country?: string + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** @description The email address of the account holder. For Custom accounts, this is only to make the account easier to identify to you: Stripe will never directly email your users. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: unknown + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: unknown + phone?: string + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ + requested_capabilities?: ( + | 'au_becs_debit_payments' + | 'card_issuing' + | 'card_payments' + | 'jcb_payments' + | 'legacy_payments' + | 'tax_reporting_us_1099_k' + | 'tax_reporting_us_1099_misc' + | 'transfers' + )[] + /** + * settings_specs + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: unknown + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + date?: number + ip?: string + user_agent?: string + } + /** + * @description The type of Stripe account to create. Currently must be `custom`, as only [Custom accounts](https://stripe.com/docs/connect/custom-accounts) may be created via the API. + * @enum {string} + */ + type?: 'custom' | 'express' | 'standard' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an account.

*/ + GetAccountsAccount: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccountsAccount: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + support_email?: string + support_phone?: string + support_url?: string + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * company_specs + * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + phone?: string + /** @enum {string} */ + structure?: + | '' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** @description Email address of the account representative. For Standard accounts, this is used to ask them to claim their Stripe account. For Custom accounts, this only makes the account easier to identify to platforms; Stripe does not email the account representative. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: unknown + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: unknown + phone?: string + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ + requested_capabilities?: ( + | 'au_becs_debit_payments' + | 'card_issuing' + | 'card_payments' + | 'jcb_payments' + | 'legacy_payments' + | 'tax_reporting_us_1099_k' + | 'tax_reporting_us_1099_misc' + | 'transfers' + )[] + /** + * settings_specs + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: unknown + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + date?: number + ip?: string + user_agent?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

With Connect, you can delete Custom or Express accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + DeleteAccountsAccount: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountsAccountBankAccounts: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountBankAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountsAccountBankAccountsId: { + parameters: { + path: { + account: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountBankAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + GetAccountsAccountCapabilities: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['capability'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves information about the specified Account Capability.

*/ + GetAccountsAccountCapabilitiesCapability: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + capability: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['capability'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing Account Capability.

*/ + PostAccountsAccountCapabilitiesCapability: { + parameters: { + path: { + account: string + capability: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ + requested?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['capability'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List external accounts for an account.

*/ + GetAccountsAccountExternalAccounts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: definitions['bank_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountsAccountExternalAccounts: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountExternalAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountsAccountExternalAccountsId: { + parameters: { + path: { + account: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountExternalAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_external_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + PostAccountsAccountLoginLinks: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['login_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Invalidates all sessions for a light account, for a platform to use during platform logout.

+ * + *

You may only log out Express accounts connected to your platform.

+ */ + PutAccountsAccountLogout: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['light_account_logout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountsAccountPeople: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new person.

*/ + PostAccountsAccountPeople: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountsAccountPeoplePerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing person.

*/ + PostAccountsAccountPeoplePerson: { + parameters: { + path: { + account: string + person: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountsAccountPeoplePerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountsAccountPersons: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new person.

*/ + PostAccountsAccountPersons: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountsAccountPersonsPerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing person.

*/ + PostAccountsAccountPersonsPerson: { + parameters: { + path: { + account: string + person: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: unknown + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + /** @description The last 4 digits of the person's social security number. */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountsAccountPersonsPerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_person'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

With Connect, you may flag accounts as suspicious.

+ * + *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

+ */ + PostAccountsAccountReject: { + parameters: { + path: { + account: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ + reason: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List apple pay domains.

*/ + GetApplePayDomains: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + domain_name?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['apple_pay_domain'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create an apple pay domain.

*/ + PostApplePayDomains: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + domain_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['apple_pay_domain'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve an apple pay domain.

*/ + GetApplePayDomainsDomain: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + domain: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['apple_pay_domain'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete an apple pay domain.

*/ + DeleteApplePayDomainsDomain: { + parameters: { + path: { + domain: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_apple_pay_domain'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ + GetApplicationFees: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return application fees for the charge specified by this charge ID. */ + charge?: string + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['application_fee'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ + GetApplicationFeesFeeRefundsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + fee: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['fee_refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostApplicationFeesFeeRefundsId: { + parameters: { + path: { + fee: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['fee_refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ + GetApplicationFeesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['application_fee'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + PostApplicationFeesIdRefund: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + amount?: number + directive?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['application_fee'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + GetApplicationFeesIdRefunds: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['fee_refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected.

+ * + *

You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded.

+ * + *

Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee.

+ */ + PostApplicationFeesIdRefunds: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['fee_refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see Accounting for negative balances.

+ */ + GetBalance: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['balance'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + GetBalanceTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + available_on?: number + created?: number + /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout?: string + /** Only returns the original transaction. */ + source?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only returns transactions of the given type. One of: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + GetBalanceTransactionsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['balance_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + GetBalanceHistory: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + available_on?: number + created?: number + /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout?: string + /** Only returns the original transaction. */ + source?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only returns transactions of the given type. One of: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + GetBalanceHistoryId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['balance_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a session of the self-serve Portal.

*/ + PostBillingPortalSessions: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The ID of an existing customer. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL to which Stripe should send customers when they click on the link to return to your website. This field is required if a default return URL has not been configured for the portal. */ + return_url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['billing_portal.session'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ + GetBitcoinReceivers: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Filter for active receivers. */ + active?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Filter for filled receivers. */ + filled?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Filter for receivers with uncaptured funds. */ + uncaptured_funds?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['bitcoin_receiver'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the Bitcoin receiver with the given ID.

*/ + GetBitcoinReceiversId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bitcoin_receiver'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List bitcoin transacitons for a given receiver.

*/ + GetBitcoinReceiversReceiverTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return transactions for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + receiver: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List bitcoin transacitons for a given receiver.

*/ + GetBitcoinTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return transactions for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + receiver?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ + GetCharges: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** Only return charges for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return charges for this transfer group. */ + transfer_group?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['charge'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ + PostCharges: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + application_fee?: number + /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + application_fee_amount?: number + /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire in _seven days_. For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ + capture?: boolean + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: unknown + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The ID of an existing customer that will be charged in this request. */ + customer?: string + /** @description An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ + description?: string + /** destination_specs */ + destination?: { + account: string + amount?: number + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ + on_behalf_of?: string + /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** + * shipping + * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. + */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. */ + source?: string + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_specs + * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['charge'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ + GetChargesCharge: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['charge'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostChargesCharge: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. */ + customer?: string + /** @description An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fraud_details + * @description A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + */ + fraud_details?: { + /** @enum {string} */ + user_report: '' | 'fraudulent' | 'safe' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. */ + receipt_email?: string + /** + * shipping + * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. + */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['charge'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

+ * + *

Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

+ */ + PostChargesChargeCapture: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ + amount?: number + /** @description An application fee to add on to this charge. */ + application_fee?: number + /** @description An application fee amount to add on to this charge, which must be less than or equal to the original amount. */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. */ + receipt_email?: string + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_specs + * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + transfer_data?: { + amount?: number + } + /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['charge'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a dispute for a specified charge.

*/ + GetChargesChargeDispute: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + PostChargesChargeDispute: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string + billing_address?: string + cancellation_policy?: string + cancellation_policy_disclosure?: string + cancellation_rebuttal?: string + customer_communication?: string + customer_email_address?: string + customer_name?: string + customer_purchase_ip?: string + customer_signature?: string + duplicate_charge_documentation?: string + duplicate_charge_explanation?: string + duplicate_charge_id?: string + product_description?: string + receipt?: string + refund_policy?: string + refund_policy_disclosure?: string + refund_refusal_explanation?: string + service_date?: string + service_documentation?: string + shipping_address?: string + shipping_carrier?: string + shipping_date?: string + shipping_documentation?: string + shipping_tracking_number?: string + uncategorized_file?: string + uncategorized_text?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + PostChargesChargeDisputeClose: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

+ * + *

Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged.

+ * + *

You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded.

+ * + *

Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge.

+ */ + PostChargesChargeRefund: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + metadata?: unknown + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['charge'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + GetChargesChargeRefunds: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create a refund.

*/ + PostChargesChargeRefunds: { + parameters: { + path: { + charge: string + } + body: { + /** Body parameters for the request. */ + payload?: { + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetChargesChargeRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + charge: string + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Update a specified refund.

*/ + PostChargesChargeRefundsRefund: { + parameters: { + path: { + charge: string + refund: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Checkout Sessions.

*/ + GetCheckoutSessions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return the Checkout Session for the PaymentIntent specified. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return the Checkout Session for the subscription specified. */ + subscription?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['checkout.session'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a Session object.

*/ + PostCheckoutSessions: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** + * @description Specify whether Checkout should collect the customer's billing address. + * @enum {string} + */ + billing_address_collection?: 'auto' | 'required' + /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string + /** + * @description A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * session with your internal systems. + */ + client_reference_id?: string + /** + * @description ID of an existing customer, if one exists. The email stored on the + * customer will be used to prefill the email field on the Checkout page. + * If the customer changes their email on the Checkout page, the Customer + * object will be updated with the new email. + * If blank for Checkout Sessions in `payment` or `subscription` mode, + * Checkout will create a new customer object based on information + * provided during the session. + */ + customer?: string + /** + * @description If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once a session is + * complete, use the `customer` field. + */ + customer_email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description A list of items the customer is purchasing. Use this parameter for + * one-time payments or adding invoice line items to a subscription (used + * in conjunction with `subscription_data`). + */ + line_items?: { + amount?: number + currency?: string + description?: string + images?: string[] + name?: string + quantity: number + tax_rates?: string[] + }[] + /** + * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + * @enum {string} + */ + locale?: 'auto' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'it' | 'ja' | 'ms' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'sv' | 'zh' + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** + * @description The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. + * @enum {string} + */ + mode?: 'payment' | 'setup' | 'subscription' + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + application_fee_amount?: number + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + description?: string + metadata?: { [key: string]: unknown } + on_behalf_of?: string + receipt_email?: string + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + /** shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data_params */ + transfer_data?: { + amount?: number + destination: string + } + } + /** @description A list of the types of payment methods (e.g., card) this Checkout session can accept. */ + payment_method_types: ('card' | 'fpx' | 'ideal')[] + /** + * setup_intent_data_param + * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + */ + setup_intent_data?: { + description?: string + metadata?: { [key: string]: unknown } + on_behalf_of?: string + } + /** + * shipping_address_collection_params + * @description When set, provides configuration for Checkout to collect a shipping address from a customer. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** + * @description Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + */ + subscription_data?: { + application_fee_percent?: number + coupon?: string + default_tax_rates?: string[] + items?: { + plan: string + quantity?: number + tax_rates?: string[] + }[] + metadata?: { [key: string]: unknown } + trial_end?: number + trial_from_plan?: boolean + trial_period_days?: number + } + /** + * @description The URL to which Stripe should send customers when payment or setup + * is complete. + * If you’d like access to the Checkout Session for the successful + * payment, read more about it in our guide on [fulfilling your payments + * with webhooks](/docs/payments/checkout/fulfillment#webhooks). + */ + success_url: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['checkout.session'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a Session object.

*/ + GetCheckoutSessionsSession: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['checkout.session'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Lists all Country Spec objects available in the API.

*/ + GetCountrySpecs: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['country_spec'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a Country Spec for a given Country code.

*/ + GetCountrySpecsCountry: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + country: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['country_spec'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your coupons.

*/ + GetCoupons: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['coupon'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

+ * + *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

+ */ + PostCoupons: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ + amount_off?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ + currency?: string + /** + * @description Specifies how long the discount will be in effect. Can be `forever`, `once`, or `repeating`. + * @enum {string} + */ + duration: 'forever' | 'once' | 'repeating' + /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ + duration_in_months?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific code you'll give to your customer to use when signing up (e.g., `FALL25OFF`). If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ + id?: string + /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ + max_redemptions?: number + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string + /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ + percent_off?: number + /** @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. */ + redeem_by?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['coupon'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the coupon with the given ID.

*/ + GetCouponsCoupon: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + coupon: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['coupon'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ + PostCouponsCoupon: { + parameters: { + path: { + coupon: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['coupon'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ + DeleteCouponsCoupon: { + parameters: { + path: { + coupon: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_coupon'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of credit notes.

*/ + GetCreditNotes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return credit notes for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return credit notes for the invoice specified by this invoice ID. */ + invoice?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['credit_note'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + * in any combination of the following:

+ * + *
    + *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • + *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • + *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • + *
+ * + *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ * + *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount + * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

+ */ + PostCreditNotes: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The integer amount in **%s** representing the total amount of the credit note. */ + amount?: number + /** @description The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the invoice. */ + invoice: string + /** @description Line items that make up the credit note. */ + lines?: { + amount?: number + description?: string + invoice_line_item?: string + quantity?: number + tax_rates?: string[] + /** @enum {string} */ + type: 'custom_line_item' | 'invoice_line_item' + unit_amount?: number + unit_amount_decimal?: string + }[] + /** @description The credit note's memo appears on the credit note PDF. */ + memo?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The integer amount in **%s** representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** + * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + * @enum {string} + */ + reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' + /** @description ID of an existing refund to link this credit note to. */ + refund?: string + /** @description The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['credit_note'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetCreditNotesCreditNoteLines: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + credit_note: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the credit note object with the given identifier.

*/ + GetCreditNotesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['credit_note'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing credit note.

*/ + PostCreditNotesId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Credit note memo. */ + memo?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['credit_note'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ + PostCreditNotesIdVoid: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['credit_note'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Get a preview of a credit note without creating it.

*/ + GetCreditNotesPreview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The integer amount in **%s** representing the total amount of the credit note. */ + amount?: number + /** The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** ID of the invoice. */ + invoice: string + /** Line items that make up the credit note. */ + lines?: unknown[] + /** The credit note's memo appears on the credit note PDF. */ + memo?: string + /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: string + /** The integer amount in **%s** representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason?: string + /** ID of an existing refund to link this credit note to. */ + refund?: string + /** The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['credit_note'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ + GetCreditNotesPreviewLines: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The integer amount in **%s** representing the total amount of the credit note. */ + amount?: number + /** The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** ID of the invoice. */ + invoice: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Line items that make up the credit note. */ + lines?: unknown[] + /** The credit note's memo appears on the credit note PDF. */ + memo?: string + /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: string + /** The integer amount in **%s** representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason?: string + /** ID of an existing refund to link this credit note to. */ + refund?: string + /** The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ + GetCustomers: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A filter on the list based on the customer's `email` field. The value must be a string. */ + email?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['customer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new customer object.

*/ + PostCustomers: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The customer's address. */ + address?: unknown + /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: { + name: string + value: string + }[] + default_payment_method?: string + footer?: string + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The customer's full name or business name. */ + name?: string + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number + /** @description ID of the PaymentMethod to attach to the customer */ + payment_method?: string + /** @description The customer's phone number. */ + phone?: string + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[] + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: unknown + /** + * @description The source can be a [Token](https://stripe.com/docs/api#tokens) or a [Source](https://stripe.com/docs/api#sources), as returned by [Elements](https://stripe.com/docs/elements). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer to be charged automatically for a plan that is not free. + * + * Passing `source` will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source, instead use the [card creation API](https://stripe.com/docs/api#create_card) to add the card and then the [customer update API](https://stripe.com/docs/api#update_customer) to set it as the default. + * + * Whenever you attach a card to a customer, Stripe will automatically validate the card. + */ + source?: string + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + /** @description The customer's tax IDs. */ + tax_id_data?: { + /** @enum {string} */ + type: + | 'au_abn' + | 'ca_bn' + | 'ca_qst' + | 'ch_vat' + | 'es_cif' + | 'eu_vat' + | 'hk_br' + | 'in_gst' + | 'jp_cn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.

*/ + GetCustomersCustomer: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

+ * + *

This request accepts mostly the same arguments as the customer creation call.

+ */ + PostCustomersCustomer: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The customer's address. */ + address?: unknown + /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: unknown + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description ID of Alipay account to make the customer's new default for invoice payments. */ + default_alipay_account?: string + /** @description ID of bank account to make the customer's new default for invoice payments. */ + default_bank_account?: string + /** @description ID of card to make the customer's new default for invoice payments. */ + default_card?: string + /** + * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + * + * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + * + * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + */ + default_source?: string + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: { + name: string + value: string + }[] + default_payment_method?: string + footer?: string + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The customer's full name or business name. */ + name?: string + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number + /** @description The customer's phone number. */ + phone?: string + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[] + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: unknown + /** + * @description The source can be a [Token](https://stripe.com/docs/api#tokens) or a [Source](https://stripe.com/docs/api#sources), as returned by [Elements](https://stripe.com/docs/elements). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer to be charged automatically for a plan that is not free. + * + * Passing `source` will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source, instead use the [card creation API](https://stripe.com/docs/api#create_card) to add the card and then the [customer update API](https://stripe.com/docs/api#update_customer) to set it as the default. + * + * Whenever you attach a card to a customer, Stripe will automatically validate the card. + */ + source?: string + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ + DeleteCustomersCustomer: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_customer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of transactions that updated the customer’s balance.

*/ + GetCustomersCustomerBalanceTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['customer_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates an immutable transaction that updates the customer’s balance.

*/ + PostCustomersCustomerBalanceTransactions: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** @description The integer amount in **%s** to apply to the customer's balance. Pass a negative amount to credit the customer's balance, and pass in a positive amount to debit the customer's balance. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer_balance_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a specific transaction that updated the customer’s balance.

*/ + GetCustomersCustomerBalanceTransactionsTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer_balance_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Most customer balance transaction fields are immutable, but you may update its description and metadata.

*/ + PostCustomersCustomerBalanceTransactionsTransaction: { + parameters: { + path: { + customer: string + transaction: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['customer_balance_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ + GetCustomersCustomerBankAccounts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['bank_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerBankAccounts: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: unknown + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ + GetCustomersCustomerBankAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerBankAccountsIdVerify: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

You can see a list of the cards belonging to a customer. + * Note that the 10 most recent sources are always available on the Customer object. + * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

+ */ + GetCustomersCustomerCards: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerCards: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: unknown + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ + GetCustomersCustomerCardsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['card'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerCardsId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerCardsId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['discount'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_discount'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['alipay_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ + bank_account?: unknown + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: unknown + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve a specified source for a given customer.

*/ + GetCustomersCustomerSourcesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_payment_source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerSourcesIdVerify: { + parameters: { + path: { + customer: string + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['bank_account'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ + GetCustomersCustomerSubscriptions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new subscription on an existing customer.

*/ + PostCustomersCustomerSubscriptions: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. */ + backdate_start_date?: number + /** @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: unknown + metadata?: { [key: string]: unknown } + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: unknown + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: unknown + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: unknown + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. */ + trial_period_days?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: unknown + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: unknown + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: unknown + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: unknown + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: unknown + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. */ + proration_date?: number + /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: unknown + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: unknown + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ + trial_from_plan?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['discount'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_discount'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of tax IDs for a customer.

*/ + GetCustomersCustomerTaxIds: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['tax_id'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new TaxID object for a customer.

*/ + PostCustomersCustomerTaxIds: { + parameters: { + path: { + customer: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, or `sg_gst` + * @enum {string} + */ + type: + | 'au_abn' + | 'ca_bn' + | 'ca_qst' + | 'ch_vat' + | 'es_cif' + | 'eu_vat' + | 'hk_br' + | 'in_gst' + | 'jp_cn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'us_ein' + | 'za_vat' + /** @description Value of the tax ID. */ + value: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['tax_id'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the TaxID object with the given identifier.

*/ + GetCustomersCustomerTaxIdsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['tax_id'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an existing TaxID object.

*/ + DeleteCustomersCustomerTaxIdsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_tax_id'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your disputes.

*/ + GetDisputes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return disputes associated to the charge specified by this charge ID. */ + charge?: string + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['dispute'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the dispute with the given ID.

*/ + GetDisputesDispute: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

+ * + *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

+ */ + PostDisputesDispute: { + parameters: { + path: { + dispute: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string + billing_address?: string + cancellation_policy?: string + cancellation_policy_disclosure?: string + cancellation_rebuttal?: string + customer_communication?: string + customer_email_address?: string + customer_name?: string + customer_purchase_ip?: string + customer_signature?: string + duplicate_charge_documentation?: string + duplicate_charge_explanation?: string + duplicate_charge_id?: string + product_description?: string + receipt?: string + refund_policy?: string + refund_policy_disclosure?: string + refund_refusal_explanation?: string + service_date?: string + service_documentation?: string + shipping_address?: string + shipping_carrier?: string + shipping_date?: string + shipping_documentation?: string + shipping_tracking_number?: string + uncategorized_file?: string + uncategorized_text?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

+ * + *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

+ */ + PostDisputesDisputeClose: { + parameters: { + path: { + dispute: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a short-lived API key for a given resource.

*/ + PostEphemeralKeys: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ + issuing_card?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['ephemeral_key'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Invalidates a short-lived API key for a given resource.

*/ + DeleteEphemeralKeysKey: { + parameters: { + path: { + key: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['ephemeral_key'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ + GetEvents: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ + delivery_success?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ + type?: string + /** An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ + types?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['event'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ + GetEventsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['event'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ + GetExchangeRates: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['exchange_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ + GetExchangeRatesCurrency: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + currency: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['exchange_rate'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of file links.

*/ + GetFileLinks: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Filter links by their expiration status. By default, all links are returned. */ + expired?: boolean + /** Only return links for the given file. */ + file?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['file_link'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new file link object.

*/ + PostFileLinks: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A future timestamp after which the link will no longer be usable. */ + expires_at?: number + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `pci_document`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + file: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['file_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the file link with the given ID.

*/ + GetFileLinksLink: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + link: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['file_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing file link object. Expired links can no longer be updated.

*/ + PostFileLinksLink: { + parameters: { + path: { + link: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ + expires_at?: unknown + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['file_link'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ + GetFiles: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The file purpose to filter queries by. If none is provided, files will not be filtered by purpose. */ + purpose?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['file'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

+ * + *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

+ */ + PostFiles: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ + file: string + /** + * file_link_creation_params + * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + */ + file_link_data?: { + create: boolean + expires_at?: number + metadata?: unknown + } + /** + * @description The purpose of the uploaded file. Possible values are `additional_verification`, `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `identity_document`, `pci_document`, or `tax_document_user_upload`. + * @enum {string} + */ + purpose: + | 'additional_verification' + | 'business_icon' + | 'business_logo' + | 'customer_signature' + | 'dispute_evidence' + | 'identity_document' + | 'pci_document' + | 'tax_document_user_upload' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['file'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ + GetFilesFile: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + file: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['file'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ + GetInvoiceitems: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. */ + invoice?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. */ + pending?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['invoiceitem'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates an item to be added to a draft invoice. If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ + PostInvoiceitems: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The integer amount in **%s** of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The ID of the customer who will be billed when this invoice item is billed. */ + customer: string + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ + discountable?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices. */ + invoice?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** + * period + * @description The period associated with this invoice item. + */ + period?: { + end: number + start: number + } + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number + /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ + subscription?: string + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ + tax_rates?: string[] + /** @description The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + unit_amount?: number + /** @description Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ + unit_amount_decimal?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoiceitem'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the invoice item with the given ID.

*/ + GetInvoiceitemsInvoiceitem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + invoiceitem: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoiceitem'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ + PostInvoiceitemsInvoiceitem: { + parameters: { + path: { + invoiceitem: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The integer amount in **%s** of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + amount?: number + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ + discountable?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** + * period + * @description The period associated with this invoice item. + */ + period?: { + end: number + start: number + } + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] + /** @description The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + unit_amount?: number + /** @description Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ + unit_amount_decimal?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoiceitem'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ + DeleteInvoiceitemsInvoiceitem: { + parameters: { + path: { + invoiceitem: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_invoiceitem'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ + GetInvoices: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: string + created?: number + /** Only return invoices for the customer specified by this customer ID. */ + customer?: string + due_date?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) */ + status?: string + /** Only return invoices for the subscription specified by this subscription ID. */ + subscription?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['invoice'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.

*/ + PostInvoices: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#invoices). */ + application_fee_amount?: number + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description A list of up to 4 custom fields to be displayed on the invoice. */ + custom_fields?: { + name: string + value: string + }[] + /** @description The ID of the customer who will be billed. */ + customer: string + /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string + /** @description The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. */ + due_date?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Footer to be displayed on the invoice. */ + footer?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ + statement_descriptor?: string + /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + subscription?: string + /** @description The percent tax rate applied to the invoice, represented as a decimal number. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the invoice with the given ID.

*/ + GetInvoicesInvoice: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Draft invoices are fully editable. Once an invoice is finalized, + * monetary values, as well as collection_method, become uneditable.

+ * + *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or automatically reconciling invoices, pass + * auto_advance=false.

+ */ + PostInvoicesInvoice: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#invoices). */ + application_fee_amount?: number + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ + auto_advance?: boolean + /** + * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ + custom_fields?: { + name: string + value: string + }[] + /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ + days_until_due?: number + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string + /** @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ + due_date?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Footer to be displayed on the invoice. */ + footer?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ + statement_descriptor?: string + /** @description The percent tax rate applied to the invoice, represented as a non-negative decimal number (with at most four decimal places) between 0 and 100. To unset a previously-set value, pass an empty string. This field can be updated only on `draft` invoices. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Permanently deletes a draft invoice. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized, it must be voided.

*/ + DeleteInvoicesInvoice: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ + PostInvoicesInvoiceFinalize: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetInvoicesInvoiceLines: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ + PostInvoicesInvoiceMarkUncollectible: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ + PostInvoicesInvoicePay: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + * + * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. + */ + forgive?: boolean + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. */ + paid_out_of_band?: boolean + /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ + payment_method?: string + /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ + source?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

+ * + *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

+ */ + PostInvoicesInvoiceSend: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ + PostInvoicesInvoiceVoid: { + parameters: { + path: { + invoice: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.

+ * + *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

+ * + *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

+ */ + GetInvoicesUpcoming: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ + coupon?: string + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ + customer?: string + /** List of invoice items to add or update in the upcoming invoice preview. */ + invoice_items?: unknown[] + /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule?: string + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription?: string + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ + subscription_billing_cycle_anchor?: string + /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.` */ + subscription_cancel_at?: string + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + subscription_cancel_at_period_end?: boolean + /** This simulates the subscription being canceled or expired immediately. */ + subscription_cancel_now?: boolean + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ + subscription_default_tax_rates?: string + /** List of subscription items, each with an attached plan. */ + subscription_items?: unknown[] + /** This field has been renamed to `subscription_proration_behavior`. `subscription_prorate=true` can be replaced with `subscription_proration_behavior=create_prorations` and `subscription_prorate=false` can be replaced with `subscription_proration_behavior=none`. */ + subscription_prorate?: boolean + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + */ + subscription_proration_behavior?: string + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration` cannot be set to false. */ + subscription_proration_date?: number + /** Date a subscription is intended to start (can be future or past) */ + subscription_start_date?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that tax percent. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + subscription_tax_percent?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ + subscription_trial_end?: string + /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. */ + subscription_trial_from_plan?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['invoice'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetInvoicesUpcomingLines: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ + coupon?: string + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** List of invoice items to add or update in the upcoming invoice preview. */ + invoice_items?: unknown[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription?: string + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ + subscription_billing_cycle_anchor?: string + /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.` */ + subscription_cancel_at?: string + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + subscription_cancel_at_period_end?: boolean + /** This simulates the subscription being canceled or expired immediately. */ + subscription_cancel_now?: boolean + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ + subscription_default_tax_rates?: string + /** List of subscription items, each with an attached plan. */ + subscription_items?: unknown[] + /** If previewing an update to a subscription, this decides whether the preview will show the result of applying prorations or not. If set, one of `subscription_items` or `subscription`, and one of `subscription_items` or `subscription_trial_end` are required. */ + subscription_prorate?: boolean + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + */ + subscription_proration_behavior?: string + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration` cannot be set to false. */ + subscription_proration_date?: number + /** Date a subscription is intended to start (can be future or past) */ + subscription_start_date?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that tax percent. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + subscription_tax_percent?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ + subscription_trial_end?: string + /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. */ + subscription_trial_from_plan?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of issuer fraud records.

*/ + GetIssuerFraudRecords: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return issuer fraud records for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuer_fraud_record'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the details of an issuer fraud record that has previously been created.

+ * + *

Please refer to the issuer fraud record object reference for more details.

+ */ + GetIssuerFraudRecordsIssuerFraudRecord: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + issuer_fraud_record: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuer_fraud_record'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingAuthorizations: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return issuing transactions that belong to the given card. */ + card?: string + /** Only return authorizations belonging to the given cardholder. */ + cardholder?: string + /** Only return authorizations that were created during the given date interval. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.authorization'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Authorization object.

*/ + GetIssuingAuthorizationsAuthorization: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + authorization: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.authorization'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingAuthorizationsAuthorization: { + parameters: { + path: { + authorization: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.authorization'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ + PostIssuingAuthorizationsAuthorizationApprove: { + parameters: { + path: { + authorization: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.authorization'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ + PostIssuingAuthorizationsAuthorizationDecline: { + parameters: { + path: { + authorization: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.authorization'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingCardholders: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return cardholders that were created during the given date interval. */ + created?: number + /** Only return cardholders that have the given email address. */ + email?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return cardholders that have the given phone number. */ + phone_number?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. */ + status?: string + /** Only return cardholders that have the given type. One of `individual` or `company`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.cardholder'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ + PostIssuingCardholders: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + } + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string + } + /** @description The cardholder's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number + month: number + year: number + } + first_name: string + last_name: string + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The cardholder's name. This will be printed on cards issued to them. */ + name: string + /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. */ + phone_number?: string + /** + * authorization_controls_param_v2 + * @description Spending rules that give you control over how your cardholders can make charges. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + spending_limits_currency?: string + } + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + * @enum {string} + */ + status?: 'active' | 'inactive' + /** + * @description One of `individual` or `company`. + * @enum {string} + */ + type: 'company' | 'individual' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.cardholder'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Cardholder object.

*/ + GetIssuingCardholdersCardholder: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + cardholder: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.cardholder'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingCardholdersCardholder: { + parameters: { + path: { + cardholder: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing?: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + } + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string + } + /** @description The cardholder's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number + month: number + year: number + } + first_name: string + last_name: string + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The cardholder's phone number. */ + phone_number?: string + /** + * authorization_controls_param_v2 + * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + spending_limits_currency?: string + } + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. + * @enum {string} + */ + status?: 'active' | 'inactive' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.cardholder'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingCards: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return cards belonging to the Cardholder with the provided ID. */ + cardholder?: string + /** Only return cards that were issued during the given date interval. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return cards that have the given expiration month. */ + exp_month?: number + /** Only return cards that have the given expiration year. */ + exp_year?: number + /** Only return cards that have the given last four digits. */ + last4?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ + status?: string + /** Only return cards that have the given type. One of `virtual` or `physical`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates an Issuing Card object.

*/ + PostIssuingCards: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ + cardholder?: string + /** @description The currency for the card. This currently must be `usd`. */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The card this is meant to be a replacement for (if any). */ + replacement_for?: string + /** + * @description If `replacement_for` is specified, this should indicate why that card is being replaced. + * @enum {string} + */ + replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' + /** + * shipping_specs + * @description The address where the card will be shipped. + */ + shipping?: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + name: string + /** @enum {string} */ + service?: 'express' | 'priority' | 'standard' + /** @enum {string} */ + type?: 'bulk' | 'individual' + } + /** + * authorization_controls_param + * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + } + /** + * @description Whether authorizations can be approved on this card. Defaults to `inactive`. + * @enum {string} + */ + status?: 'active' | 'inactive' + /** + * @description The type of card to issue. Possible values are `physical` or `virtual`. + * @enum {string} + */ + type: 'physical' | 'virtual' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.card'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Card object.

*/ + GetIssuingCardsCard: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + card: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.card'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingCardsCard: { + parameters: { + path: { + card: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * @description Reason why the `status` of this card is `canceled`. + * @enum {string} + */ + cancellation_reason?: 'lost' | 'stolen' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** + * authorization_controls_param + * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + } + /** + * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + * @enum {string} + */ + status?: 'active' | 'canceled' | 'inactive' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.card'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingDisputes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.dispute'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates an Issuing Dispute object.

*/ + PostIssuingDisputes: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Dispute object.

*/ + GetIssuingDisputesDispute: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingDisputesDispute: { + parameters: { + path: { + dispute: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.dispute'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingSettlements: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return issuing settlements that were created during the given date interval. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.settlement'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Settlement object.

*/ + GetIssuingSettlementsSettlement: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + settlement: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.settlement'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingSettlementsSettlement: { + parameters: { + path: { + settlement: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.settlement'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return transactions that belong to the given card. */ + card?: string + /** Only return transactions that belong to the given cardholder. */ + cardholder?: string + /** Only return transactions that were created during the given date interval. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['issuing.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an Issuing Transaction object.

*/ + GetIssuingTransactionsTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingTransactionsTransaction: { + parameters: { + path: { + transaction: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['issuing.transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a Mandate object.

*/ + GetMandatesMandate: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + mandate: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['mandate'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ + GetOrderReturns: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Date this return was created. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The order to retrieve returns for. */ + order?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['order_return'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ + GetOrderReturnsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order_return'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ + GetOrders: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Date this order was created. */ + created?: number + /** Only return orders for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return orders with the given IDs. */ + ids?: unknown[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ + status?: string + /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ + status_transitions?: string + /** Only return orders with the given upstream order IDs. */ + upstream_ids?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['order'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new order object.

*/ + PostOrders: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ + customer?: string + /** @description The email address of the customer placing the order. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of items constituting the order. An order can have up to 25 items. */ + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** + * customer_shipping + * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ + GetOrdersId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostOrdersId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ + coupon?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ + selected_shipping_method?: string + /** + * shipping_tracking_params + * @description Tracking information once the order has been fulfilled. + */ + shipping?: { + carrier: string + tracking_number: string + } + /** + * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). + * @enum {string} + */ + status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Pay an order by providing a source to create a payment.

*/ + PostOrdersIdPay: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + application_fee?: number + /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ + customer?: string + /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ + source?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ + PostOrdersIdReturns: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of items to return. */ + items?: { + amount?: number + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['order_return'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of PaymentIntents.

*/ + GetPaymentIntents: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: number + /** Only return PaymentIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['payment_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a PaymentIntent object.

+ * + *

After the PaymentIntent is created, attach a payment method and confirm + * to continue the payment. You can read more about the different payment flows + * available via the Payment Intents API here.

+ * + *

When confirm=true is used during creation, it is equivalent to creating + * and confirming the PaymentIntent in the same call. You may use any parameters + * available in the confirm API when confirm=true + * is supplied.

+ */ + PostPaymentIntents: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** + * @description The amount of the application fee (if any) that will be applied to the + * payment and transferred to the application owner's Stripe account. For + * more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + application_fee_amount?: number + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + mandate?: string + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + off_session?: unknown + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + card?: unknown + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'off_session' | 'on_session' + /** + * shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the details of a PaymentIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

+ */ + GetPaymentIntentsIntent: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates properties on a PaymentIntent object without confirming.

+ * + *

Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the payment_method will + * always require you to confirm the PaymentIntent again. If you prefer to + * update and confirm at the same time, we recommend updating properties via + * the confirm API instead.

+ */ + PostPaymentIntentsIntent: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + application_fee_amount?: unknown + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + card?: unknown + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: unknown + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status='requires_capture', the remaining amount_capturable will automatically be refunded.

+ */ + PostPaymentIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled exactly seven days after they are created.

+ * + *

Learn more about separate authorization and capture.

+ */ + PostPaymentIntentsIntentCapture: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** + * @description The amount of the application fee (if any) that will be applied to the + * payment and transferred to the application owner's Stripe account. For + * more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

+ * + *

If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the requires_action status and + * suggest additional actions via next_action. If payment fails, + * the PaymentIntent will transition to the requires_payment_method status. If + * payment succeeds, the PaymentIntent will transition to the succeeded + * status (or requires_capture, if capture_method is set to manual).

+ * + *

If the confirmation_method is automatic, payment may be attempted + * using our client SDKs + * and the PaymentIntent’s client_secret. + * After next_actions are handled by the client, no additional + * confirmation is required to complete the payment.

+ * + *

If the confirmation_method is manual, all payment attempts must be + * initiated using a secret key. + * If any actions are required for the payment, the PaymentIntent will + * return to the requires_confirmation state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. Read the expanded documentation + * to learn more about manual confirmation.

+ */ + PostPaymentIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** + * secret_key_param + * @description This hash contains details about the Mandate to create + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: unknown + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + card?: unknown + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string + /** + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: unknown + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetPaymentMethods: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The ID of the customer whose PaymentMethods will be retrieved. */ + customer: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

*/ + PostPaymentMethods: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + /** billing_details_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When creating with a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: { [key: string]: unknown } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. Required unless `payment_method` is specified (see the [Cloning PaymentMethods](https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods) guide) + * @enum {string} + */ + type?: 'au_becs_debit' | 'card' | 'fpx' | 'ideal' | 'sepa_debit' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_method'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a PaymentMethod object.

*/ + GetPaymentMethodsPaymentMethod: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_method'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + PostPaymentMethodsPaymentMethod: { + parameters: { + path: { + payment_method: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + /** billing_details_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** + * update_param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { [key: string]: unknown } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_method'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Attaches a PaymentMethod object to a Customer.

+ * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent + * or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the + * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. + * See Optimizing cards for future payments for more information about setting up future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + PostPaymentMethodsPaymentMethodAttach: { + parameters: { + path: { + payment_method: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_method'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Detaches a PaymentMethod object from a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { + parameters: { + path: { + payment_method: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payment_method'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + GetPayouts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + arrival_date?: number + created?: number + /** The ID of an external account - only return payouts sent to this external account. */ + destination?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['payout'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

+ * + *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

+ * + *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

+ */ + PostPayouts: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} + */ + method?: 'instant' | 'standard' + /** + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ + statement_descriptor?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ + GetPayoutsPayout: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ + PostPayoutsPayout: { + parameters: { + path: { + payout: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ + PostPayoutsPayoutCancel: { + parameters: { + path: { + payout: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['payout'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your plans.

*/ + GetPlans: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return plans for the given product. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['plan'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can create plans using the API, or in the Stripe Dashboard.

*/ + PostPlans: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + active?: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string + /** + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** + * inline_product_params + * @description The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a [service product](https://stripe.com/docs/api#product_object-type). + */ + product?: { + active?: boolean + id?: string + metadata?: { [key: string]: unknown } + name: string + statement_descriptor?: string + unit_label?: string + } + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + flat_amount_decimal?: string + unit_amount?: number + unit_amount_decimal?: string + up_to: unknown + }[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' + } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['plan'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['plan'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ + PostPlansPlan: { + parameters: { + path: { + plan: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Whether the plan is currently available for new subscriptions. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. Note that after updating, statement descriptors and line items of the plan in active subscriptions will be affected. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['plan'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + DeletePlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_plan'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + GetProducts: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return products with the given IDs. */ + ids?: unknown[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return products that can be shipped (i.e., physical, not digital products). */ + shippable?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return products of this type. */ + type?: string + /** Only return products with the given url. */ + url?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['product'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new product object.

*/ + PostProducts: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** @description A list of up to 5 alphanumeric attributes. */ + attributes?: string[] + /** @description A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`. */ + caption?: string + /** @description An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if type=`good`. */ + deactivate_on?: string[] + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name: string + /** + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if type=`good`. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** + * @description The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + * @enum {string} + */ + type?: 'good' | 'service' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. May only be set if type=`good`. */ + url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['product'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ + GetProductsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['product'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostProductsId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., `["color", "size"]`). If a value for `attributes` is specified, the list specified will replace the existing attributes list on this product. Any attributes not present after the update will be deleted from the SKUs for this product. */ + attributes?: string[] + /** @description A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ + caption?: string + /** @description An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if `type=good`. */ + deactivate_on?: string[] + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name?: string + /** @description The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if `type=good`. */ + package_dimensions?: unknown + /** @description Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. May only be set if `type=good`. */ + url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['product'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a product. Deleting a product with type=good is only possible if it has no SKUs associated with it. Deleting a product with type=service is only possible if it has no plans associated with it.

*/ + DeleteProductsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_product'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of early fraud warnings.

*/ + GetRadarEarlyFraudWarnings: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return early fraud warnings for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['radar.early_fraud_warning'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the details of an early fraud warning that has previously been created.

+ * + *

Please refer to the early fraud warning object reference for more details.

+ */ + GetRadarEarlyFraudWarningsEarlyFraudWarning: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + early_fraud_warning: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.early_fraud_warning'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueListItems: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ + value?: string + /** Identifier for the parent value list this item belongs to. */ + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + PostRadarValueListItems: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.value_list_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.value_list_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + DeleteRadarValueListItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_radar.value_list_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueLists: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['radar.value_list'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + PostRadarValueLists: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description The name of the value list for use in rules. */ + alias: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. Use `string` if the item type is unknown or mixed. + * @enum {string} + */ + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'email' | 'ip_address' | 'string' + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.value_list'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.value_list'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['radar.value_list'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_radar.value_list'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ + GetRecipients: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + type?: string + /** Only return recipients that are verified or unverified. */ + verified?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['recipient'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a new Recipient object and verifies the recipient’s identity. + * Also verifies the recipient’s bank account information or debit card, if either is provided.

+ */ + PostRecipients: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's bank account details, with the options described below. */ + bank_account?: string + /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ + card?: string + /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string + /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + name: string + /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string + /** @description Type of the recipient: either `individual` or `corporation`. */ + type: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['recipient'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ + GetRecipientsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_recipient'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified recipient by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged.

+ * + *

If you update the name or tax ID, the identity verification will automatically be rerun. + * If you update the bank account, the bank account validation will automatically be rerun.

+ */ + PostRecipientsId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's bank account details, with the options described below. */ + bank_account?: string + /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ + card?: string + /** @description ID of the card to set as the recipient's new default for payouts. */ + default_card?: string + /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string + /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + name?: string + /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['recipient'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Permanently deletes a recipient. It cannot be undone.

*/ + DeleteRecipientsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_recipient'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + GetRefunds: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return refunds for the charge specified by this charge ID. */ + charge?: string + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Create a refund.

*/ + PostRefunds: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + amount?: number + charge?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['refund'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first. (Requires a live-mode API key.)

*/ + GetReportingReportRuns: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['reporting.report_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new object and begin running the report. (Requires a live-mode API key.)

*/ + PostReportingReportRuns: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + interval_end?: number + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Timbuktu' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/Buenos_Aires' + | 'America/Argentina/Catamarca' + | 'America/Argentina/ComodRivadavia' + | 'America/Argentina/Cordoba' + | 'America/Argentina/Jujuy' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Mendoza' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Atikokan' + | 'America/Atka' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Ensenada' + | 'America/Fort_Nelson' + | 'America/Fort_Wayne' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Indianapolis' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Louisville' + | 'America/Kentucky/Monticello' + | 'America/Knox_IN' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Acre' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Rosario' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Shiprock' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Virgin' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/South_Pole' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Ashkhabad' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Chongqing' + | 'Asia/Chungking' + | 'Asia/Colombo' + | 'Asia/Dacca' + | 'Asia/Damascus' + | 'Asia/Dhaka' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Harbin' + | 'Asia/Hebron' + | 'Asia/Ho_Chi_Minh' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Asia/Istanbul' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Kashgar' + | 'Asia/Kathmandu' + | 'Asia/Katmandu' + | 'Asia/Khandyga' + | 'Asia/Kolkata' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Kuwait' + | 'Asia/Macao' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Muscat' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Phnom_Penh' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qatar' + | 'Asia/Qostanay' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Riyadh' + | 'Asia/Saigon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Shanghai' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Tel_Aviv' + | 'Asia/Thimbu' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ujung_Pandang' + | 'Asia/Ulaanbaatar' + | 'Asia/Ulan_Bator' + | 'Asia/Urumqi' + | 'Asia/Ust-Nera' + | 'Asia/Vientiane' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yangon' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faeroe' + | 'Atlantic/Faroe' + | 'Atlantic/Jan_Mayen' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/St_Helena' + | 'Atlantic/Stanley' + | 'Australia/ACT' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Canberra' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/LHI' + | 'Australia/Lindeman' + | 'Australia/Lord_Howe' + | 'Australia/Melbourne' + | 'Australia/NSW' + | 'Australia/North' + | 'Australia/Perth' + | 'Australia/Queensland' + | 'Australia/South' + | 'Australia/Sydney' + | 'Australia/Tasmania' + | 'Australia/Victoria' + | 'Australia/West' + | 'Australia/Yancowinna' + | 'Brazil/Acre' + | 'Brazil/DeNoronha' + | 'Brazil/East' + | 'Brazil/West' + | 'CET' + | 'CST6CDT' + | 'Canada/Atlantic' + | 'Canada/Central' + | 'Canada/Eastern' + | 'Canada/Mountain' + | 'Canada/Newfoundland' + | 'Canada/Pacific' + | 'Canada/Saskatchewan' + | 'Canada/Yukon' + | 'Chile/Continental' + | 'Chile/EasterIsland' + | 'Cuba' + | 'EET' + | 'EST' + | 'EST5EDT' + | 'Egypt' + | 'Eire' + | 'Etc/GMT' + | 'Etc/GMT+0' + | 'Etc/GMT+1' + | 'Etc/GMT+10' + | 'Etc/GMT+11' + | 'Etc/GMT+12' + | 'Etc/GMT+2' + | 'Etc/GMT+3' + | 'Etc/GMT+4' + | 'Etc/GMT+5' + | 'Etc/GMT+6' + | 'Etc/GMT+7' + | 'Etc/GMT+8' + | 'Etc/GMT+9' + | 'Etc/GMT-0' + | 'Etc/GMT-1' + | 'Etc/GMT-10' + | 'Etc/GMT-11' + | 'Etc/GMT-12' + | 'Etc/GMT-13' + | 'Etc/GMT-14' + | 'Etc/GMT-2' + | 'Etc/GMT-3' + | 'Etc/GMT-4' + | 'Etc/GMT-5' + | 'Etc/GMT-6' + | 'Etc/GMT-7' + | 'Etc/GMT-8' + | 'Etc/GMT-9' + | 'Etc/GMT0' + | 'Etc/Greenwich' + | 'Etc/UCT' + | 'Etc/UTC' + | 'Etc/Universal' + | 'Etc/Zulu' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/Belfast' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Bratislava' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Busingen' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Dublin' + | 'Europe/Gibraltar' + | 'Europe/Guernsey' + | 'Europe/Helsinki' + | 'Europe/Isle_of_Man' + | 'Europe/Istanbul' + | 'Europe/Jersey' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Ljubljana' + | 'Europe/London' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Mariehamn' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Nicosia' + | 'Europe/Oslo' + | 'Europe/Paris' + | 'Europe/Podgorica' + | 'Europe/Prague' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/San_Marino' + | 'Europe/Sarajevo' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Skopje' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Tiraspol' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vaduz' + | 'Europe/Vatican' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zagreb' + | 'Europe/Zaporozhye' + | 'Europe/Zurich' + | 'Factory' + | 'GB' + | 'GB-Eire' + | 'GMT' + | 'GMT+0' + | 'GMT-0' + | 'GMT0' + | 'Greenwich' + | 'HST' + | 'Hongkong' + | 'Iceland' + | 'Indian/Antananarivo' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Comoro' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Mayotte' + | 'Indian/Reunion' + | 'Iran' + | 'Israel' + | 'Jamaica' + | 'Japan' + | 'Kwajalein' + | 'Libya' + | 'MET' + | 'MST' + | 'MST7MDT' + | 'Mexico/BajaNorte' + | 'Mexico/BajaSur' + | 'Mexico/General' + | 'NZ' + | 'NZ-CHAT' + | 'Navajo' + | 'PRC' + | 'PST8PDT' + | 'Pacific/Apia' + | 'Pacific/Auckland' + | 'Pacific/Bougainville' + | 'Pacific/Chatham' + | 'Pacific/Chuuk' + | 'Pacific/Easter' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Johnston' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Kwajalein' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Midway' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Pago_Pago' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Pohnpei' + | 'Pacific/Ponape' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Saipan' + | 'Pacific/Samoa' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Truk' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | 'Pacific/Yap' + | 'Poland' + | 'Portugal' + | 'ROC' + | 'ROK' + | 'Singapore' + | 'Turkey' + | 'UCT' + | 'US/Alaska' + | 'US/Aleutian' + | 'US/Arizona' + | 'US/Central' + | 'US/East-Indiana' + | 'US/Eastern' + | 'US/Hawaii' + | 'US/Indiana-Starke' + | 'US/Michigan' + | 'US/Mountain' + | 'US/Pacific' + | 'US/Pacific-New' + | 'US/Samoa' + | 'UTC' + | 'Universal' + | 'W-SU' + | 'WET' + | 'Zulu' + } + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['reporting.report_run'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing Report Run. (Requires a live-mode API key.)

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['reporting.report_run'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a full list of Report Types. (Requires a live-mode API key.)

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of a Report Type. (Requires a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['reporting.report_type'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetReviews: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['review'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['review'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['review'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: number + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + PostSetupIntents: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['setup_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['setup_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['setup_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['setup_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['setup_intent'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of scheduled query runs.

*/ + GetSigmaScheduledQueryRuns: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['scheduled_query_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['scheduled_query_run'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + GetSkus: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return SKUs with the given IDs. */ + ids?: unknown[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['sku'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_sku'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: unknown + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['sku'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_sku'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: unknown + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** + * @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + * @enum {string} + */ + usage?: 'reusable' | 'single_use' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSource: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: unknown + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source_mandate_notification'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

List source transactions for a given source.

*/ + GetSourcesSourceSourceTransactions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['source_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source_transaction'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['source'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your subscription items for a given subscription.

*/ + GetSubscriptionItems: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The ID of the subscription whose items will be retrieved. */ + subscription: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + PostSubscriptionItems: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The identifier of the plan to add to the subscription. */ + plan?: string + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the invoice item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the plan or quantity of an item on a current subscription.

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The identifier of the new plan for this subscription item. */ + plan?: string + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ + proration_date?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_subscription_item'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the billing plan’s month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['usage_record_summary'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + body: { + /** Body parameters for the request. */ + payload: { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`. */ + timestamp: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['usage_record'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: number + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: number + /** Only return subscription schedules that were created during the given date interval. */ + created?: number + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: number + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new subscription schedule object. Each customer can have up to 25 active or scheduled subscriptions.

*/ + PostSubscriptionSchedules: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + billing_thresholds?: unknown + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's plan(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: { + application_fee_percent?: number + billing_thresholds?: unknown + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + iterations?: number + plans: { + billing_thresholds?: unknown + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + tax_percent?: number + trial?: boolean + trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_schedule'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_schedule'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + billing_thresholds?: unknown + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: { + application_fee_percent?: number + billing_thresholds?: unknown + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] + end_date?: unknown + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + iterations?: number + plans: { + billing_thresholds?: unknown + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: unknown + tax_percent?: number + trial?: boolean + trial_end?: unknown + }[] + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description If the update changes the current phase, indicates if the changes should be prorated. Valid values are `create_prorations` or `none`, and the default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_schedule'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates whether or not to generate a final invoice that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_schedule'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription_schedule'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + GetSubscriptions: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: string + created?: number + current_period_end?: number + current_period_start?: number + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the plan whose subscriptions will be retrieved. */ + plan?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. One of: `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `unpaid`, `canceled`, or `all`. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Passing in a value of `all` will return subscriptions of all statuses. */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.

*/ + PostSubscriptions: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. */ + backdate_start_date?: number + /** @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: unknown + metadata?: { [key: string]: unknown } + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: unknown + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: unknown + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: unknown + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. */ + trial_period_days?: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: unknown + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: unknown + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: unknown + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: unknown + plan?: string + quantity?: number + tax_rates?: string[] + }[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: unknown + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: unknown + /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ + prorate?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. */ + proration_date?: number + /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ + tax_percent?: unknown + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: unknown + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ + trial_from_plan?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['subscription'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_discount'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + GetTaxRates: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Optional flag to filter by tax rates that are either active or not active (archived) */ + active?: boolean + /** Optional range for filtering created date */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive) */ + inclusive?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['tax_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new tax rate.

*/ + PostTaxRates: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Flag determining whether the tax rate is active or inactive. Inactive tax rates continue to work where they are currently applied however they cannot be used for new applications. */ + active?: boolean + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. */ + jurisdiction?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['tax_rate'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + tax_rate: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['tax_rate'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { + parameters: { + path: { + tax_rate: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Flag determining whether the tax rate is active or inactive. Inactive tax rates continue to work where they are currently applied however they cannot be used for new applications. */ + active?: boolean + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The jurisdiction for the tax rate. */ + jurisdiction?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['tax_rate'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ + PostTerminalConnectionTokens: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. */ + location?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.connection_token'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new Location object.

*/ + PostTerminalLocations: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** + * required_country_address + * @description The full address of the location. + */ + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description A name for the location. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.location'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.location'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** + * required_country_address + * @description The full address of the location. + */ + address?: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description A name for the location. */ + display_name?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.location'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_terminal.location'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** Filters readers by device type */ + device_type?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A location ID to filter the response list to only readers at the specific location */ + location?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A status filter to filter readers to only offline or online readers */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description A list of readers */ + data: definitions['terminal.reader'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Creates a new Reader object.

*/ + PostTerminalReaders: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. If no location is specified, the reader will be assigned to the account's default location. */ + location?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.reader'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + reader: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.reader'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalReadersReader: { + parameters: { + path: { + reader: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The new label of the reader. */ + label?: string + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['terminal.reader'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { + parameters: { + path: { + reader: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_terminal.reader'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Creates a single-use token that represents a bank account’s details. + * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

+ */ + PostTokens: { + parameters: { + body: { + /** Body parameters for the request. */ + payload?: { + /** + * connect_js_account_token_specs + * @description Information for the account this token will represent. + */ + account?: { + /** @enum {string} */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + phone?: string + /** @enum {string} */ + structure?: + | '' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: unknown + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: unknown + phone?: string + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + country: string + currency?: string + routing_number?: string + } + card?: unknown + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: unknown + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: unknown + phone?: string + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: unknown + representative?: boolean + title?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** + * pii_token_specs + * @description The PII this token will represent. + */ + pii?: { + id_number?: string + } + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['token'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the token with the given ID.

*/ + GetTokensToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + token: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['token'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of top-ups.

*/ + GetTopups: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A positive integer representing how much to transfer. */ + amount?: number + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Top up the balance of an account

*/ + PostTopups: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['topup'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ + GetTopupsTopup: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['topup'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['topup'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + PostTopupsTopupCancel: { + parameters: { + path: { + topup: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['topup'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + GetTransfers: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + created?: number + /** Only return transfers for the destination specified by this account ID. */ + destination?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return transfers with the specified transfer group. */ + transfer_group?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ + PostTransfers: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** @description A positive integer in %s representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: unknown } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ + GetTransfersIdReversals: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + /** @description Details about each object. */ + data: definitions['transfer_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

When you create a new reversal, you must specify a transfer to create it on.

+ * + *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

+ * + *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

+ */ + PostTransfersIdReversals: { + parameters: { + path: { + id: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer_reversal'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ + GetTransfersTransfer: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts only metadata as an argument.

+ */ + PostTransfersTransfer: { + parameters: { + path: { + transfer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + GetTransfersTransferReversalsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer_reversal'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['transfer_reversal'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Returns a list of your webhook endpoints.

*/ + GetWebhookEndpoints: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: { + data: definitions['webhook_endpoint'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ + PostWebhookEndpoints: { + parameters: { + body: { + /** Body parameters for the request. */ + payload: { + /** + * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + * @enum {string} + */ + api_version?: + | '2011-01-01' + | '2011-06-21' + | '2011-06-28' + | '2011-08-01' + | '2011-09-15' + | '2011-11-17' + | '2012-02-23' + | '2012-03-25' + | '2012-06-18' + | '2012-06-28' + | '2012-07-09' + | '2012-09-24' + | '2012-10-26' + | '2012-11-07' + | '2013-02-11' + | '2013-02-13' + | '2013-07-05' + | '2013-08-12' + | '2013-08-13' + | '2013-10-29' + | '2013-12-03' + | '2014-01-31' + | '2014-03-13' + | '2014-03-28' + | '2014-05-19' + | '2014-06-13' + | '2014-06-17' + | '2014-07-22' + | '2014-07-26' + | '2014-08-04' + | '2014-08-20' + | '2014-09-08' + | '2014-10-07' + | '2014-11-05' + | '2014-11-20' + | '2014-12-08' + | '2014-12-17' + | '2014-12-22' + | '2015-01-11' + | '2015-01-26' + | '2015-02-10' + | '2015-02-16' + | '2015-02-18' + | '2015-03-24' + | '2015-04-07' + | '2015-06-15' + | '2015-07-07' + | '2015-07-13' + | '2015-07-28' + | '2015-08-07' + | '2015-08-19' + | '2015-09-03' + | '2015-09-08' + | '2015-09-23' + | '2015-10-01' + | '2015-10-12' + | '2015-10-16' + | '2016-02-03' + | '2016-02-19' + | '2016-02-22' + | '2016-02-23' + | '2016-02-29' + | '2016-03-07' + | '2016-06-15' + | '2016-07-06' + | '2016-10-19' + | '2017-01-27' + | '2017-02-14' + | '2017-04-06' + | '2017-05-25' + | '2017-06-05' + | '2017-08-15' + | '2017-12-14' + | '2018-01-23' + | '2018-02-05' + | '2018-02-06' + | '2018-02-28' + | '2018-05-21' + | '2018-07-27' + | '2018-08-23' + | '2018-09-06' + | '2018-09-24' + | '2018-10-31' + | '2018-11-08' + | '2019-02-11' + | '2019-02-19' + | '2019-03-14' + | '2019-05-16' + | '2019-08-14' + | '2019-09-09' + | '2019-10-08' + | '2019-10-17' + | '2019-11-05' + | '2019-12-03' + | '2020-03-02' + /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ + connect?: boolean + /** @description An optional description of what the wehbook is used for. */ + description?: string + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events: ( + | '*' + | 'account.application.authorized' + | 'account.application.deauthorized' + | 'account.external_account.created' + | 'account.external_account.deleted' + | 'account.external_account.updated' + | 'account.updated' + | 'application_fee.created' + | 'application_fee.refund.updated' + | 'application_fee.refunded' + | 'balance.available' + | 'capability.updated' + | 'charge.captured' + | 'charge.dispute.closed' + | 'charge.dispute.created' + | 'charge.dispute.funds_reinstated' + | 'charge.dispute.funds_withdrawn' + | 'charge.dispute.updated' + | 'charge.expired' + | 'charge.failed' + | 'charge.pending' + | 'charge.refund.updated' + | 'charge.refunded' + | 'charge.succeeded' + | 'charge.updated' + | 'checkout.session.completed' + | 'coupon.created' + | 'coupon.deleted' + | 'coupon.updated' + | 'credit_note.created' + | 'credit_note.updated' + | 'credit_note.voided' + | 'customer.created' + | 'customer.deleted' + | 'customer.discount.created' + | 'customer.discount.deleted' + | 'customer.discount.updated' + | 'customer.source.created' + | 'customer.source.deleted' + | 'customer.source.expiring' + | 'customer.source.updated' + | 'customer.subscription.created' + | 'customer.subscription.deleted' + | 'customer.subscription.pending_update_applied' + | 'customer.subscription.pending_update_expired' + | 'customer.subscription.trial_will_end' + | 'customer.subscription.updated' + | 'customer.tax_id.created' + | 'customer.tax_id.deleted' + | 'customer.tax_id.updated' + | 'customer.updated' + | 'file.created' + | 'invoice.created' + | 'invoice.deleted' + | 'invoice.finalized' + | 'invoice.marked_uncollectible' + | 'invoice.payment_action_required' + | 'invoice.payment_failed' + | 'invoice.payment_succeeded' + | 'invoice.sent' + | 'invoice.upcoming' + | 'invoice.updated' + | 'invoice.voided' + | 'invoiceitem.created' + | 'invoiceitem.deleted' + | 'invoiceitem.updated' + | 'issuing_authorization.created' + | 'issuing_authorization.request' + | 'issuing_authorization.updated' + | 'issuing_card.created' + | 'issuing_card.updated' + | 'issuing_cardholder.created' + | 'issuing_cardholder.updated' + | 'issuing_transaction.created' + | 'issuing_transaction.updated' + | 'mandate.updated' + | 'order.created' + | 'order.payment_failed' + | 'order.payment_succeeded' + | 'order.updated' + | 'order_return.created' + | 'payment_intent.amount_capturable_updated' + | 'payment_intent.canceled' + | 'payment_intent.created' + | 'payment_intent.payment_failed' + | 'payment_intent.processing' + | 'payment_intent.succeeded' + | 'payment_method.attached' + | 'payment_method.card_automatically_updated' + | 'payment_method.detached' + | 'payment_method.updated' + | 'payout.canceled' + | 'payout.created' + | 'payout.failed' + | 'payout.paid' + | 'payout.updated' + | 'person.created' + | 'person.deleted' + | 'person.updated' + | 'plan.created' + | 'plan.deleted' + | 'plan.updated' + | 'product.created' + | 'product.deleted' + | 'product.updated' + | 'radar.early_fraud_warning.created' + | 'radar.early_fraud_warning.updated' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'reporting.report_run.failed' + | 'reporting.report_run.succeeded' + | 'reporting.report_type.updated' + | 'review.closed' + | 'review.opened' + | 'setup_intent.canceled' + | 'setup_intent.created' + | 'setup_intent.setup_failed' + | 'setup_intent.succeeded' + | 'sigma.scheduled_query_run.created' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated' + | 'source.canceled' + | 'source.chargeable' + | 'source.failed' + | 'source.mandate_notification' + | 'source.refund_attributes_required' + | 'source.transaction.created' + | 'source.transaction.updated' + | 'subscription_schedule.aborted' + | 'subscription_schedule.canceled' + | 'subscription_schedule.completed' + | 'subscription_schedule.created' + | 'subscription_schedule.expiring' + | 'subscription_schedule.released' + | 'subscription_schedule.updated' + | 'tax_rate.created' + | 'tax_rate.updated' + | 'topup.canceled' + | 'topup.created' + | 'topup.failed' + | 'topup.reversed' + | 'topup.succeeded' + | 'transfer.created' + | 'transfer.failed' + | 'transfer.paid' + | 'transfer.reversed' + | 'transfer.updated' + )[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The URL of the webhook endpoint. */ + url: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['webhook_endpoint'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Retrieves the webhook endpoint with the given ID.

*/ + GetWebhookEndpointsWebhookEndpoint: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: unknown[] + } + path: { + webhook_endpoint: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['webhook_endpoint'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ + PostWebhookEndpointsWebhookEndpoint: { + parameters: { + path: { + webhook_endpoint: string + } + body: { + /** Body parameters for the request. */ + payload?: { + /** @description An optional description of what the wehbook is used for. */ + description?: string + /** @description Disable the webhook endpoint if set to true. */ + disabled?: boolean + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events?: ( + | '*' + | 'account.application.authorized' + | 'account.application.deauthorized' + | 'account.external_account.created' + | 'account.external_account.deleted' + | 'account.external_account.updated' + | 'account.updated' + | 'application_fee.created' + | 'application_fee.refund.updated' + | 'application_fee.refunded' + | 'balance.available' + | 'capability.updated' + | 'charge.captured' + | 'charge.dispute.closed' + | 'charge.dispute.created' + | 'charge.dispute.funds_reinstated' + | 'charge.dispute.funds_withdrawn' + | 'charge.dispute.updated' + | 'charge.expired' + | 'charge.failed' + | 'charge.pending' + | 'charge.refund.updated' + | 'charge.refunded' + | 'charge.succeeded' + | 'charge.updated' + | 'checkout.session.completed' + | 'coupon.created' + | 'coupon.deleted' + | 'coupon.updated' + | 'credit_note.created' + | 'credit_note.updated' + | 'credit_note.voided' + | 'customer.created' + | 'customer.deleted' + | 'customer.discount.created' + | 'customer.discount.deleted' + | 'customer.discount.updated' + | 'customer.source.created' + | 'customer.source.deleted' + | 'customer.source.expiring' + | 'customer.source.updated' + | 'customer.subscription.created' + | 'customer.subscription.deleted' + | 'customer.subscription.pending_update_applied' + | 'customer.subscription.pending_update_expired' + | 'customer.subscription.trial_will_end' + | 'customer.subscription.updated' + | 'customer.tax_id.created' + | 'customer.tax_id.deleted' + | 'customer.tax_id.updated' + | 'customer.updated' + | 'file.created' + | 'invoice.created' + | 'invoice.deleted' + | 'invoice.finalized' + | 'invoice.marked_uncollectible' + | 'invoice.payment_action_required' + | 'invoice.payment_failed' + | 'invoice.payment_succeeded' + | 'invoice.sent' + | 'invoice.upcoming' + | 'invoice.updated' + | 'invoice.voided' + | 'invoiceitem.created' + | 'invoiceitem.deleted' + | 'invoiceitem.updated' + | 'issuing_authorization.created' + | 'issuing_authorization.request' + | 'issuing_authorization.updated' + | 'issuing_card.created' + | 'issuing_card.updated' + | 'issuing_cardholder.created' + | 'issuing_cardholder.updated' + | 'issuing_transaction.created' + | 'issuing_transaction.updated' + | 'mandate.updated' + | 'order.created' + | 'order.payment_failed' + | 'order.payment_succeeded' + | 'order.updated' + | 'order_return.created' + | 'payment_intent.amount_capturable_updated' + | 'payment_intent.canceled' + | 'payment_intent.created' + | 'payment_intent.payment_failed' + | 'payment_intent.processing' + | 'payment_intent.succeeded' + | 'payment_method.attached' + | 'payment_method.card_automatically_updated' + | 'payment_method.detached' + | 'payment_method.updated' + | 'payout.canceled' + | 'payout.created' + | 'payout.failed' + | 'payout.paid' + | 'payout.updated' + | 'person.created' + | 'person.deleted' + | 'person.updated' + | 'plan.created' + | 'plan.deleted' + | 'plan.updated' + | 'product.created' + | 'product.deleted' + | 'product.updated' + | 'radar.early_fraud_warning.created' + | 'radar.early_fraud_warning.updated' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'reporting.report_run.failed' + | 'reporting.report_run.succeeded' + | 'reporting.report_type.updated' + | 'review.closed' + | 'review.opened' + | 'setup_intent.canceled' + | 'setup_intent.created' + | 'setup_intent.setup_failed' + | 'setup_intent.succeeded' + | 'sigma.scheduled_query_run.created' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated' + | 'source.canceled' + | 'source.chargeable' + | 'source.failed' + | 'source.mandate_notification' + | 'source.refund_attributes_required' + | 'source.transaction.created' + | 'source.transaction.updated' + | 'subscription_schedule.aborted' + | 'subscription_schedule.canceled' + | 'subscription_schedule.completed' + | 'subscription_schedule.created' + | 'subscription_schedule.expiring' + | 'subscription_schedule.released' + | 'subscription_schedule.updated' + | 'tax_rate.created' + | 'tax_rate.updated' + | 'topup.canceled' + | 'topup.created' + | 'topup.failed' + | 'topup.reversed' + | 'topup.succeeded' + | 'transfer.created' + | 'transfer.failed' + | 'transfer.paid' + | 'transfer.reversed' + | 'transfer.updated' + )[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: unknown + /** @description The URL of the webhook endpoint. */ + url?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['webhook_endpoint'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } + /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ + DeleteWebhookEndpointsWebhookEndpoint: { + parameters: { + path: { + webhook_endpoint: string + } + } + responses: { + /** Successful response. */ + 200: { + schema: definitions['deleted_webhook_endpoint'] + } + /** Error response. */ + default: { + schema: definitions['error'] + } + } + } +} + +export interface external {} diff --git a/test/v2/index.test.js b/test/v2/index.test.js index fd71d095d..415c77d9c 100644 --- a/test/v2/index.test.js +++ b/test/v2/index.test.js @@ -34,6 +34,17 @@ describe("cli", () => { const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); expect(generated).to.equal(expected); }); + + it(`reads ${schema} spec (v2) from file (alphabetize)`, async () => { + const filename = schema.replace(/\.(json|yaml)/, ".alphabetized.ts"); + + execSync(`${cmd} specs/${schema} -o generated/${filename} --prettier-config fixtures/.prettierrc --alphabetize`, { + cwd, + }); + const generated = fs.readFileSync(new URL(`./generated/${filename}`, cwd), "utf8"); + const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); + expect(generated).to.equal(expected); + }); }); it("reads spec (v2) from remote resource", async () => { diff --git a/test/v3/expected/all-of-string.alphabetized.ts b/test/v3/expected/all-of-string.alphabetized.ts new file mode 100644 index 000000000..b0b8376b6 --- /dev/null +++ b/test/v3/expected/all-of-string.alphabetized.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + responses: { + /** A list of types. */ + 200: unknown + } + } + } +} + +export interface components { + schemas: { + /** @description Object with one property that is a string enum */ + Example: { + status?: components['schemas']['ExampleStatus'] + } + /** @enum {string} */ + ExampleStatus: 'ACTIVE' | 'INACTIVE' + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/any-of.alphabetized.ts b/test/v3/expected/any-of.alphabetized.ts new file mode 100644 index 000000000..57838228d --- /dev/null +++ b/test/v3/expected/any-of.alphabetized.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/cats': { + post: { + responses: { + 200: { + content: { + 'application/json': { + colors: + | string[] + | { + id: string + name: string + }[] + id: string + name: string + } + } + } + } + } + } +} + +export interface components {} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/consts-enums.alphabetized.ts b/test/v3/expected/consts-enums.alphabetized.ts new file mode 100644 index 000000000..03c04e5bd --- /dev/null +++ b/test/v3/expected/consts-enums.alphabetized.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + responses: { + /** A list of types. */ + 200: unknown + } + } + } +} + +export interface components { + schemas: { + /** @description Enum with null and nullable */ + MyType: { + /** @constant */ + myConstTestField?: 'constant-value' + /** @constant */ + myConstTestFieldNullable?: 4 | null + /** @enum {string|null} */ + myEnumTestField?: ('foo' | 'bar' | null) | null + /** @enum {string|null} */ + myEnumTestFieldNullable?: ('foo' | 'bar' | null) | null + } + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/consts-object.alphabetized.ts b/test/v3/expected/consts-object.alphabetized.ts new file mode 100644 index 000000000..c751d605f --- /dev/null +++ b/test/v3/expected/consts-object.alphabetized.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + responses: { + /** A list of types. */ + 200: unknown + } + } + } +} + +export interface components { + schemas: { + /** @constant */ + TypeA: { hello: 'world' } + /** @constant */ + TypeB: ['content'] + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/falsey-example.alphabetized.ts b/test/v3/expected/falsey-example.alphabetized.ts new file mode 100644 index 000000000..7469fc3fe --- /dev/null +++ b/test/v3/expected/falsey-example.alphabetized.ts @@ -0,0 +1,41 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + parameters: { + query: { + isEnabled: boolean + count: number + } + } + responses: { + 200: unknown + } + } + } +} + +export interface components { + schemas: { + TestSchema: { + /** + * @default 0 + * @example 0 + */ + count?: number + /** + * @default false + * @example false + */ + isEnabled?: boolean + } + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/github.alphabetized.ts b/test/v3/expected/github.alphabetized.ts new file mode 100644 index 000000000..b7a1dcbe8 --- /dev/null +++ b/test/v3/expected/github.alphabetized.ts @@ -0,0 +1,42903 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/': { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations['meta/root'] + } + '/app': { + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-authenticated'] + } + '/app-manifests/{code}/conversions': { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ + post: operations['apps/create-from-manifest'] + } + '/app/hook/config': { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-webhook-config-for-app'] + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations['apps/update-webhook-config-for-app'] + } + '/app/hook/deliveries': { + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/list-webhook-deliveries'] + } + '/app/hook/deliveries/{delivery_id}': { + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-webhook-delivery'] + } + '/app/hook/deliveries/{delivery_id}/attempts': { + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations['apps/redeliver-webhook-delivery'] + } + '/app/installations': { + /** + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + get: operations['apps/list-installations'] + } + '/app/installations/{installation_id}': { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-installation'] + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations['apps/delete-installation'] + } + '/app/installations/{installation_id}/access_tokens': { + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations['apps/create-installation-access-token'] + } + '/app/installations/{installation_id}/suspended': { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations['apps/suspend-installation'] + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations['apps/unsuspend-installation'] + } + '/applications/{client_id}/grant': { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations['apps/delete-authorization'] + } + '/applications/{client_id}/token': { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations['apps/check-token'] + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations['apps/delete-token'] + /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations['apps/reset-token'] + } + '/applications/{client_id}/token/scoped': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + post: operations['apps/scope-token'] + } + '/applications/grants': { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + */ + get: operations['oauth-authorizations/list-grants'] + } + '/applications/grants/{grant_id}': { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations['oauth-authorizations/get-grant'] + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations['oauth-authorizations/delete-grant'] + } + '/apps/{app_slug}': { + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations['apps/get-by-slug'] + } + '/authorizations': { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations['oauth-authorizations/list-authorizations'] + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + post: operations['oauth-authorizations/create-authorization'] + } + '/authorizations/{authorization_id}': { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations['oauth-authorizations/get-authorization'] + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + delete: operations['oauth-authorizations/delete-authorization'] + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + patch: operations['oauth-authorizations/update-authorization'] + } + '/authorizations/clients/{client_id}': { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + put: operations['oauth-authorizations/get-or-create-authorization-for-app'] + } + '/authorizations/clients/{client_id}/{fingerprint}': { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + put: operations['oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint'] + } + '/codes_of_conduct': { + get: operations['codes-of-conduct/get-all-codes-of-conduct'] + } + '/codes_of_conduct/{key}': { + get: operations['codes-of-conduct/get-conduct-code'] + } + '/emojis': { + /** Lists all the emojis available to use on GitHub. */ + get: operations['emojis/get'] + } + '/enterprises/{enterprise}/actions/permissions': { + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/get-github-actions-permissions-enterprise'] + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-github-actions-permissions-enterprise'] + } + '/enterprises/{enterprise}/actions/permissions/organizations': { + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise'] + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise'] + } + '/enterprises/{enterprise}/actions/permissions/organizations/{org_id}': { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/enable-selected-organization-github-actions-enterprise'] + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/disable-selected-organization-github-actions-enterprise'] + } + '/enterprises/{enterprise}/actions/permissions/selected-actions': { + /** + * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/get-allowed-actions-enterprise'] + /** + * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-allowed-actions-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups': { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-self-hosted-runner-groups-for-enterprise'] + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations['enterprise-admin/create-self-hosted-runner-group-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}': { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/get-self-hosted-runner-group-for-enterprise'] + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/delete-self-hosted-runner-group-from-enterprise'] + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + patch: operations['enterprise-admin/update-self-hosted-runner-group-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise'] + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise'] + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners': { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-self-hosted-runners-in-group-for-enterprise'] + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-self-hosted-runners-in-group-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}': { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + put: operations['enterprise-admin/add-self-hosted-runner-to-group-for-enterprise'] + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners': { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-self-hosted-runners-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/{runner_id}': { + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/get-self-hosted-runner-for-enterprise'] + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/delete-self-hosted-runner-from-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/{runner_id}/labels': { + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise'] + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + put: operations['enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise'] + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + post: operations['enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise'] + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}': { + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + delete: operations['enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/downloads': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + get: operations['enterprise-admin/list-runner-applications-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/registration-token': { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + post: operations['enterprise-admin/create-registration-token-for-enterprise'] + } + '/enterprises/{enterprise}/actions/runners/remove-token': { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations['enterprise-admin/create-remove-token-for-enterprise'] + } + '/enterprises/{enterprise}/audit-log': { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + get: operations['enterprise-admin/get-audit-log'] + } + '/enterprises/{enterprise}/secret-scanning/alerts': { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations['secret-scanning/list-alerts-for-enterprise'] + } + '/enterprises/{enterprise}/settings/billing/actions': { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + get: operations['billing/get-github-actions-billing-ghe'] + } + '/enterprises/{enterprise}/settings/billing/advanced-security': { + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + */ + get: operations['billing/get-github-advanced-security-billing-ghe'] + } + '/enterprises/{enterprise}/settings/billing/packages': { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations['billing/get-github-packages-billing-ghe'] + } + '/enterprises/{enterprise}/settings/billing/shared-storage': { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations['billing/get-shared-storage-billing-ghe'] + } + '/events': { + /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ + get: operations['activity/list-public-events'] + } + '/feeds': { + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations['activity/get-feeds'] + } + '/gists': { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations['gists/list'] + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + post: operations['gists/create'] + } + '/gists/{gist_id}': { + get: operations['gists/get'] + delete: operations['gists/delete'] + /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations['gists/update'] + } + '/gists/{gist_id}/{sha}': { + get: operations['gists/get-revision'] + } + '/gists/{gist_id}/comments': { + get: operations['gists/list-comments'] + post: operations['gists/create-comment'] + } + '/gists/{gist_id}/comments/{comment_id}': { + get: operations['gists/get-comment'] + delete: operations['gists/delete-comment'] + patch: operations['gists/update-comment'] + } + '/gists/{gist_id}/commits': { + get: operations['gists/list-commits'] + } + '/gists/{gist_id}/forks': { + get: operations['gists/list-forks'] + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + post: operations['gists/fork'] + } + '/gists/{gist_id}/star': { + get: operations['gists/check-is-starred'] + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['gists/star'] + delete: operations['gists/unstar'] + } + '/gists/public': { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + get: operations['gists/list-public'] + } + '/gists/starred': { + /** List the authenticated user's starred gists: */ + get: operations['gists/list-starred'] + } + '/gitignore/templates': { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations['gitignore/get-all-templates'] + } + '/gitignore/templates/{name}': { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations['gitignore/get-template'] + } + '/installation/repositories': { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations['apps/list-repos-accessible-to-installation'] + } + '/installation/token': { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations['apps/revoke-installation-access-token'] + } + '/issues': { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations['issues/list'] + } + '/licenses': { + get: operations['licenses/get-all-commonly-used'] + } + '/licenses/{license}': { + get: operations['licenses/get'] + } + '/markdown': { + post: operations['markdown/render'] + } + '/markdown/raw': { + /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ + post: operations['markdown/render-raw'] + } + '/marketplace_listing/accounts/{account_id}': { + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/get-subscription-plan-for-account'] + } + '/marketplace_listing/plans': { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/list-plans'] + } + '/marketplace_listing/plans/{plan_id}/accounts': { + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/list-accounts-for-plan'] + } + '/marketplace_listing/stubbed/accounts/{account_id}': { + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/get-subscription-plan-for-account-stubbed'] + } + '/marketplace_listing/stubbed/plans': { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/list-plans-stubbed'] + } + '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations['apps/list-accounts-for-plan-stubbed'] + } + '/meta': { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + get: operations['meta/get'] + } + '/networks/{owner}/{repo}/events': { + get: operations['activity/list-public-events-for-repo-network'] + } + '/notifications': { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations['activity/list-notifications-for-authenticated-user'] + /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations['activity/mark-notifications-as-read'] + } + '/notifications/threads/{thread_id}': { + get: operations['activity/get-thread'] + patch: operations['activity/mark-thread-as-read'] + } + '/notifications/threads/{thread_id}/subscription': { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + get: operations['activity/get-thread-subscription-for-authenticated-user'] + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations['activity/set-thread-subscription'] + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations['activity/delete-thread-subscription'] + } + '/octocat': { + /** Get the octocat as ASCII art */ + get: operations['meta/get-octocat'] + } + '/organizations': { + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations['orgs/list'] + } + '/organizations/{org}/team/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + } + '/organizations/{organization_id}/custom_roles': { + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + get: operations['orgs/list-custom-roles'] + } + '/orgs/{org}': { + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations['orgs/get'] + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations['orgs/update'] + } + '/orgs/{org}/actions/permissions': { + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations['actions/get-github-actions-permissions-organization'] + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations['actions/set-github-actions-permissions-organization'] + } + '/orgs/{org}/actions/permissions/repositories': { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations['actions/list-selected-repositories-enabled-github-actions-organization'] + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations['actions/set-selected-repositories-enabled-github-actions-organization'] + } + '/orgs/{org}/actions/permissions/repositories/{repository_id}': { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations['actions/enable-selected-repository-github-actions-organization'] + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations['actions/disable-selected-repository-github-actions-organization'] + } + '/orgs/{org}/actions/permissions/selected-actions': { + /** + * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations['actions/get-allowed-actions-organization'] + /** + * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations['actions/set-allowed-actions-organization'] + } + '/orgs/{org}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well if GitHub Actions can submit approving pull request reviews. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-organization'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-organization'] + } + '/orgs/{org}/actions/runner-groups': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-self-hosted-runner-groups-for-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations['actions/create-self-hosted-runner-group-for-org'] + } + '/orgs/{org}/actions/runner-groups/{runner_group_id}': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/get-self-hosted-runner-group-for-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/delete-self-hosted-runner-group-from-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations['actions/update-self-hosted-runner-group-for-org'] + } + '/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-repo-access-to-self-hosted-runner-group-in-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations['actions/set-repo-access-to-self-hosted-runner-group-in-org'] + } + '/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations['actions/add-repo-access-to-self-hosted-runner-group-in-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/remove-repo-access-to-self-hosted-runner-group-in-org'] + } + '/orgs/{org}/actions/runner-groups/{runner_group_id}/runners': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-self-hosted-runners-in-group-for-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations['actions/set-self-hosted-runners-in-group-for-org'] + } + '/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}': { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations['actions/add-self-hosted-runner-to-group-for-org'] + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/remove-self-hosted-runner-from-group-for-org'] + } + '/orgs/{org}/actions/runners': { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-self-hosted-runners-for-org'] + } + '/orgs/{org}/actions/runners/{runner_id}': { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/get-self-hosted-runner-for-org'] + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/delete-self-hosted-runner-from-org'] + } + '/orgs/{org}/actions/runners/{runner_id}/labels': { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-labels-for-self-hosted-runner-for-org'] + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations['actions/set-custom-labels-for-self-hosted-runner-for-org'] + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations['actions/add-custom-labels-to-self-hosted-runner-for-org'] + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/remove-all-custom-labels-from-self-hosted-runner-for-org'] + } + '/orgs/{org}/actions/runners/{runner_id}/labels/{name}': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations['actions/remove-custom-label-from-self-hosted-runner-for-org'] + } + '/orgs/{org}/actions/runners/downloads': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations['actions/list-runner-applications-for-org'] + } + '/orgs/{org}/actions/runners/registration-token': { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations['actions/create-registration-token-for-org'] + } + '/orgs/{org}/actions/runners/remove-token': { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations['actions/create-remove-token-for-org'] + } + '/orgs/{org}/actions/secrets': { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations['actions/list-org-secrets'] + } + '/orgs/{org}/actions/secrets/{secret_name}': { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations['actions/get-org-secret'] + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['actions/create-or-update-org-secret'] + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations['actions/delete-org-secret'] + } + '/orgs/{org}/actions/secrets/{secret_name}/repositories': { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations['actions/list-selected-repos-for-org-secret'] + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations['actions/set-selected-repos-for-org-secret'] + } + '/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}': { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations['actions/add-selected-repo-to-org-secret'] + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations['actions/remove-selected-repo-from-org-secret'] + } + '/orgs/{org}/actions/secrets/public-key': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations['actions/get-org-public-key'] + } + '/orgs/{org}/audit-log': { + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + */ + get: operations['orgs/get-audit-log'] + } + '/orgs/{org}/blocks': { + /** List the users blocked by an organization. */ + get: operations['orgs/list-blocked-users'] + } + '/orgs/{org}/blocks/{username}': { + get: operations['orgs/check-blocked-user'] + put: operations['orgs/block-user'] + delete: operations['orgs/unblock-user'] + } + '/orgs/{org}/code-scanning/alerts': { + /** + * Lists all code scanning alerts for the default branch (usually `main` + * or `master`) for all eligible repositories in an organization. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations['code-scanning/list-alerts-for-org'] + } + '/orgs/{org}/credential-authorizations': { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + get: operations['orgs/list-saml-sso-authorizations'] + } + '/orgs/{org}/credential-authorizations/{credential_id}': { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + delete: operations['orgs/remove-saml-sso-authorization'] + } + '/orgs/{org}/dependabot/secrets': { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations['dependabot/list-org-secrets'] + } + '/orgs/{org}/dependabot/secrets/{secret_name}': { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations['dependabot/get-org-secret'] + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['dependabot/create-or-update-org-secret'] + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations['dependabot/delete-org-secret'] + } + '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations['dependabot/list-selected-repos-for-org-secret'] + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations['dependabot/set-selected-repos-for-org-secret'] + } + '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations['dependabot/add-selected-repo-to-org-secret'] + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations['dependabot/remove-selected-repo-from-org-secret'] + } + '/orgs/{org}/dependabot/secrets/public-key': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations['dependabot/get-org-public-key'] + } + '/orgs/{org}/events': { + get: operations['activity/list-public-org-events'] + } + '/orgs/{org}/external-group/{group_id}': { + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/external-idp-group-info-for-org'] + } + '/orgs/{org}/external-groups': { + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-external-idp-groups-for-org'] + } + '/orgs/{org}/failed_invitations': { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations['orgs/list-failed-invitations'] + } + '/orgs/{org}/hooks': { + get: operations['orgs/list-webhooks'] + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations['orgs/create-webhook'] + } + '/orgs/{org}/hooks/{hook_id}': { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations['orgs/get-webhook'] + delete: operations['orgs/delete-webhook'] + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations['orgs/update-webhook'] + } + '/orgs/{org}/hooks/{hook_id}/config': { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations['orgs/get-webhook-config-for-org'] + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations['orgs/update-webhook-config-for-org'] + } + '/orgs/{org}/hooks/{hook_id}/deliveries': { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + get: operations['orgs/list-webhook-deliveries'] + } + '/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}': { + /** Returns a delivery for a webhook configured in an organization. */ + get: operations['orgs/get-webhook-delivery'] + } + '/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts': { + /** Redeliver a delivery for a webhook configured in an organization. */ + post: operations['orgs/redeliver-webhook-delivery'] + } + '/orgs/{org}/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations['orgs/ping-webhook'] + } + '/orgs/{org}/installation': { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-org-installation'] + } + '/orgs/{org}/installations': { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations['orgs/list-app-installations'] + } + '/orgs/{org}/interaction-limits': { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations['interactions/get-restrictions-for-org'] + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations['interactions/set-restrictions-for-org'] + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations['interactions/remove-restrictions-for-org'] + } + '/orgs/{org}/invitations': { + /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ + get: operations['orgs/list-pending-invitations'] + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['orgs/create-invitation'] + } + '/orgs/{org}/invitations/{invitation_id}': { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations['orgs/cancel-invitation'] + } + '/orgs/{org}/invitations/{invitation_id}/teams': { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations['orgs/list-invitation-teams'] + } + '/orgs/{org}/issues': { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations['issues/list-for-org'] + } + '/orgs/{org}/members': { + /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ + get: operations['orgs/list-members'] + } + '/orgs/{org}/members/{username}': { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations['orgs/check-membership-for-user'] + /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ + delete: operations['orgs/remove-member'] + } + '/orgs/{org}/memberships/{username}': { + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + get: operations['orgs/get-membership-for-user'] + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + put: operations['orgs/set-membership-for-user'] + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + delete: operations['orgs/remove-membership-for-user'] + } + '/orgs/{org}/migrations': { + /** Lists the most recent migrations. */ + get: operations['migrations/list-for-org'] + /** Initiates the generation of a migration archive. */ + post: operations['migrations/start-for-org'] + } + '/orgs/{org}/migrations/{migration_id}': { + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + get: operations['migrations/get-status-for-org'] + } + '/orgs/{org}/migrations/{migration_id}/archive': { + /** Fetches the URL to a migration archive. */ + get: operations['migrations/download-archive-for-org'] + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations['migrations/delete-archive-for-org'] + } + '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations['migrations/unlock-repo-for-org'] + } + '/orgs/{org}/migrations/{migration_id}/repositories': { + /** List all the repositories for this organization migration. */ + get: operations['migrations/list-repos-for-org'] + } + '/orgs/{org}/outside_collaborators': { + /** List all users who are outside collaborators of an organization. */ + get: operations['orgs/list-outside-collaborators'] + } + '/orgs/{org}/outside_collaborators/{username}': { + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + put: operations['orgs/convert-member-to-outside-collaborator'] + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations['orgs/remove-outside-collaborator'] + } + '/orgs/{org}/packages': { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/list-packages-for-organization'] + } + '/orgs/{org}/packages/{package_type}/{package_name}': { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-for-organization'] + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations['packages/delete-package-for-org'] + } + '/orgs/{org}/packages/{package_type}/{package_name}/restore': { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations['packages/restore-package-for-org'] + } + '/orgs/{org}/packages/{package_type}/{package_name}/versions': { + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-all-package-versions-for-package-owned-by-org'] + } + '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-version-for-organization'] + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations['packages/delete-package-version-for-org'] + } + '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations['packages/restore-package-version-for-org'] + } + '/orgs/{org}/projects': { + /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations['projects/list-for-org'] + /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations['projects/create-for-org'] + } + '/orgs/{org}/public_members': { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations['orgs/list-public-members'] + } + '/orgs/{org}/public_members/{username}': { + get: operations['orgs/check-public-membership-for-user'] + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['orgs/set-public-membership-for-authenticated-user'] + delete: operations['orgs/remove-public-membership-for-authenticated-user'] + } + '/orgs/{org}/repos': { + /** Lists repositories for the specified organization. */ + get: operations['repos/list-for-org'] + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations['repos/create-in-org'] + } + '/orgs/{org}/secret-scanning/alerts': { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations['secret-scanning/list-alerts-for-org'] + } + '/orgs/{org}/settings/billing/actions': { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations['billing/get-github-actions-billing-org'] + } + '/orgs/{org}/settings/billing/advanced-security': { + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. + * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + */ + get: operations['billing/get-github-advanced-security-billing-org'] + } + '/orgs/{org}/settings/billing/packages': { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations['billing/get-github-packages-billing-org'] + } + '/orgs/{org}/settings/billing/shared-storage': { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations['billing/get-shared-storage-billing-org'] + } + '/orgs/{org}/team-sync/groups': { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + get: operations['teams/list-idp-groups-for-org'] + } + '/orgs/{org}/teams': { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations['teams/list'] + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations['teams/create'] + } + '/orgs/{org}/teams/{team_slug}': { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations['teams/get-by-name'] + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations['teams/delete-in-org'] + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations['teams/update-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions': { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations['teams/list-discussions-in-org'] + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + post: operations['teams/create-discussion-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}': { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations['teams/get-discussion-in-org'] + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations['teams/delete-discussion-in-org'] + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations['teams/update-discussion-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments': { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations['teams/list-discussion-comments-in-org'] + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + post: operations['teams/create-discussion-comment-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}': { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations['teams/get-discussion-comment-in-org'] + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations['teams/delete-discussion-comment-in-org'] + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations['teams/update-discussion-comment-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions': { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations['reactions/list-for-team-discussion-comment-in-org'] + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + post: operations['reactions/create-for-team-discussion-comment-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations['reactions/delete-for-team-discussion-comment'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions': { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations['reactions/list-for-team-discussion-in-org'] + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + post: operations['reactions/create-for-team-discussion-in-org'] + } + '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations['reactions/delete-for-team-discussion'] + } + '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations['teams/unlink-external-idp-group-from-team-for-org'] + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + patch: operations['teams/link-external-idp-group-to-team-for-org'] + } + '/orgs/{org}/teams/{team_slug}/invitations': { + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations['teams/list-pending-invitations-in-org'] + } + '/orgs/{org}/teams/{team_slug}/members': { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations['teams/list-members-in-org'] + } + '/orgs/{org}/teams/{team_slug}/memberships/{username}': { + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations['teams/get-membership-for-user-in-org'] + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations['teams/add-or-update-membership-for-user-in-org'] + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations['teams/remove-membership-for-user-in-org'] + } + '/orgs/{org}/teams/{team_slug}/projects': { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations['teams/list-projects-in-org'] + } + '/orgs/{org}/teams/{team_slug}/projects/{project_id}': { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations['teams/check-permissions-for-project-in-org'] + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations['teams/add-or-update-project-permissions-in-org'] + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations['teams/remove-project-in-org'] + } + '/orgs/{org}/teams/{team_slug}/repos': { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations['teams/list-repos-in-org'] + } + '/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}': { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations['teams/check-permissions-for-repo-in-org'] + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations['teams/add-or-update-repo-permissions-in-org'] + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations['teams/remove-repo-in-org'] + } + '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + get: operations['teams/list-idp-groups-in-org'] + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + patch: operations['teams/create-or-update-idp-group-connections-in-org'] + } + '/orgs/{org}/teams/{team_slug}/teams': { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations['teams/list-child-in-org'] + } + '/projects/{project_id}': { + /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations['projects/get'] + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations['projects/delete'] + /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + patch: operations['projects/update'] + } + '/projects/{project_id}/collaborators': { + /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ + get: operations['projects/list-collaborators'] + } + '/projects/{project_id}/collaborators/{username}': { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations['projects/add-collaborator'] + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations['projects/remove-collaborator'] + } + '/projects/{project_id}/collaborators/{username}/permission': { + /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ + get: operations['projects/get-permission-for-user'] + } + '/projects/{project_id}/columns': { + get: operations['projects/list-columns'] + post: operations['projects/create-column'] + } + '/projects/columns/{column_id}': { + get: operations['projects/get-column'] + delete: operations['projects/delete-column'] + patch: operations['projects/update-column'] + } + '/projects/columns/{column_id}/cards': { + get: operations['projects/list-cards'] + post: operations['projects/create-card'] + } + '/projects/columns/{column_id}/moves': { + post: operations['projects/move-column'] + } + '/projects/columns/cards/{card_id}': { + get: operations['projects/get-card'] + delete: operations['projects/delete-card'] + patch: operations['projects/update-card'] + } + '/projects/columns/cards/{card_id}/moves': { + post: operations['projects/move-card'] + } + '/rate_limit': { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: operations['rate-limit/get'] + } + '/reactions/{reaction_id}': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). + * + * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). + */ + delete: operations['reactions/delete-legacy'] + } + '/repos/{owner}/{repo}': { + /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ + get: operations['repos/get'] + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + delete: operations['repos/delete'] + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations['repos/update'] + } + '/repos/{owner}/{repo}/actions/artifacts': { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/list-artifacts-for-repo'] + } + '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}': { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/get-artifact'] + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations['actions/delete-artifact'] + } + '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}': { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/download-artifact'] + } + '/repos/{owner}/{repo}/actions/jobs/{job_id}': { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/get-job-for-workflow-run'] + } + '/repos/{owner}/{repo}/actions/jobs/{job_id}/logs': { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/download-job-logs-for-workflow-run'] + } + '/repos/{owner}/{repo}/actions/permissions': { + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations['actions/get-github-actions-permissions-repository'] + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations['actions/set-github-actions-permissions-repository'] + } + '/repos/{owner}/{repo}/actions/permissions/selected-actions': { + /** + * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + get: operations['actions/get-allowed-actions-repository'] + /** + * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + put: operations['actions/set-allowed-actions-repository'] + } + '/repos/{owner}/{repo}/actions/runners': { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations['actions/list-self-hosted-runners-for-repo'] + } + '/repos/{owner}/{repo}/actions/runners/{runner_id}': { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations['actions/get-self-hosted-runner-for-repo'] + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations['actions/delete-self-hosted-runner-from-repo'] + } + '/repos/{owner}/{repo}/actions/runners/{runner_id}/labels': { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations['actions/list-labels-for-self-hosted-runner-for-repo'] + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + put: operations['actions/set-custom-labels-for-self-hosted-runner-for-repo'] + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + post: operations['actions/add-custom-labels-to-self-hosted-runner-for-repo'] + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations['actions/remove-all-custom-labels-from-self-hosted-runner-for-repo'] + } + '/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}': { + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + delete: operations['actions/remove-custom-label-from-self-hosted-runner-for-repo'] + } + '/repos/{owner}/{repo}/actions/runners/downloads': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations['actions/list-runner-applications-for-repo'] + } + '/repos/{owner}/{repo}/actions/runners/registration-token': { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations['actions/create-registration-token-for-repo'] + } + '/repos/{owner}/{repo}/actions/runners/remove-token': { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations['actions/create-remove-token-for-repo'] + } + '/repos/{owner}/{repo}/actions/runs': { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/list-workflow-runs-for-repo'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}': { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/get-workflow-run'] + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations['actions/delete-workflow-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/approvals': { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/get-reviews-for-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations['actions/approve-workflow-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/list-workflow-run-artifacts'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}': { + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + get: operations['actions/get-workflow-run-attempt'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations['actions/list-jobs-for-workflow-run-attempt'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/download-workflow-run-attempt-logs'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/cancel': { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations['actions/cancel-workflow-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/jobs': { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations['actions/list-jobs-for-workflow-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations['actions/download-workflow-run-logs'] + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations['actions/delete-workflow-run-logs'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments': { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-pending-deployments-for-run'] + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Anyone with read access to the repository contents and deployments can use this endpoint. + */ + post: operations['actions/review-pending-deployments-for-run'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun': { + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations['actions/re-run-workflow'] + } + '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-workflow-run-usage'] + } + '/repos/{owner}/{repo}/actions/secrets': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/list-repo-secrets'] + } + '/repos/{owner}/{repo}/actions/secrets/{secret_name}': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/get-repo-secret'] + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['actions/create-or-update-repo-secret'] + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations['actions/delete-repo-secret'] + } + '/repos/{owner}/{repo}/actions/secrets/public-key': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/get-repo-public-key'] + } + '/repos/{owner}/{repo}/actions/workflows': { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/list-repo-workflows'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}': { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['actions/get-workflow'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable': { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations['actions/disable-workflow'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches': { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + post: operations['actions/create-workflow-dispatch'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable': { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations['actions/enable-workflow'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs': { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations['actions/list-workflow-runs'] + } + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-workflow-usage'] + } + '/repos/{owner}/{repo}/assignees': { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations['issues/list-assignees'] + } + '/repos/{owner}/{repo}/assignees/{assignee}': { + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations['issues/check-user-can-be-assigned'] + } + '/repos/{owner}/{repo}/autolinks': { + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations['repos/list-autolinks'] + /** Users with admin access to the repository can create an autolink. */ + post: operations['repos/create-autolink'] + } + '/repos/{owner}/{repo}/autolinks/{autolink_id}': { + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations['repos/get-autolink'] + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations['repos/delete-autolink'] + } + '/repos/{owner}/{repo}/automated-security-fixes': { + /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + put: operations['repos/enable-automated-security-fixes'] + /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + delete: operations['repos/disable-automated-security-fixes'] + } + '/repos/{owner}/{repo}/branches': { + get: operations['repos/list-branches'] + } + '/repos/{owner}/{repo}/branches/{branch}': { + get: operations['repos/get-branch'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['repos/get-branch-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + put: operations['repos/update-branch-protection'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations['repos/delete-branch-protection'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['repos/get-admin-branch-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations['repos/set-admin-branch-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations['repos/delete-admin-branch-protection'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['repos/get-pull-request-review-protection'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations['repos/delete-pull-request-review-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + patch: operations['repos/update-pull-request-review-protection'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations['repos/get-commit-signature-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + post: operations['repos/create-commit-signature-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + delete: operations['repos/delete-commit-signature-protection'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['repos/get-status-checks-protection'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations['repos/remove-status-check-protection'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations['repos/update-status-check-protection'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['repos/get-all-status-check-contexts'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + put: operations['repos/set-status-check-contexts'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + post: operations['repos/add-status-check-contexts'] + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + delete: operations['repos/remove-status-check-contexts'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations['repos/get-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations['repos/delete-access-restrictions'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + get: operations['repos/get-apps-with-access-to-protected-branch'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations['repos/set-app-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations['repos/add-app-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations['repos/remove-app-access-restrictions'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations['repos/get-teams-with-access-to-protected-branch'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations['repos/set-team-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations['repos/add-team-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations['repos/remove-team-access-restrictions'] + } + '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations['repos/get-users-with-access-to-protected-branch'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations['repos/set-user-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations['repos/add-user-access-restrictions'] + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations['repos/remove-user-access-restrictions'] + } + '/repos/{owner}/{repo}/branches/{branch}/rename': { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations['repos/rename-branch'] + } + '/repos/{owner}/{repo}/check-runs': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations['checks/create'] + } + '/repos/{owner}/{repo}/check-runs/{check_run_id}': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations['checks/get'] + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + patch: operations['checks/update'] + } + '/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations': { + /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ + get: operations['checks/list-annotations'] + } + '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations['checks/rerequest-run'] + } + '/repos/{owner}/{repo}/check-suites': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations['checks/create-suite'] + } + '/repos/{owner}/{repo}/check-suites/{check_suite_id}': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + get: operations['checks/get-suite'] + } + '/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations['checks/list-for-suite'] + } + '/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest': { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations['checks/rerequest-suite'] + } + '/repos/{owner}/{repo}/check-suites/preferences': { + /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations['checks/set-suites-preferences'] + } + '/repos/{owner}/{repo}/code-scanning/alerts': { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations['code-scanning/list-alerts-for-repo'] + } + '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}': { + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + get: operations['code-scanning/get-alert'] + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + patch: operations['code-scanning/update-alert'] + } + '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances': { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations['code-scanning/list-alert-instances'] + } + '/repos/{owner}/{repo}/code-scanning/analyses': { + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + get: operations['code-scanning/list-recent-analyses'] + } + '/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}': { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + get: operations['code-scanning/get-analysis'] + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations['code-scanning/delete-analysis'] + } + '/repos/{owner}/{repo}/code-scanning/sarifs': { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + post: operations['code-scanning/upload-sarif'] + } + '/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations['code-scanning/get-sarif'] + } + '/repos/{owner}/{repo}/codespaces': { + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/list-in-repository-for-authenticated-user'] + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/create-with-repo-for-authenticated-user'] + } + '/repos/{owner}/{repo}/codespaces/machines': { + /** + * List the machine types available for a given repository based on its configuration. + * + * Location is required. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/repo-machines-for-authenticated-user'] + } + '/repos/{owner}/{repo}/collaborators': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations['repos/list-collaborators'] + } + '/repos/{owner}/{repo}/collaborators/{username}': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + get: operations['repos/check-collaborator'] + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + put: operations['repos/add-collaborator'] + delete: operations['repos/remove-collaborator'] + } + '/repos/{owner}/{repo}/collaborators/{username}/permission': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations['repos/get-collaborator-permission-level'] + } + '/repos/{owner}/{repo}/comments': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations['repos/list-commit-comments-for-repo'] + } + '/repos/{owner}/{repo}/comments/{comment_id}': { + get: operations['repos/get-commit-comment'] + delete: operations['repos/delete-commit-comment'] + patch: operations['repos/update-commit-comment'] + } + '/repos/{owner}/{repo}/comments/{comment_id}/reactions': { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations['reactions/list-for-commit-comment'] + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations['reactions/create-for-commit-comment'] + } + '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations['reactions/delete-for-commit-comment'] + } + '/repos/{owner}/{repo}/commits': { + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations['repos/list-commits'] + } + '/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations['repos/list-branches-for-head-commit'] + } + '/repos/{owner}/{repo}/commits/{commit_sha}/comments': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations['repos/list-comments-for-commit'] + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['repos/create-commit-comment'] + } + '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + get: operations['repos/list-pull-requests-associated-with-commit'] + } + '/repos/{owner}/{repo}/commits/{ref}': { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations['repos/get-commit'] + } + '/repos/{owner}/{repo}/commits/{ref}/check-runs': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations['checks/list-for-ref'] + } + '/repos/{owner}/{repo}/commits/{ref}/check-suites': { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + get: operations['checks/list-suites-for-ref'] + } + '/repos/{owner}/{repo}/commits/{ref}/status': { + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + get: operations['repos/get-combined-status-for-ref'] + } + '/repos/{owner}/{repo}/commits/{ref}/statuses': { + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + get: operations['repos/list-commit-statuses-for-ref'] + } + '/repos/{owner}/{repo}/community/profile': { + /** + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations['repos/get-community-profile-metrics'] + } + '/repos/{owner}/{repo}/compare/{basehead}': { + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations['repos/compare-commits'] + } + '/repos/{owner}/{repo}/contents/{path}': { + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Note**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * #### If the content is a directory + * The response will be an array of objects, one object for each item in the directory. + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value + * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). + * In the next major version of the API, the type will be returned as "submodule". + * + * #### If the content is a symlink + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the + * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific + * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out + * the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the + * github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + get: operations['repos/get-content'] + /** Creates a new file or replaces an existing file in a repository. */ + put: operations['repos/create-or-update-file-contents'] + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + delete: operations['repos/delete-file'] + } + '/repos/{owner}/{repo}/contributors': { + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + get: operations['repos/list-contributors'] + } + '/repos/{owner}/{repo}/dependabot/secrets': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations['dependabot/list-repo-secrets'] + } + '/repos/{owner}/{repo}/dependabot/secrets/{secret_name}': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations['dependabot/get-repo-secret'] + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['dependabot/create-or-update-repo-secret'] + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations['dependabot/delete-repo-secret'] + } + '/repos/{owner}/{repo}/dependabot/secrets/public-key': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations['dependabot/get-repo-public-key'] + } + '/repos/{owner}/{repo}/deployments': { + /** Simple filtering of deployments is available via query parameters: */ + get: operations['repos/list-deployments'] + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. + * + * #### Merged branch response + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * #### Merge conflict response + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * #### Failed commit status checks + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + post: operations['repos/create-deployment'] + } + '/repos/{owner}/{repo}/deployments/{deployment_id}': { + get: operations['repos/get-deployment'] + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + delete: operations['repos/delete-deployment'] + } + '/repos/{owner}/{repo}/deployments/{deployment_id}/statuses': { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations['repos/list-deployment-statuses'] + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + post: operations['repos/create-deployment-status'] + } + '/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}': { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations['repos/get-deployment-status'] + } + '/repos/{owner}/{repo}/dispatches': { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + post: operations['repos/create-dispatch-event'] + } + '/repos/{owner}/{repo}/environments': { + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['repos/get-all-environments'] + } + '/repos/{owner}/{repo}/environments/{environment_name}': { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations['repos/get-environment'] + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + put: operations['repos/create-or-update-environment'] + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations['repos/delete-an-environment'] + } + '/repos/{owner}/{repo}/events': { + get: operations['activity/list-repo-events'] + } + '/repos/{owner}/{repo}/forks': { + get: operations['repos/list-forks'] + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations['repos/create-fork'] + } + '/repos/{owner}/{repo}/git/blobs': { + post: operations['git/create-blob'] + } + '/repos/{owner}/{repo}/git/blobs/{file_sha}': { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations['git/get-blob'] + } + '/repos/{owner}/{repo}/git/commits': { + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations['git/create-commit'] + } + '/repos/{owner}/{repo}/git/commits/{commit_sha}': { + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations['git/get-commit'] + } + '/repos/{owner}/{repo}/git/matching-refs/{ref}': { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations['git/list-matching-refs'] + } + '/repos/{owner}/{repo}/git/ref/{ref}': { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations['git/get-ref'] + } + '/repos/{owner}/{repo}/git/refs': { + /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ + post: operations['git/create-ref'] + } + '/repos/{owner}/{repo}/git/refs/{ref}': { + delete: operations['git/delete-ref'] + patch: operations['git/update-ref'] + } + '/repos/{owner}/{repo}/git/tags': { + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations['git/create-tag'] + } + '/repos/{owner}/{repo}/git/tags/{tag_sha}': { + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations['git/get-tag'] + } + '/repos/{owner}/{repo}/git/trees': { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + post: operations['git/create-tree'] + } + '/repos/{owner}/{repo}/git/trees/{tree_sha}': { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + get: operations['git/get-tree'] + } + '/repos/{owner}/{repo}/hooks': { + get: operations['repos/list-webhooks'] + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + post: operations['repos/create-webhook'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}': { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations['repos/get-webhook'] + delete: operations['repos/delete-webhook'] + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations['repos/update-webhook'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/config': { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations['repos/get-webhook-config-for-repo'] + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations['repos/update-webhook-config-for-repo'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + get: operations['repos/list-webhook-deliveries'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}': { + /** Returns a delivery for a webhook configured in a repository. */ + get: operations['repos/get-webhook-delivery'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts': { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + post: operations['repos/redeliver-webhook-delivery'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations['repos/ping-webhook'] + } + '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + post: operations['repos/test-push-webhook'] + } + '/repos/{owner}/{repo}/import': { + /** + * View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + get: operations['migrations/get-import-status'] + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations['migrations/start-import'] + /** Stop an import for a repository. */ + delete: operations['migrations/cancel-import'] + /** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API + * request. If no parameters are provided, the import will be restarted. + */ + patch: operations['migrations/update-import'] + } + '/repos/{owner}/{repo}/import/authors': { + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations['migrations/get-commit-authors'] + } + '/repos/{owner}/{repo}/import/authors/{author_id}': { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations['migrations/map-commit-author'] + } + '/repos/{owner}/{repo}/import/large_files': { + /** List files larger than 100MB found during the import */ + get: operations['migrations/get-large-files'] + } + '/repos/{owner}/{repo}/import/lfs': { + /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ + patch: operations['migrations/set-lfs-preference'] + } + '/repos/{owner}/{repo}/installation': { + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-repo-installation'] + } + '/repos/{owner}/{repo}/interaction-limits': { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations['interactions/get-restrictions-for-repo'] + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations['interactions/set-restrictions-for-repo'] + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations['interactions/remove-restrictions-for-repo'] + } + '/repos/{owner}/{repo}/invitations': { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations['repos/list-invitations'] + } + '/repos/{owner}/{repo}/invitations/{invitation_id}': { + delete: operations['repos/delete-invitation'] + patch: operations['repos/update-invitation'] + } + '/repos/{owner}/{repo}/issues': { + /** + * List issues in a repository. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations['issues/list-for-repo'] + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['issues/create'] + } + '/repos/{owner}/{repo}/issues/{issue_number}': { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations['issues/get'] + /** Issue owners and users with push access can edit an issue. */ + patch: operations['issues/update'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/assignees': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations['issues/add-assignees'] + /** Removes one or more assignees from an issue. */ + delete: operations['issues/remove-assignees'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/comments': { + /** Issue Comments are ordered by ascending ID. */ + get: operations['issues/list-comments'] + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations['issues/create-comment'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/events': { + get: operations['issues/list-events'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/labels': { + get: operations['issues/list-labels-on-issue'] + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations['issues/set-labels'] + post: operations['issues/add-labels'] + delete: operations['issues/remove-all-labels'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}': { + /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ + delete: operations['issues/remove-label'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/lock': { + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['issues/lock'] + /** Users with push access can unlock an issue's conversation. */ + delete: operations['issues/unlock'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/reactions': { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations['reactions/list-for-issue'] + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations['reactions/create-for-issue'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations['reactions/delete-for-issue'] + } + '/repos/{owner}/{repo}/issues/{issue_number}/timeline': { + get: operations['issues/list-events-for-timeline'] + } + '/repos/{owner}/{repo}/issues/comments': { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations['issues/list-comments-for-repo'] + } + '/repos/{owner}/{repo}/issues/comments/{comment_id}': { + get: operations['issues/get-comment'] + delete: operations['issues/delete-comment'] + patch: operations['issues/update-comment'] + } + '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions': { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations['reactions/list-for-issue-comment'] + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations['reactions/create-for-issue-comment'] + } + '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations['reactions/delete-for-issue-comment'] + } + '/repos/{owner}/{repo}/issues/events': { + get: operations['issues/list-events-for-repo'] + } + '/repos/{owner}/{repo}/issues/events/{event_id}': { + get: operations['issues/get-event'] + } + '/repos/{owner}/{repo}/keys': { + get: operations['repos/list-deploy-keys'] + /** You can create a read-only deploy key. */ + post: operations['repos/create-deploy-key'] + } + '/repos/{owner}/{repo}/keys/{key_id}': { + get: operations['repos/get-deploy-key'] + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations['repos/delete-deploy-key'] + } + '/repos/{owner}/{repo}/labels': { + get: operations['issues/list-labels-for-repo'] + post: operations['issues/create-label'] + } + '/repos/{owner}/{repo}/labels/{name}': { + get: operations['issues/get-label'] + delete: operations['issues/delete-label'] + patch: operations['issues/update-label'] + } + '/repos/{owner}/{repo}/languages': { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations['repos/list-languages'] + } + '/repos/{owner}/{repo}/lfs': { + put: operations['repos/enable-lfs-for-repo'] + delete: operations['repos/disable-lfs-for-repo'] + } + '/repos/{owner}/{repo}/license': { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations['licenses/get-for-repo'] + } + '/repos/{owner}/{repo}/merge-upstream': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + post: operations['repos/merge-upstream'] + } + '/repos/{owner}/{repo}/merges': { + post: operations['repos/merge'] + } + '/repos/{owner}/{repo}/milestones': { + get: operations['issues/list-milestones'] + post: operations['issues/create-milestone'] + } + '/repos/{owner}/{repo}/milestones/{milestone_number}': { + get: operations['issues/get-milestone'] + delete: operations['issues/delete-milestone'] + patch: operations['issues/update-milestone'] + } + '/repos/{owner}/{repo}/milestones/{milestone_number}/labels': { + get: operations['issues/list-labels-for-milestone'] + } + '/repos/{owner}/{repo}/notifications': { + /** List all notifications for the current user. */ + get: operations['activity/list-repo-notifications-for-authenticated-user'] + /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations['activity/mark-repo-notifications-as-read'] + } + '/repos/{owner}/{repo}/pages': { + get: operations['repos/get-pages'] + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + put: operations['repos/update-information-about-pages-site'] + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + post: operations['repos/create-pages-site'] + delete: operations['repos/delete-pages-site'] + } + '/repos/{owner}/{repo}/pages/builds': { + get: operations['repos/list-pages-builds'] + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + post: operations['repos/request-pages-build'] + } + '/repos/{owner}/{repo}/pages/builds/{build_id}': { + get: operations['repos/get-pages-build'] + } + '/repos/{owner}/{repo}/pages/builds/latest': { + get: operations['repos/get-latest-pages-build'] + } + '/repos/{owner}/{repo}/pages/health': { + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + get: operations['repos/get-pages-health-check'] + } + '/repos/{owner}/{repo}/projects': { + /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations['projects/list-for-repo'] + /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations['projects/create-for-repo'] + } + '/repos/{owner}/{repo}/pulls': { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations['pulls/list'] + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations['pulls/create'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}': { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: operations['pulls/get'] + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + patch: operations['pulls/update'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/create-with-pr-for-authenticated-user'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations['pulls/list-review-comments'] + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['pulls/create-review-comment'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['pulls/create-reply-for-review-comment'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations['pulls/list-commits'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/files': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations['pulls/list-files'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { + get: operations['pulls/check-if-merged'] + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + put: operations['pulls/merge'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + get: operations['pulls/list-requested-reviewers'] + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + post: operations['pulls/request-reviewers'] + delete: operations['pulls/remove-requested-reviewers'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/reviews': { + /** The list of reviews returns in chronological order. */ + get: operations['pulls/list-reviews'] + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + post: operations['pulls/create-review'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}': { + get: operations['pulls/get-review'] + /** Update the review summary comment with new text. */ + put: operations['pulls/update-review'] + delete: operations['pulls/delete-pending-review'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments': { + /** List comments for a specific pull request review. */ + get: operations['pulls/list-comments-for-review'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations['pulls/dismiss-review'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events': { + post: operations['pulls/submit-review'] + } + '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations['pulls/update-branch'] + } + '/repos/{owner}/{repo}/pulls/comments': { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations['pulls/list-review-comments-for-repo'] + } + '/repos/{owner}/{repo}/pulls/comments/{comment_id}': { + /** Provides details for a review comment. */ + get: operations['pulls/get-review-comment'] + /** Deletes a review comment. */ + delete: operations['pulls/delete-review-comment'] + /** Enables you to edit a review comment. */ + patch: operations['pulls/update-review-comment'] + } + '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions': { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations['reactions/list-for-pull-request-review-comment'] + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations['reactions/create-for-pull-request-review-comment'] + } + '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations['reactions/delete-for-pull-request-comment'] + } + '/repos/{owner}/{repo}/readme': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations['repos/get-readme'] + } + '/repos/{owner}/{repo}/readme/{dir}': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations['repos/get-readme-in-directory'] + } + '/repos/{owner}/{repo}/releases': { + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations['repos/list-releases'] + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['repos/create-release'] + } + '/repos/{owner}/{repo}/releases/{release_id}': { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations['repos/get-release'] + /** Users with push access to the repository can delete a release. */ + delete: operations['repos/delete-release'] + /** Users with push access to the repository can edit a release. */ + patch: operations['repos/update-release'] + } + '/repos/{owner}/{repo}/releases/{release_id}/assets': { + get: operations['repos/list-release-assets'] + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations['repos/upload-release-asset'] + } + '/repos/{owner}/{repo}/releases/{release_id}/reactions': { + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + post: operations['reactions/create-for-release'] + } + '/repos/{owner}/{repo}/releases/assets/{asset_id}': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + get: operations['repos/get-release-asset'] + delete: operations['repos/delete-release-asset'] + /** Users with push access to the repository can edit a release asset. */ + patch: operations['repos/update-release-asset'] + } + '/repos/{owner}/{repo}/releases/generate-notes': { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations['repos/generate-release-notes'] + } + '/repos/{owner}/{repo}/releases/latest': { + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + get: operations['repos/get-latest-release'] + } + '/repos/{owner}/{repo}/releases/tags/{tag}': { + /** Get a published release with the specified tag. */ + get: operations['repos/get-release-by-tag'] + } + '/repos/{owner}/{repo}/secret-scanning/alerts': { + /** + * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations['secret-scanning/list-alerts-for-repo'] + } + '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}': { + /** + * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations['secret-scanning/get-alert'] + /** + * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + patch: operations['secret-scanning/update-alert'] + } + '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { + /** + * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations['secret-scanning/list-locations-for-alert'] + } + '/repos/{owner}/{repo}/stargazers': { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations['activity/list-stargazers-for-repo'] + } + '/repos/{owner}/{repo}/stats/code_frequency': { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations['repos/get-code-frequency-stats'] + } + '/repos/{owner}/{repo}/stats/commit_activity': { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations['repos/get-commit-activity-stats'] + } + '/repos/{owner}/{repo}/stats/contributors': { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + get: operations['repos/get-contributors-stats'] + } + '/repos/{owner}/{repo}/stats/participation': { + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + get: operations['repos/get-participation-stats'] + } + '/repos/{owner}/{repo}/stats/punch_card': { + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + get: operations['repos/get-punch-card-stats'] + } + '/repos/{owner}/{repo}/statuses/{sha}': { + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + post: operations['repos/create-commit-status'] + } + '/repos/{owner}/{repo}/subscribers': { + /** Lists the people watching the specified repository. */ + get: operations['activity/list-watchers-for-repo'] + } + '/repos/{owner}/{repo}/subscription': { + get: operations['activity/get-repo-subscription'] + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations['activity/set-repo-subscription'] + /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations['activity/delete-repo-subscription'] + } + '/repos/{owner}/{repo}/tags': { + get: operations['repos/list-tags'] + } + '/repos/{owner}/{repo}/tarball/{ref}': { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations['repos/download-tarball-archive'] + } + '/repos/{owner}/{repo}/teams': { + get: operations['repos/list-teams'] + } + '/repos/{owner}/{repo}/topics': { + get: operations['repos/get-all-topics'] + put: operations['repos/replace-all-topics'] + } + '/repos/{owner}/{repo}/traffic/clones': { + /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + get: operations['repos/get-clones'] + } + '/repos/{owner}/{repo}/traffic/popular/paths': { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations['repos/get-top-paths'] + } + '/repos/{owner}/{repo}/traffic/popular/referrers': { + /** Get the top 10 referrers over the last 14 days. */ + get: operations['repos/get-top-referrers'] + } + '/repos/{owner}/{repo}/traffic/views': { + /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + get: operations['repos/get-views'] + } + '/repos/{owner}/{repo}/transfer': { + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + post: operations['repos/transfer'] + } + '/repos/{owner}/{repo}/vulnerability-alerts': { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations['repos/check-vulnerability-alerts'] + /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations['repos/enable-vulnerability-alerts'] + /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations['repos/disable-vulnerability-alerts'] + } + '/repos/{owner}/{repo}/zipball/{ref}': { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations['repos/download-zipball-archive'] + } + '/repos/{template_owner}/{template_repo}/generate': { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + post: operations['repos/create-using-template'] + } + '/repositories': { + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + get: operations['repos/list-public'] + } + '/repositories/{repository_id}/environments/{environment_name}/secrets': { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/list-environment-secrets'] + } + '/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}': { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/get-environment-secret'] + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['actions/create-or-update-environment-secret'] + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations['actions/delete-environment-secret'] + } + '/repositories/{repository_id}/environments/{environment_name}/secrets/public-key': { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations['actions/get-environment-public-key'] + } + '/scim/v2/enterprises/{enterprise}/Groups': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations['enterprise-admin/list-provisioned-groups-enterprise'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + post: operations['enterprise-admin/provision-and-invite-enterprise-group'] + } + '/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations['enterprise-admin/get-provisioning-information-for-enterprise-group'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + put: operations['enterprise-admin/set-information-for-provisioned-enterprise-group'] + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations['enterprise-admin/delete-scim-group-from-enterprise'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + patch: operations['enterprise-admin/update-attribute-for-enterprise-group'] + } + '/scim/v2/enterprises/{enterprise}/Users': { + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + get: operations['enterprise-admin/list-provisioned-identities-enterprise'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + post: operations['enterprise-admin/provision-and-invite-enterprise-user'] + } + '/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations['enterprise-admin/get-provisioning-information-for-enterprise-user'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations['enterprise-admin/set-information-for-provisioned-enterprise-user'] + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations['enterprise-admin/delete-user-from-enterprise'] + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations['enterprise-admin/update-attribute-for-enterprise-user'] + } + '/scim/v2/organizations/{org}/Users': { + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + get: operations['scim/list-provisioned-identities'] + /** Provision organization membership for a user, and send an activation email to the email address. */ + post: operations['scim/provision-and-invite-user'] + } + '/scim/v2/organizations/{org}/Users/{scim_user_id}': { + get: operations['scim/get-provisioning-information-for-user'] + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations['scim/set-information-for-provisioned-user'] + delete: operations['scim/delete-user-from-org'] + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations['scim/update-attribute-for-user'] + } + '/search/code': { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + get: operations['search/code'] + } + '/search/commits': { + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations['search/commits'] + } + '/search/issues': { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations['search/issues-and-pull-requests'] + } + '/search/labels': { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations['search/labels'] + } + '/search/repositories': { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations['search/repos'] + } + '/search/topics': { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + get: operations['search/topics'] + } + '/search/users': { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations['search/users'] + } + '/teams/{team_id}': { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations['teams/get-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations['teams/delete-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations['teams/update-legacy'] + } + '/teams/{team_id}/discussions': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['teams/list-discussions-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['teams/create-discussion-legacy'] + } + '/teams/{team_id}/discussions/{discussion_number}': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['teams/get-discussion-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations['teams/delete-discussion-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations['teams/update-discussion-legacy'] + } + '/teams/{team_id}/discussions/{discussion_number}/comments': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['teams/list-discussion-comments-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations['teams/create-discussion-comment-legacy'] + } + '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['teams/get-discussion-comment-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations['teams/delete-discussion-comment-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations['teams/update-discussion-comment-legacy'] + } + '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['reactions/list-for-team-discussion-comment-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations['reactions/create-for-team-discussion-comment-legacy'] + } + '/teams/{team_id}/discussions/{discussion_number}/reactions': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations['reactions/list-for-team-discussion-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations['reactions/create-for-team-discussion-legacy'] + } + '/teams/{team_id}/invitations': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations['teams/list-pending-invitations-legacy'] + } + '/teams/{team_id}/members': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations['teams/list-members-legacy'] + } + '/teams/{team_id}/members/{username}': { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations['teams/get-member-legacy'] + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['teams/add-member-legacy'] + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations['teams/remove-member-legacy'] + } + '/teams/{team_id}/memberships/{username}': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + get: operations['teams/get-membership-for-user-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + put: operations['teams/add-or-update-membership-for-user-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations['teams/remove-membership-for-user-legacy'] + } + '/teams/{team_id}/projects': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations['teams/list-projects-legacy'] + } + '/teams/{team_id}/projects/{project_id}': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations['teams/check-permissions-for-project-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + put: operations['teams/add-or-update-project-permissions-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + delete: operations['teams/remove-project-legacy'] + } + '/teams/{team_id}/repos': { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations['teams/list-repos-legacy'] + } + '/teams/{team_id}/repos/{owner}/{repo}': { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations['teams/check-permissions-for-repo-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['teams/add-or-update-repo-permissions-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + delete: operations['teams/remove-repo-legacy'] + } + '/teams/{team_id}/team-sync/group-mappings': { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + get: operations['teams/list-idp-groups-for-legacy'] + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + patch: operations['teams/create-or-update-idp-group-connections-legacy'] + } + '/teams/{team_id}/teams': { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations['teams/list-child-legacy'] + } + '/user': { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations['users/get-authenticated'] + /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ + patch: operations['users/update-authenticated'] + } + '/user/blocks': { + /** List the users you've blocked on your personal account. */ + get: operations['users/list-blocked-by-authenticated-user'] + } + '/user/blocks/{username}': { + get: operations['users/check-blocked'] + put: operations['users/block'] + delete: operations['users/unblock'] + } + '/user/codespaces': { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/list-for-authenticated-user'] + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/create-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}': { + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/get-for-authenticated-user'] + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + delete: operations['codespaces/delete-for-authenticated-user'] + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + patch: operations['codespaces/update-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}/exports': { + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/export-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}/exports/{export_id}': { + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/get-export-details-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}/machines': { + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + get: operations['codespaces/codespace-machines-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}/start': { + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/start-for-authenticated-user'] + } + '/user/codespaces/{codespace_name}/stop': { + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + post: operations['codespaces/stop-for-authenticated-user'] + } + '/user/codespaces/secrets': { + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + get: operations['codespaces/list-secrets-for-authenticated-user'] + } + '/user/codespaces/secrets/{secret_name}': { + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + get: operations['codespaces/get-secret-for-authenticated-user'] + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations['codespaces/create-or-update-secret-for-authenticated-user'] + /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ + delete: operations['codespaces/delete-secret-for-authenticated-user'] + } + '/user/codespaces/secrets/{secret_name}/repositories': { + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] + /** + * Select the repositories that will use a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] + } + '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] + } + '/user/codespaces/secrets/public-key': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ + get: operations['codespaces/get-public-key-for-authenticated-user'] + } + '/user/email/visibility': { + /** Sets the visibility for your primary email addresses. */ + patch: operations['users/set-primary-email-visibility-for-authenticated-user'] + } + '/user/emails': { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations['users/list-emails-for-authenticated-user'] + /** This endpoint is accessible with the `user` scope. */ + post: operations['users/add-email-for-authenticated-user'] + /** This endpoint is accessible with the `user` scope. */ + delete: operations['users/delete-email-for-authenticated-user'] + } + '/user/followers': { + /** Lists the people following the authenticated user. */ + get: operations['users/list-followers-for-authenticated-user'] + } + '/user/following': { + /** Lists the people who the authenticated user follows. */ + get: operations['users/list-followed-by-authenticated-user'] + } + '/user/following/{username}': { + get: operations['users/check-person-is-followed-by-authenticated'] + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations['users/follow'] + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations['users/unfollow'] + } + '/user/gpg_keys': { + /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations['users/list-gpg-keys-for-authenticated-user'] + /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations['users/create-gpg-key-for-authenticated-user'] + } + '/user/gpg_keys/{gpg_key_id}': { + /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations['users/get-gpg-key-for-authenticated-user'] + /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations['users/delete-gpg-key-for-authenticated-user'] + } + '/user/installations': { + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + get: operations['apps/list-installations-for-authenticated-user'] + } + '/user/installations/{installation_id}/repositories': { + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + get: operations['apps/list-installation-repos-for-authenticated-user'] + } + '/user/installations/{installation_id}/repositories/{repository_id}': { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations['apps/add-repo-to-installation-for-authenticated-user'] + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] + } + '/user/interaction-limits': { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations['interactions/get-restrictions-for-authenticated-user'] + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations['interactions/set-restrictions-for-authenticated-user'] + /** Removes any interaction restrictions from your public repositories. */ + delete: operations['interactions/remove-restrictions-for-authenticated-user'] + } + '/user/issues': { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations['issues/list-for-authenticated-user'] + } + '/user/keys': { + /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations['users/list-public-ssh-keys-for-authenticated-user'] + /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations['users/create-public-ssh-key-for-authenticated-user'] + } + '/user/keys/{key_id}': { + /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations['users/get-public-ssh-key-for-authenticated-user'] + /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations['users/delete-public-ssh-key-for-authenticated-user'] + } + '/user/marketplace_purchases': { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations['apps/list-subscriptions-for-authenticated-user'] + } + '/user/marketplace_purchases/stubbed': { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] + } + '/user/memberships/orgs': { + get: operations['orgs/list-memberships-for-authenticated-user'] + } + '/user/memberships/orgs/{org}': { + get: operations['orgs/get-membership-for-authenticated-user'] + patch: operations['orgs/update-membership-for-authenticated-user'] + } + '/user/migrations': { + /** Lists all migrations a user has started. */ + get: operations['migrations/list-for-authenticated-user'] + /** Initiates the generation of a user migration archive. */ + post: operations['migrations/start-for-authenticated-user'] + } + '/user/migrations/{migration_id}': { + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations['migrations/get-status-for-authenticated-user'] + } + '/user/migrations/{migration_id}/archive': { + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + get: operations['migrations/get-archive-for-authenticated-user'] + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations['migrations/delete-archive-for-authenticated-user'] + } + '/user/migrations/{migration_id}/repos/{repo_name}/lock': { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ + delete: operations['migrations/unlock-repo-for-authenticated-user'] + } + '/user/migrations/{migration_id}/repositories': { + /** Lists all the repositories for this user migration. */ + get: operations['migrations/list-repos-for-authenticated-user'] + } + '/user/orgs': { + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + get: operations['orgs/list-for-authenticated-user'] + } + '/user/packages': { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/list-packages-for-authenticated-user'] + } + '/user/packages/{package_type}/{package_name}': { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-for-authenticated-user'] + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations['packages/delete-package-for-authenticated-user'] + } + '/user/packages/{package_type}/{package_name}/restore': { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations['packages/restore-package-for-authenticated-user'] + } + '/user/packages/{package_type}/{package_name}/versions': { + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] + } + '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-version-for-authenticated-user'] + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations['packages/delete-package-version-for-authenticated-user'] + } + '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations['packages/restore-package-version-for-authenticated-user'] + } + '/user/projects': { + post: operations['projects/create-for-authenticated-user'] + } + '/user/public_emails': { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations['users/list-public-emails-for-authenticated-user'] + } + '/user/repos': { + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + get: operations['repos/list-for-authenticated-user'] + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + post: operations['repos/create-for-authenticated-user'] + } + '/user/repository_invitations': { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations['repos/list-invitations-for-authenticated-user'] + } + '/user/repository_invitations/{invitation_id}': { + delete: operations['repos/decline-invitation-for-authenticated-user'] + patch: operations['repos/accept-invitation-for-authenticated-user'] + } + '/user/starred': { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations['activity/list-repos-starred-by-authenticated-user'] + } + '/user/starred/{owner}/{repo}': { + get: operations['activity/check-repo-is-starred-by-authenticated-user'] + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['activity/star-repo-for-authenticated-user'] + delete: operations['activity/unstar-repo-for-authenticated-user'] + } + '/user/subscriptions': { + /** Lists repositories the authenticated user is watching. */ + get: operations['activity/list-watched-repos-for-authenticated-user'] + } + '/user/teams': { + /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations['teams/list-for-authenticated-user'] + } + '/users': { + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations['users/list'] + } + '/users/{username}': { + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + get: operations['users/get-by-username'] + } + '/users/{username}/events': { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations['activity/list-events-for-authenticated-user'] + } + '/users/{username}/events/orgs/{org}': { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations['activity/list-org-events-for-authenticated-user'] + } + '/users/{username}/events/public': { + get: operations['activity/list-public-events-for-user'] + } + '/users/{username}/followers': { + /** Lists the people following the specified user. */ + get: operations['users/list-followers-for-user'] + } + '/users/{username}/following': { + /** Lists the people who the specified user follows. */ + get: operations['users/list-following-for-user'] + } + '/users/{username}/following/{target_user}': { + get: operations['users/check-following-for-user'] + } + '/users/{username}/gists': { + /** Lists public gists for the specified user: */ + get: operations['gists/list-for-user'] + } + '/users/{username}/gpg_keys': { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations['users/list-gpg-keys-for-user'] + } + '/users/{username}/hovercard': { + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations['users/get-context-for-user'] + } + '/users/{username}/installation': { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations['apps/get-user-installation'] + } + '/users/{username}/keys': { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations['users/list-public-keys-for-user'] + } + '/users/{username}/orgs': { + /** + * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations['orgs/list-for-user'] + } + '/users/{username}/packages': { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/list-packages-for-user'] + } + '/users/{username}/packages/{package_type}/{package_name}': { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-for-user'] + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations['packages/delete-package-for-user'] + } + '/users/{username}/packages/{package_type}/{package_name}/restore': { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations['packages/restore-package-for-user'] + } + '/users/{username}/packages/{package_type}/{package_name}/versions': { + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-all-package-versions-for-package-owned-by-user'] + } + '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations['packages/get-package-version-for-user'] + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations['packages/delete-package-version-for-user'] + } + '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations['packages/restore-package-version-for-user'] + } + '/users/{username}/projects': { + get: operations['projects/list-for-user'] + } + '/users/{username}/received_events': { + /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ + get: operations['activity/list-received-events-for-user'] + } + '/users/{username}/received_events/public': { + get: operations['activity/list-received-public-events-for-user'] + } + '/users/{username}/repos': { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations['repos/list-for-user'] + } + '/users/{username}/settings/billing/actions': { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations['billing/get-github-actions-billing-user'] + } + '/users/{username}/settings/billing/packages': { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations['billing/get-github-packages-billing-user'] + } + '/users/{username}/settings/billing/shared-storage': { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations['billing/get-shared-storage-billing-user'] + } + '/users/{username}/starred': { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations['activity/list-repos-starred-by-user'] + } + '/users/{username}/subscriptions': { + /** Lists repositories a user is watching. */ + get: operations['activity/list-repos-watched-by-user'] + } + '/zen': { + /** Get a random sentence from the Zen of GitHub */ + get: operations['meta/get-zen'] + } +} + +export interface components { + schemas: { + 'actions-billing-usage': { + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number + minutes_used_breakdown: { + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number + } + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number + } + /** @description Whether GitHub Actions can submit approving pull request reviews. */ + 'actions-can-approve-pull-request-reviews': boolean + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. + * @enum {string} + */ + 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions is enabled on the repository. */ + 'actions-enabled': boolean + 'actions-enterprise-permissions': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled_organizations: components['schemas']['enabled-organizations'] + selected_actions_url?: components['schemas']['selected-actions-url'] + /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ + selected_organizations_url?: string + } + 'actions-get-default-workflow-permissions': { + can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + } + 'actions-organization-permissions': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled_repositories: components['schemas']['enabled-repositories'] + selected_actions_url?: components['schemas']['selected-actions-url'] + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string + } + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + 'actions-public-key': { + /** @example 2011-01-26T19:01:12Z */ + created_at?: string + /** @example 2 */ + id?: number + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string + /** @example https://api.github.com/user/keys/2 */ + url?: string + } + 'actions-repository-permissions': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled: components['schemas']['actions-enabled'] + selected_actions_url?: components['schemas']['selected-actions-url'] + } + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + 'actions-secret': { + /** Format: date-time */ + created_at: string + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string + /** Format: date-time */ + updated_at: string + } + 'actions-set-default-workflow-permissions': { + can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] + default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + } + /** + * Actor + * @description Actor + */ + actor: { + /** Format: uri */ + avatar_url: string + display_login?: string + gravatar_id: string | null + id: number + login: string + /** Format: uri */ + url: string + } + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + 'added-to-project-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + project_card?: { + column_name: string + id: number + previous_column_name?: string + project_id: number + /** Format: uri */ + project_url: string + /** Format: uri */ + url: string + } + url: string + } + 'advanced-security-active-committers': { + repositories: components['schemas']['advanced-security-active-committers-repository'][] + /** @example 25 */ + total_advanced_security_committers?: number + } + 'advanced-security-active-committers-repository': { + /** @example 25 */ + advanced_security_committers: number + advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] + /** @example octocat/Hello-World */ + name: string + } + 'advanced-security-active-committers-user': { + /** @example 2021-11-03 */ + last_pushed_date: string + user_login: string + } + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'alert-created-at': string + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + 'alert-html-url': string + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + 'alert-instances-url': string + /** @description The security alert number. */ + 'alert-number': number + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'alert-updated-at': string + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + 'alert-url': string + /** + * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @enum {string} + */ + 'allowed-actions': 'all' | 'local_only' | 'selected' + /** + * Api Overview + * @description Api Overview + */ + 'api-overview': { + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[] + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[] + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[] + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[] + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[] + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[] + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[] + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[] + ssh_key_fingerprints?: { + SHA256_DSA?: string + SHA256_ECDSA?: string + SHA256_ED25519?: string + SHA256_RSA?: string + } + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[] + /** @example true */ + verifiable_password_authentication: boolean + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[] + } + /** + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + 'app-permissions': { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. + * @enum {string} + */ + actions?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. + * @enum {string} + */ + administration?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. + * @enum {string} + */ + checks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. + * @enum {string} + */ + contents?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. + * @enum {string} + */ + deployments?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. + * @enum {string} + */ + environments?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. + * @enum {string} + */ + issues?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. + * @enum {string} + */ + members?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. + * @enum {string} + */ + metadata?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_administration?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. + * @enum {string} + */ + organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. + * @enum {string} + */ + organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. + * @enum {string} + */ + organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. + * @enum {string} + */ + packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. + * @enum {string} + */ + pages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. + * @enum {string} + */ + pull_requests?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. + * @enum {string} + */ + repository_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. + * @enum {string} + */ + repository_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. + * @enum {string} + */ + secret_scanning_alerts?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. + * @enum {string} + */ + secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. + * @enum {string} + */ + security_events?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. + * @enum {string} + */ + single_file?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. + * @enum {string} + */ + statuses?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. + * @enum {string} + */ + team_discussions?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. + * @enum {string} + */ + vulnerability_alerts?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. + * @enum {string} + */ + workflows?: 'write' + } + /** + * Application Grant + * @description The authorization associated with an OAuth Access. + */ + 'application-grant': { + app: { + client_id: string + name: string + /** Format: uri */ + url: string + } + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string + /** @example 1 */ + id: number + /** + * @example [ + * "public_repo" + * ] + */ + scopes: string[] + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/applications/grants/1 + */ + url: string + user?: components['schemas']['nullable-simple-user'] + } + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string + /** Format: date-time */ + created_at: string | null + /** @description Whether or not the artifact has expired. */ + expired: boolean + /** Format: date-time */ + expires_at: string | null + /** @example 5 */ + id: number + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number + /** Format: date-time */ + updated_at: string | null + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string + } + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + 'assigned-issue-event': { + actor: components['schemas']['simple-user'] + assignee: components['schemas']['simple-user'] + assigner: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['integration'] + url: string + } + 'audit-log-event': { + /** @description A unique identifier for an audit event. */ + _document_id?: string + /** @description The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + '@timestamp'?: number + /** @description The name of the action that was performed, for example `user.login` or `repo.create`. */ + action?: string + active?: boolean + active_was?: boolean + /** @description The actor who performed the action. */ + actor?: string + /** @description The id of the actor who performed the action. */ + actor_id?: number + actor_location?: { + country_name?: string + } + /** @description The username of the account being blocked. */ + blocked_user?: string + business?: string + config?: { [key: string]: unknown }[] + config_was?: { [key: string]: unknown }[] + content_type?: string + /** @description The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + created_at?: number + data?: { [key: string]: unknown } + deploy_key_fingerprint?: string + emoji?: string + events?: { [key: string]: unknown }[] + events_were?: { [key: string]: unknown }[] + explanation?: string + fingerprint?: string + hook_id?: number + limited_availability?: boolean + message?: string + name?: string + old_user?: string + openssh_public_key?: string + org?: string + org_id?: number + previous_visibility?: string + read_only?: boolean + /** @description The name of the repository. */ + repo?: string + /** @description The name of the repository. */ + repository?: string + repository_public?: boolean + target_login?: string + team?: string + /** @description The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol?: number + /** @description A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol_name?: string + /** @description The user that was affected by the action performed (if available). */ + user?: string + /** @description The repository visibility, for example `public` or `private`. */ + visibility?: string + } + /** + * Authentication Token + * @description Authentication Token + */ + 'authentication-token': { + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown } + /** @description The repositories this token has access to */ + repositories?: components['schemas']['repository'][] + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: 'all' | 'selected' + /** @example config.yaml */ + single_file?: string | null + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string + } + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + app: { + client_id: string + name: string + /** Format: uri */ + url: string + } + /** Format: date-time */ + created_at: string + /** Format: date-time */ + expires_at: string | null + fingerprint: string | null + hashed_token: string | null + id: number + installation?: components['schemas']['nullable-scoped-installation'] + note: string | null + /** Format: uri */ + note_url: string | null + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null + token: string + token_last_eight: string | null + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + user?: components['schemas']['nullable-simple-user'] + } + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string + /** @description Title for the merge commit message. */ + commit_title: string + enabled_by: components['schemas']['simple-user'] + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: 'merge' | 'squash' | 'rebase' + } | null + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string + } + /** + * Base Gist + * @description Base Gist + */ + 'base-gist': { + comments: number + /** Format: uri */ + comments_url: string + /** Format: uri */ + commits_url: string + /** Format: date-time */ + created_at: string + description: string | null + files: { + [key: string]: { + filename?: string + language?: string + raw_url?: string + size?: number + type?: string + } + } + forks?: unknown[] + /** Format: uri */ + forks_url: string + /** Format: uri */ + git_pull_url: string + /** Format: uri */ + git_push_url: string + history?: unknown[] + /** Format: uri */ + html_url: string + id: string + node_id: string + owner?: components['schemas']['simple-user'] + public: boolean + truncated?: boolean + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Basic Error + * @description Basic Error + */ + 'basic-error': { + documentation_url?: string + message?: string + status?: string + url?: string + } + /** + * Blob + * @description Blob + */ + blob: { + content: string + encoding: string + highlighted_content?: string + node_id: string + sha: string + size: number | null + /** Format: uri */ + url: string + } + /** + * Branch Protection + * @description Branch Protection + */ + 'branch-protection': { + allow_deletions?: { + enabled?: boolean + } + allow_force_pushes?: { + enabled?: boolean + } + enabled?: boolean + enforce_admins?: components['schemas']['protected-branch-admin-enforced'] + /** @example "branch/with/protection" */ + name?: string + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string + required_conversation_resolution?: { + enabled?: boolean + } + required_linear_history?: { + enabled?: boolean + } + required_pull_request_reviews?: components['schemas']['protected-branch-pull-request-review'] + required_signatures?: { + /** @example true */ + enabled: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string + } + required_status_checks?: components['schemas']['protected-branch-required-status-check'] + restrictions?: components['schemas']['branch-restriction-policy'] + url?: string + } + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + 'branch-restriction-policy': { + apps: { + created_at?: string + description?: string + events?: string[] + external_url?: string + html_url?: string + id?: number + name?: string + node_id?: string + owner?: { + avatar_url?: string + description?: string + events_url?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string + /** @example "" */ + gravatar_id?: string + hooks_url?: string + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string + id?: number + issues_url?: string + login?: string + members_url?: string + node_id?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string + public_members_url?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string + repos_url?: string + /** @example false */ + site_admin?: boolean + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string + /** @example "Organization" */ + type?: string + url?: string + } + permissions?: { + contents?: string + issues?: string + metadata?: string + single_file?: string + } + slug?: string + updated_at?: string + }[] + /** Format: uri */ + apps_url: string + teams: { + description?: string | null + html_url?: string + id?: number + members_url?: string + name?: string + node_id?: string + parent?: string | null + permission?: string + privacy?: string + repositories_url?: string + slug?: string + url?: string + }[] + /** Format: uri */ + teams_url: string + /** Format: uri */ + url: string + users: { + avatar_url?: string + events_url?: string + followers_url?: string + following_url?: string + gists_url?: string + gravatar_id?: string + html_url?: string + id?: number + login?: string + node_id?: string + organizations_url?: string + received_events_url?: string + repos_url?: string + site_admin?: boolean + starred_url?: string + subscriptions_url?: string + type?: string + url?: string + }[] + /** Format: uri */ + users_url: string + } + /** + * Branch Short + * @description Branch Short + */ + 'branch-short': { + commit: { + sha: string + url: string + } + name: string + protected: boolean + } + /** + * Branch With Protection + * @description Branch With Protection + */ + 'branch-with-protection': { + _links: { + html: string + /** Format: uri */ + self: string + } + commit: components['schemas']['commit'] + name: string + /** @example "mas*" */ + pattern?: string + protected: boolean + protection: components['schemas']['branch-protection'] + /** Format: uri */ + protection_url: string + /** @example 1 */ + required_approving_review_count?: number + } + /** + * Check Annotation + * @description Check Annotation + */ + 'check-annotation': { + /** @example warning */ + annotation_level: string | null + blob_href: string + /** @example 10 */ + end_column: number | null + /** @example 2 */ + end_line: number + /** @example Check your spelling for 'banaas'. */ + message: string | null + /** @example README.md */ + path: string + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null + /** @example 5 */ + start_column: number | null + /** @example 2 */ + start_line: number + /** @example Spell Checker */ + title: string | null + } + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + 'check-run': { + app: components['schemas']['nullable-integration'] + check_suite: { + id: number + } | null + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null + /** + * @example neutral + * @enum {string|null} + */ + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null + deployment?: components['schemas']['deployment-simple'] + /** @example https://example.com */ + details_url: string | null + /** @example 42 */ + external_id: string | null + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null + /** + * @description The id of the check. + * @example 21 + */ + id: number + /** + * @description The name of the check. + * @example test-coverage + */ + name: string + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string + output: { + annotations_count: number + /** Format: uri */ + annotations_url: string + summary: string | null + text: string | null + title: string | null + } + pull_requests: components['schemas']['pull-request-minimal'][] + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: 'queued' | 'in_progress' | 'completed' + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string + } + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + 'check-suite': { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null + app: components['schemas']['nullable-integration'] + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null + check_runs_url: string + /** + * @example neutral + * @enum {string|null} + */ + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null + /** Format: date-time */ + created_at: string | null + /** @example master */ + head_branch: string | null + head_commit: components['schemas']['simple-commit'] + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string + /** @example 5 */ + id: number + latest_check_runs_count: number + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string + pull_requests: components['schemas']['pull-request-minimal'][] | null + repository: components['schemas']['minimal-repository'] + rerequestable?: boolean + runs_rerequestable?: boolean + /** + * @example completed + * @enum {string|null} + */ + status: ('queued' | 'in_progress' | 'completed') | null + /** Format: date-time */ + updated_at: string | null + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null + } + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + 'check-suite-preference': { + preferences: { + auto_trigger_checks?: { + app_id: number + setting: boolean + }[] + } + repository: components['schemas']['minimal-repository'] + } + /** + * Clone Traffic + * @description Clone Traffic + */ + 'clone-traffic': { + clones: components['schemas']['traffic'][] + /** @example 173 */ + count: number + /** @example 128 */ + uniques: number + } + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + 'code-frequency-stat': number[] + /** + * Code Of Conduct + * @description Code Of Conduct + */ + 'code-of-conduct': { + /** + * @example # Contributor Covenant Code of Conduct + * + * ## Our Pledge + * + * In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + * + * ## Our Standards + * + * Examples of behavior that contributes to creating a positive environment include: + * + * * Using welcoming and inclusive language + * * Being respectful of differing viewpoints and experiences + * * Gracefully accepting constructive criticism + * * Focusing on what is best for the community + * * Showing empathy towards other community members + * + * Examples of unacceptable behavior by participants include: + * + * * The use of sexualized language or imagery and unwelcome sexual attention or advances + * * Trolling, insulting/derogatory comments, and personal or political attacks + * * Public or private harassment + * * Publishing others' private information, such as a physical or electronic address, without explicit permission + * * Other conduct which could reasonably be considered inappropriate in a professional setting + * + * ## Our Responsibilities + * + * Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response + * to any instances of unacceptable behavior. + * + * Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + * + * ## Scope + * + * This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, + * posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + * + * ## Enforcement + * + * Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + * + * Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + * + * ## Attribution + * + * This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + * + * [homepage]: http://contributor-covenant.org + * [version]: http://contributor-covenant.org/version/1/4/ + */ + body?: string + /** Format: uri */ + html_url: string | null + /** @example contributor_covenant */ + key: string + /** @example Contributor Covenant */ + name: string + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string + } + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + 'code-of-conduct-simple': { + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null + /** @example citizen_code_of_conduct */ + key: string + /** @example Citizen Code of Conduct */ + name: string + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string + } + 'code-scanning-alert': { + created_at: components['schemas']['alert-created-at'] + dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_by: components['schemas']['nullable-simple-user'] + dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + html_url: components['schemas']['alert-html-url'] + instances_url: components['schemas']['alert-instances-url'] + most_recent_instance: components['schemas']['code-scanning-alert-instance'] + number: components['schemas']['alert-number'] + rule: components['schemas']['code-scanning-alert-rule'] + state: components['schemas']['code-scanning-alert-state'] + tool: components['schemas']['code-scanning-analysis-tool'] + updated_at?: components['schemas']['alert-updated-at'] + url: components['schemas']['alert-url'] + } + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + 'code-scanning-alert-classification': ('source' | 'generated' | 'test' | 'library') | null + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'code-scanning-alert-dismissed-at': string | null + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @enum {string|null} + */ + 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + 'code-scanning-alert-environment': string + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'code-scanning-alert-fixed-at': string | null + 'code-scanning-alert-instance': { + analysis_key?: components['schemas']['code-scanning-analysis-analysis-key'] + category?: components['schemas']['code-scanning-analysis-category'] + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components['schemas']['code-scanning-alert-classification'][] + commit_sha?: string + environment?: components['schemas']['code-scanning-alert-environment'] + html_url?: string + location?: components['schemas']['code-scanning-alert-location'] + message?: { + text?: string + } + ref?: components['schemas']['code-scanning-ref'] + state?: components['schemas']['code-scanning-alert-state'] + } + 'code-scanning-alert-items': { + created_at: components['schemas']['alert-created-at'] + dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_by: components['schemas']['nullable-simple-user'] + dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + html_url: components['schemas']['alert-html-url'] + instances_url: components['schemas']['alert-instances-url'] + most_recent_instance: components['schemas']['code-scanning-alert-instance'] + number: components['schemas']['alert-number'] + rule: components['schemas']['code-scanning-alert-rule-summary'] + state: components['schemas']['code-scanning-alert-state'] + tool: components['schemas']['code-scanning-analysis-tool'] + updated_at?: components['schemas']['alert-updated-at'] + url: components['schemas']['alert-url'] + } + /** @description Describe a region within a file for the alert. */ + 'code-scanning-alert-location': { + end_column?: number + end_line?: number + path?: string + start_column?: number + start_line?: number + } + 'code-scanning-alert-rule': { + /** @description A short description of the rule used to detect the alert. */ + description?: string + /** @description description of the rule used to detect the alert. */ + full_description?: string + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null + /** @description The name of the rule used to detect the alert. */ + name?: string + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ('low' | 'medium' | 'high' | 'critical') | null + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ('none' | 'note' | 'warning' | 'error') | null + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null + } + 'code-scanning-alert-rule-summary': { + /** @description A short description of the rule used to detect the alert. */ + description?: string + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null + /** @description The name of the rule used to detect the alert. */ + name?: string + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ('none' | 'note' | 'warning' | 'error') | null + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null + } + /** + * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + 'code-scanning-alert-set-state': 'open' | 'dismissed' + /** + * @description State of a code scanning alert. + * @enum {string} + */ + 'code-scanning-alert-state': 'open' | 'closed' | 'dismissed' | 'fixed' + 'code-scanning-analysis': { + analysis_key: components['schemas']['code-scanning-analysis-analysis-key'] + category?: components['schemas']['code-scanning-analysis-category'] + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + created_at: components['schemas']['code-scanning-analysis-created-at'] + deletable: boolean + environment: components['schemas']['code-scanning-analysis-environment'] + /** @example error reading field xyz */ + error: string + /** @description Unique identifier for this analysis. */ + id: number + ref: components['schemas']['code-scanning-ref'] + /** @description The total number of results in the analysis. */ + results_count: number + /** @description The total number of rules used in the analysis. */ + rules_count: number + sarif_id: components['schemas']['code-scanning-analysis-sarif-id'] + tool: components['schemas']['code-scanning-analysis-tool'] + url: components['schemas']['code-scanning-analysis-url'] + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string + } + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + 'code-scanning-analysis-analysis-key': string + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + 'code-scanning-analysis-category': string + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + 'code-scanning-analysis-commit-sha': string + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'code-scanning-analysis-created-at': string + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + 'code-scanning-analysis-deletion': { + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null + } + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + 'code-scanning-analysis-environment': string + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + 'code-scanning-analysis-sarif-file': string + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + 'code-scanning-analysis-sarif-id': string + 'code-scanning-analysis-tool': { + guid?: components['schemas']['code-scanning-analysis-tool-guid'] + name?: components['schemas']['code-scanning-analysis-tool-name'] + version?: components['schemas']['code-scanning-analysis-tool-version'] + } + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + 'code-scanning-analysis-tool-guid': string | null + /** @description The name of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-name': string + /** @description The version of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-version': string | null + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + 'code-scanning-analysis-url': string + 'code-scanning-organization-alert-items': { + created_at: components['schemas']['alert-created-at'] + dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_by: components['schemas']['nullable-simple-user'] + dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + html_url: components['schemas']['alert-html-url'] + instances_url: components['schemas']['alert-instances-url'] + most_recent_instance: components['schemas']['code-scanning-alert-instance'] + number: components['schemas']['alert-number'] + repository: components['schemas']['minimal-repository'] + rule: components['schemas']['code-scanning-alert-rule'] + state: components['schemas']['code-scanning-alert-state'] + tool: components['schemas']['code-scanning-analysis-tool'] + updated_at?: components['schemas']['alert-updated-at'] + url: components['schemas']['alert-url'] + } + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/pull//merge`, or `refs/pull//head`. + */ + 'code-scanning-ref': string + 'code-scanning-sarifs-receipt': { + id?: components['schemas']['code-scanning-analysis-sarif-id'] + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string + } + 'code-scanning-sarifs-status': { + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: string[] | null + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: 'pending' | 'complete' | 'failed' + } + /** + * Code Search Result Item + * @description Code Search Result Item + */ + 'code-search-result-item': { + file_size?: number + /** Format: uri */ + git_url: string + /** Format: uri */ + html_url: string + language?: string | null + /** Format: date-time */ + last_modified_at?: string + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[] + name: string + path: string + repository: components['schemas']['minimal-repository'] + score: number + sha: string + text_matches?: components['schemas']['search-result-text-matches'] + /** Format: uri */ + url: string + } + /** + * Codespace + * @description A codespace. + */ + codespace: { + billable_owner: components['schemas']['simple-user'] + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string + } + /** @example 1 */ + id: number + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' + machine: components['schemas']['nullable-codespace-machine'] + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string + owner: components['schemas']['simple-user'] + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null + recent_folders: string[] + repository: components['schemas']['minimal-repository'] + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null + } + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | 'Unknown' + | 'Created' + | 'Queued' + | 'Provisioning' + | 'Available' + | 'Awaiting' + | 'Unavailable' + | 'Deleted' + | 'Moved' + | 'Shutdown' + | 'Archived' + | 'Starting' + | 'ShuttingDown' + | 'Failed' + | 'Exporting' + | 'Updating' + | 'Rebuilding' + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string + } + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + 'codespace-export-details': { + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string + /** + * @description Id for the export details + * @example latest + */ + id?: string + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null + } + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + 'codespace-machine': { + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. + * @example blob + * @enum {string|null} + */ + prebuild_availability: ('none' | 'blob' | 'pool') | null + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number + } + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + 'codespaces-secret': { + /** Format: date-time */ + created_at: string + /** + * @description The name of the secret. + * @example SECRET_NAME + */ + name: string + /** + * Format: uri + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string + /** Format: date-time */ + updated_at: string + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + } + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + 'codespaces-user-public-key': { + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string + } + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + email?: string | null + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + /** @example octocat */ + login: string + name?: string | null + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + /** @example admin */ + role_name: string + site_admin: boolean + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** @example User */ + type: string + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + } + 'combined-billing-usage': { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number + } + /** + * Combined Commit Status + * @description Combined Commit Status + */ + 'combined-commit-status': { + /** Format: uri */ + commit_url: string + repository: components['schemas']['minimal-repository'] + sha: string + state: string + statuses: components['schemas']['simple-commit-status'][] + total_count: number + /** Format: uri */ + url: string + } + /** + * Commit + * @description Commit + */ + commit: { + author: components['schemas']['nullable-simple-user'] + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string + commit: { + author: components['schemas']['nullable-git-user'] + /** @example 0 */ + comment_count: number + committer: components['schemas']['nullable-git-user'] + /** @example Fix all the bugs */ + message: string + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string + } + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string + verification?: components['schemas']['verification'] + } + committer: components['schemas']['nullable-simple-user'] + files?: components['schemas']['diff-entry'][] + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string + parents: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string + }[] + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string + stats?: { + additions?: number + deletions?: number + total?: number + } + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string + } + /** + * Commit Activity + * @description Commit Activity + */ + 'commit-activity': { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[] + /** @example 89 */ + total: number + /** @example 1336280400 */ + week: number + } + /** + * Commit Comment + * @description Commit Comment + */ + 'commit-comment': { + author_association: components['schemas']['author_association'] + body: string + commit_id: string + /** Format: date-time */ + created_at: string + /** Format: uri */ + html_url: string + id: number + line: number | null + node_id: string + path: string | null + position: number | null + reactions?: components['schemas']['reaction-rollup'] + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Commit Comparison + * @description Commit Comparison + */ + 'commit-comparison': { + /** @example 4 */ + ahead_by: number + base_commit: components['schemas']['commit'] + /** @example 5 */ + behind_by: number + commits: components['schemas']['commit'][] + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string + files?: components['schemas']['diff-entry'][] + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string + merge_base_commit: components['schemas']['commit'] + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string + /** + * @example ahead + * @enum {string} + */ + status: 'diverged' | 'ahead' | 'behind' | 'identical' + /** @example 6 */ + total_commits: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string + } + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + 'commit-search-result-item': { + author: components['schemas']['nullable-simple-user'] + /** Format: uri */ + comments_url: string + commit: { + author: { + /** Format: date-time */ + date: string + email: string + name: string + } + comment_count: number + committer: components['schemas']['nullable-git-user'] + message: string + tree: { + sha: string + /** Format: uri */ + url: string + } + /** Format: uri */ + url: string + verification?: components['schemas']['verification'] + } + committer: components['schemas']['nullable-git-user'] + /** Format: uri */ + html_url: string + node_id: string + parents: { + html_url?: string + sha?: string + url?: string + }[] + repository: components['schemas']['minimal-repository'] + score: number + sha: string + text_matches?: components['schemas']['search-result-text-matches'] + /** Format: uri */ + url: string + } + /** + * Community Profile + * @description Community Profile + */ + 'community-profile': { + /** @example true */ + content_reports_enabled?: boolean + /** @example My first repository on GitHub! */ + description: string | null + /** @example example.com */ + documentation: string | null + files: { + code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] + code_of_conduct_file: components['schemas']['nullable-community-health-file'] + contributing: components['schemas']['nullable-community-health-file'] + issue_template: components['schemas']['nullable-community-health-file'] + license: components['schemas']['nullable-license-simple'] + pull_request_template: components['schemas']['nullable-community-health-file'] + readme: components['schemas']['nullable-community-health-file'] + } + /** @example 100 */ + health_percentage: number + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null + } + /** + * Content Directory + * @description A list of directory items + */ + 'content-directory': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + content?: string + /** Format: uri */ + download_url: string | null + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + type: string + /** Format: uri */ + url: string + }[] + /** + * Content File + * @description Content File + */ + 'content-file': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + content: string + /** Format: uri */ + download_url: string | null + encoding: string + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string + /** @example "actual/actual.md" */ + target?: string + type: string + /** Format: uri */ + url: string + } + /** + * Symlink Content + * @description An object describing a symlink + */ + 'content-submodule': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + /** Format: uri */ + download_url: string | null + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + /** Format: uri */ + submodule_git_url: string + type: string + /** Format: uri */ + url: string + } + /** + * Symlink Content + * @description An object describing a symlink + */ + 'content-symlink': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + /** Format: uri */ + download_url: string | null + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + target: string + type: string + /** Format: uri */ + url: string + } + /** + * Content Traffic + * @description Content Traffic + */ + 'content-traffic': { + /** @example 3542 */ + count: number + /** @example /github/hubot */ + path: string + /** @example github/hubot: A customizable life embetterment robot. */ + title: string + /** @example 2225 */ + uniques: number + } + /** + * Content Tree + * @description Content Tree + */ + 'content-tree': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + /** Format: uri */ + download_url: string | null + entries?: { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + content?: string + /** Format: uri */ + download_url: string | null + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + type: string + /** Format: uri */ + url: string + }[] + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + name: string + path: string + sha: string + size: number + type: string + /** Format: uri */ + url: string + } & { + content: unknown + encoding: unknown + } + /** + * Contributor + * @description Contributor + */ + contributor: { + /** Format: uri */ + avatar_url?: string + contributions: number + email?: string + events_url?: string + /** Format: uri */ + followers_url?: string + following_url?: string + gists_url?: string + gravatar_id?: string | null + /** Format: uri */ + html_url?: string + id?: number + login?: string + name?: string + node_id?: string + /** Format: uri */ + organizations_url?: string + /** Format: uri */ + received_events_url?: string + /** Format: uri */ + repos_url?: string + site_admin?: boolean + starred_url?: string + /** Format: uri */ + subscriptions_url?: string + type: string + /** Format: uri */ + url?: string + } + /** + * Contributor Activity + * @description Contributor Activity + */ + 'contributor-activity': { + author: components['schemas']['nullable-simple-user'] + /** @example 135 */ + total: number + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + a?: number + c?: number + d?: number + w?: number + }[] + } + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + 'converted-note-to-issue-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['integration'] + project_card?: { + column_name: string + id: number + previous_column_name?: string + project_id: number + /** Format: uri */ + project_url: string + /** Format: uri */ + url: string + } + url: string + } + /** + * Credential Authorization + * @description Credential Authorization + */ + 'credential-authorization': { + /** + * Format: date-time + * @description The expiry for the token. This will only be present when the credential is a token. + */ + authorized_credential_expires_at?: string | null + /** @example 12345678 */ + authorized_credential_id: number | null + /** + * @description The note given to the token. This will only be present when the credential is a token. + * @example my token + */ + authorized_credential_note?: string | null + /** + * @description The title given to the ssh key. This will only be present when the credential is an ssh key. + * @example my ssh key + */ + authorized_credential_title?: string | null + /** + * Format: date-time + * @description Date when the credential was last accessed. May be null if it was never accessed + * @example 2011-01-26T19:06:43Z + */ + credential_accessed_at: string | null + /** + * Format: date-time + * @description Date when the credential was authorized for use. + * @example 2011-01-26T19:06:43Z + */ + credential_authorized_at: string + /** + * @description Unique identifier for the credential. + * @example 1 + */ + credential_id: number + /** + * @description Human-readable description of the credential type. + * @example SSH Key + */ + credential_type: string + /** + * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. + * @example jklmnop12345678 + */ + fingerprint?: string + /** + * @description User login that owns the underlying credential. + * @example monalisa + */ + login: string + /** + * @description List of oauth scopes the token has been granted. + * @example [ + * "user", + * "repo" + * ] + */ + scopes?: string[] + /** + * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. + * @example 12345678 + */ + token_last_eight?: string + } + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + 'demilestoned-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + milestone: { + title: string + } + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + 'dependabot-public-key': { + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string + } + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + 'dependabot-secret': { + /** Format: date-time */ + created_at: string + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string + /** Format: date-time */ + updated_at: string + } + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + 'deploy-key': { + created_at: string + id: number + key: string + read_only: boolean + title: string + url: string + verified: boolean + } + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** @example Deploy request from hubot */ + description: string | null + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string + /** @example staging */ + original_environment?: string + payload: { [key: string]: unknown } | string + performed_via_github_app?: components['schemas']['nullable-integration'] + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string + } + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + deployment_branch_policy: { + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean + } | null + /** + * @description The type of reviewer. Must be one of: `User` or `Team` + * @example User + * @enum {string} + */ + 'deployment-reviewer-type': 'User' | 'Team' + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + 'deployment-simple': { + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string + /** @example Deploy request from hubot */ + description: string | null + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string + /** @example staging */ + original_environment?: string + performed_via_github_app?: components['schemas']['nullable-integration'] + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string + } + /** + * Deployment Status + * @description The status of a deployment. + */ + 'deployment-status': { + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string + /** @example 1 */ + id: number + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string + performed_via_github_app?: components['schemas']['nullable-integration'] + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: 'error' | 'failure' | 'inactive' | 'pending' | 'success' | 'queued' | 'in_progress' + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string + } + /** + * Diff Entry + * @description Diff Entry + */ + 'diff-entry': { + /** @example 103 */ + additions: number + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string + /** @example 124 */ + changes: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string + /** @example 21 */ + deletions: number + /** @example file1.txt */ + filename: string + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string + /** @example file.txt */ + previous_filename?: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string + /** + * @example added + * @enum {string} + */ + status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied' | 'changed' | 'unchanged' + } + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string + /** @example true */ + primary: boolean + /** @example true */ + verified: boolean + /** @example public */ + visibility: string | null + } + /** + * Empty Object + * @description An object without any properties. + */ + 'empty-object': { [key: string]: unknown } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @enum {string} + */ + 'enabled-organizations': 'all' | 'none' | 'selected' + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @enum {string} + */ + 'enabled-repositories': 'all' | 'none' | 'selected' + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** Format: uri */ + avatar_url: string + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null + /** @description A short description of the enterprise. */ + description?: string | null + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null + } + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string + deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number + /** + * @description The name of the environment. + * @example staging + */ + name: string + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string + protection_rules?: ( + | { + /** @example 3515 */ + id: number + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string + /** @example wait_timer */ + type: string + wait_timer?: components['schemas']['wait-timer'] + } + | { + /** @example 3755 */ + id: number + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + reviewer?: components['schemas']['simple-user'] | components['schemas']['team'] + type?: components['schemas']['deployment-reviewer-type'] + }[] + /** @example required_reviewers */ + type: string + } + | { + /** @example 3515 */ + id: number + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string + /** @example branch_policy */ + type: string + } + )[] + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string + } + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + 'environment-approvals': { + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number + /** + * @description The name of the environment. + * @example staging + */ + name?: string + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string + }[] + /** + * @description Whether deployment to the environment(s) was approved or rejected + * @example approved + * @enum {string} + */ + state: 'approved' | 'rejected' + user: components['schemas']['simple-user'] + } + /** + * Event + * @description Event + */ + event: { + actor: components['schemas']['actor'] + /** Format: date-time */ + created_at: string | null + id: string + org?: components['schemas']['actor'] + payload: { + action?: string + comment?: components['schemas']['issue-comment'] + issue?: components['schemas']['issue'] + pages?: { + action?: string + html_url?: string + page_name?: string + sha?: string + summary?: string | null + title?: string + }[] + } + public: boolean + repo: { + id: number + name: string + /** Format: uri */ + url: string + } + type: string | null + } + /** + * ExternalGroup + * @description Information about an external group's usage and its members + */ + 'external-group': { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name for the group + * @example group-azuread-test + */ + group_name: string + /** + * @description An array of external members linked to this group + * @example [ + * { + * "member_id": 1, + * "member_login": "mona-lisa_eocsaxrs", + * "member_name": "Mona Lisa", + * "member_email": "mona_lisa@github.com" + * }, + * { + * "member_id": 2, + * "member_login": "octo-lisa_eocsaxrs", + * "member_name": "Octo Lisa", + * "member_email": "octo_lisa@github.com" + * } + * ] + */ + members: { + /** + * @description An email attached to a user + * @example mona_lisa@github.com + */ + member_email: string + /** + * @description The internal user ID of the identity + * @example 1 + */ + member_id: number + /** + * @description The handle/login for the user + * @example mona-lisa_eocsaxrs + */ + member_login: string + /** + * @description The user display name/profile name + * @example Mona Lisa + */ + member_name: string + }[] + /** + * @description An array of teams linked to this group + * @example [ + * { + * "team_id": 1, + * "team_name": "team-test" + * }, + * { + * "team_id": 2, + * "team_name": "team-test2" + * } + * ] + */ + teams: { + /** + * @description The id for a team + * @example 1 + */ + team_id: number + /** + * @description The name of the team + * @example team-test + */ + team_name: string + }[] + /** + * @description The date when the group was last updated_at + * @example 2021-01-03 22:27:15:000 -700 + */ + updated_at?: string + } + /** + * ExternalGroups + * @description A list of external groups available to be connected to a team + */ + 'external-groups': { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string + }[] + } + /** + * Feed + * @description Feed + */ + feed: { + _links: { + current_user?: components['schemas']['link-with-type'] + current_user_actor?: components['schemas']['link-with-type'] + current_user_organization?: components['schemas']['link-with-type'] + current_user_organizations?: components['schemas']['link-with-type'][] + current_user_public?: components['schemas']['link-with-type'] + security_advisories?: components['schemas']['link-with-type'] + timeline: components['schemas']['link-with-type'] + user: components['schemas']['link-with-type'] + } + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[] + /** @example https://github.com/octocat */ + current_user_public_url?: string + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string + /** @example https://github.com/security-advisories */ + security_advisories_url?: string + /** @example https://github.com/timeline */ + timeline_url: string + /** @example https://github.com/{user} */ + user_url: string + } + /** + * File Commit + * @description File Commit + */ + 'file-commit': { + commit: { + author?: { + date?: string + email?: string + name?: string + } + committer?: { + date?: string + email?: string + name?: string + } + html_url?: string + message?: string + node_id?: string + parents?: { + html_url?: string + sha?: string + url?: string + }[] + sha?: string + tree?: { + sha?: string + url?: string + } + url?: string + verification?: { + payload?: string | null + reason?: string + signature?: string | null + verified?: boolean + } + } + content: { + _links?: { + git?: string + html?: string + self?: string + } + download_url?: string + git_url?: string + html_url?: string + name?: string + path?: string + sha?: string + size?: number + type?: string + url?: string + } | null + } + /** + * Full Repository + * @description Full Repository + */ + 'full-repository': { + /** @example false */ + allow_auto_merge?: boolean + /** @example true */ + allow_forking?: boolean + /** @example true */ + allow_merge_commit?: boolean + /** @example true */ + allow_rebase_merge?: boolean + /** @example true */ + allow_squash_merge?: boolean + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + archived: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + code_of_conduct?: components['schemas']['code-of-conduct-simple'] + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string + /** @example master */ + default_branch: string + /** @example false */ + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + forks: number + /** @example 9 */ + forks_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** @example true */ + has_downloads: boolean + /** @example true */ + has_issues: boolean + has_pages: boolean + /** @example true */ + has_projects: boolean + /** @example true */ + has_wiki: boolean + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example 1296269 */ + id: number + /** @example true */ + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** @example Hello-World */ + name: string + /** @example 0 */ + network_count: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + open_issues: number + /** @example 0 */ + open_issues_count: number + organization?: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] + parent?: components['schemas']['repository'] + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + security_and_analysis?: { + advanced_security?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + } | null + /** @example 108 */ + size: number + source?: components['schemas']['repository'] + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** @example 80 */ + stargazers_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** @example 42 */ + subscribers_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string | null + template_repository?: components['schemas']['nullable-repository'] + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string + watchers: number + /** @example 80 */ + watchers_count: number + } + /** + * Gist Comment + * @description A comment made to a gist. + */ + 'gist-comment': { + author_association: components['schemas']['author_association'] + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string + /** @example 1 */ + id: number + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Gist Commit + * @description Gist Commit + */ + 'gist-commit': { + change_status: { + additions?: number + deletions?: number + total?: number + } + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string + user: components['schemas']['nullable-simple-user'] + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string + } + /** + * Gist History + * @description Gist History + */ + 'gist-history': { + change_status?: { + additions?: number + deletions?: number + total?: number + } + /** Format: date-time */ + committed_at?: string + /** Format: uri */ + url?: string + user?: components['schemas']['nullable-simple-user'] + version?: string + } + /** + * Gist Simple + * @description Gist Simple + */ + 'gist-simple': { + comments?: number + comments_url?: string + commits_url?: string + created_at?: string + description?: string | null + files?: { + [key: string]: { + content?: string + filename?: string + language?: string + raw_url?: string + size?: number + truncated?: boolean + type?: string + } | null + } + /** + * Gist + * @description Gist + */ + fork_of?: { + comments: number + /** Format: uri */ + comments_url: string + /** Format: uri */ + commits_url: string + /** Format: date-time */ + created_at: string + description: string | null + files: { + [key: string]: { + filename?: string + language?: string + raw_url?: string + size?: number + type?: string + } + } + forks?: unknown[] + /** Format: uri */ + forks_url: string + /** Format: uri */ + git_pull_url: string + /** Format: uri */ + git_push_url: string + history?: unknown[] + /** Format: uri */ + html_url: string + id: string + node_id: string + owner?: components['schemas']['nullable-simple-user'] + public: boolean + truncated?: boolean + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + user: components['schemas']['nullable-simple-user'] + } | null + /** @deprecated */ + forks?: + | { + /** Format: date-time */ + created_at?: string + id?: string + /** Format: date-time */ + updated_at?: string + /** Format: uri */ + url?: string + user?: components['schemas']['public-user'] + }[] + | null + forks_url?: string + git_pull_url?: string + git_push_url?: string + /** @deprecated */ + history?: components['schemas']['gist-history'][] | null + html_url?: string + id?: string + node_id?: string + owner?: components['schemas']['simple-user'] + public?: boolean + truncated?: boolean + updated_at?: string + url?: string + user?: string | null + } + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + 'git-commit': { + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string + } + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string + } + /** Format: uri */ + html_url: string + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string + node_id: string + parents: { + /** Format: uri */ + html_url: string + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + /** Format: uri */ + url: string + }[] + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + /** Format: uri */ + url: string + } + /** Format: uri */ + url: string + verification: { + payload: string | null + reason: string + signature: string | null + verified: boolean + } + } + /** + * Git Reference + * @description Git references within a repository + */ + 'git-ref': { + node_id: string + object: { + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + type: string + /** Format: uri */ + url: string + } + ref: string + /** Format: uri */ + url: string + } + /** + * Git Tag + * @description Metadata for a Git tag + */ + 'git-tag': { + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string + object: { + sha: string + type: string + /** Format: uri */ + url: string + } + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string + tagger: { + date: string + email: string + name: string + } + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string + verification?: components['schemas']['verification'] + } + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + 'git-tree': { + sha: string + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example 040000 */ + mode?: string + /** @example test/file.rb */ + path?: string + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string + /** @example 12 */ + size?: number + /** @example tree */ + type?: string + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string + }[] + truncated: boolean + /** Format: uri */ + url: string + } + /** + * Gitignore Template + * @description Gitignore Template + */ + 'gitignore-template': { + /** @example C */ + name: string + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string + } + /** + * GPG Key + * @description A unique encryption key + */ + 'gpg-key': { + /** @example true */ + can_certify: boolean + can_encrypt_comms: boolean + can_encrypt_storage: boolean + /** @example true */ + can_sign: boolean + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string + /** + * @example [ + * { + * "email": "mastahyeti@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string + verified?: boolean + }[] + /** Format: date-time */ + expires_at: string | null + /** @example 3 */ + id: number + /** @example 3262EFF25BA0D270 */ + key_id: string + primary_key_id: number | null + /** @example xsBNBFayYZ... */ + public_key: string + raw_key: string | null + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null + * } + * ] + */ + subkeys: { + can_certify?: boolean + can_encrypt_comms?: boolean + can_encrypt_storage?: boolean + can_sign?: boolean + created_at?: string + emails?: unknown[] + expires_at?: string | null + id?: number + key_id?: string + primary_key_id?: number + public_key?: string + raw_key?: string | null + subkeys?: unknown[] + }[] + } + /** + * GroupMapping + * @description External Groups to be mapped to a team for membership + */ + 'group-mapping': { + /** + * @description Array of groups to be mapped to this team + * @example [ + * { + * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", + * "group_name": "saml-azuread-test", + * "group_description": "A group of Developers working on AzureAD SAML SSO" + * }, + * { + * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", + * "group_name": "saml-azuread-test2", + * "group_description": "Another group of Developers working on AzureAD SAML SSO" + * } + * ] + */ + groups?: { + /** + * @description a description of the group + * @example A group of Developers working on AzureAD SAML SSO + */ + group_description: string + /** + * @description The ID of the group + * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa + */ + group_id: string + /** + * @description The name of the group + * @example saml-azuread-test + */ + group_name: string + /** + * @description synchronization status for this group mapping + * @example unsynced + */ + status?: string + /** + * @description the time of the last sync for this group-mapping + * @example 2019-06-03 22:27:15:000 -700 + */ + synced_at?: string | null + }[] + } + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean + config: { + content_type?: components['schemas']['webhook-config-content-type'] + /** @example "sha256" */ + digest?: string + /** @example "foo@bar.com" */ + email?: string + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + /** @example "foo" */ + password?: string + /** @example "roomer" */ + room?: string + secret?: components['schemas']['webhook-config-secret'] + /** @example "foo" */ + subdomain?: string + /** @example "abc" */ + token?: string + url?: components['schemas']['webhook-config-url'] + } + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[] + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number + last_response: components['schemas']['hook-response'] + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string + type: string + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string + } + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + 'hook-delivery': { + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null + } + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null + /** @description The response payload received. */ + payload: string | null + } + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string + } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + 'hook-delivery-item': { + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number + } + /** Hook Response */ + 'hook-response': { + code: number | null + message: string | null + status: string | null + } + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string + octicon: string + }[] + } + /** + * Import + * @description A repository import from an external source. + */ + import: { + authors_count?: number | null + /** Format: uri */ + authors_url: string + commit_count?: number | null + error_message?: string | null + failed_step?: string | null + has_large_files?: boolean + /** Format: uri */ + html_url: string + import_percent?: number | null + large_files_count?: number + large_files_size?: number + message?: string + project_choices?: { + human_name?: string + tfvc_project?: string + vcs?: string + }[] + push_percent?: number | null + /** Format: uri */ + repository_url: string + /** @enum {string} */ + status: + | 'auth' + | 'error' + | 'none' + | 'detecting' + | 'choose' + | 'auth_failed' + | 'importing' + | 'mapping' + | 'waiting_to_push' + | 'pushing' + | 'complete' + | 'setup' + | 'unknown' + | 'detection_found_multiple' + | 'detection_found_nothing' + | 'detection_needs_auth' + status_text?: string | null + svc_root?: string + svn_root?: string + tfvc_project?: string + /** Format: uri */ + url: string + use_lfs?: boolean + vcs: string | null + /** @description The URL of the originating repository. */ + vcs_url: string + } + /** + * Installation + * @description Installation + */ + installation: { + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string + account: (components['schemas']['simple-user'] | components['schemas']['enterprise']) | null + /** @example 1 */ + app_id: number + /** @example github-actions */ + app_slug: string + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null + /** Format: date-time */ + created_at: string + events: string[] + /** @example true */ + has_multiple_single_files?: boolean + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string + /** + * @description The ID of the installation. + * @example 1 + */ + id: number + permissions: components['schemas']['app-permissions'] + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] + /** Format: date-time */ + suspended_at: string | null + suspended_by: components['schemas']['nullable-simple-user'] + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number + /** @example Organization */ + target_type: string + /** Format: date-time */ + updated_at: string + } + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + 'installation-token': { + expires_at: string + /** @example true */ + has_multiple_single_files?: boolean + permissions?: components['schemas']['app-permissions'] + repositories?: components['schemas']['repository'][] + /** @enum {string} */ + repository_selection?: 'all' | 'selected' + /** @example README.md */ + single_file?: string + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] + token: string + } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string + /** @example The description of the app. */ + description: string | null + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[] + /** + * Format: uri + * @example https://example.com + */ + external_url: string + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string + owner: components['schemas']['nullable-simple-user'] + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + checks?: string + contents?: string + deployments?: string + issues?: string + metadata?: string + } & { [key: string]: string } + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + } + /** + * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. + * @example one_month + * @enum {string} + */ + 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. + * @example collaborators_only + * @enum {string} + */ + 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + 'interaction-limit': { + expiry?: components['schemas']['interaction-expiry'] + limit: components['schemas']['interaction-group'] + } + /** + * Interaction Limits + * @description Interaction limit settings. + */ + 'interaction-limit-response': { + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string + limit: components['schemas']['interaction-group'] + /** @example repository */ + origin: string + } + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + active_lock_reason?: string | null + assignee: components['schemas']['nullable-simple-user'] + assignees?: components['schemas']['simple-user'][] | null + author_association: components['schemas']['author_association'] + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null + body_html?: string + body_text?: string + /** Format: date-time */ + closed_at: string | null + closed_by?: components['schemas']['nullable-simple-user'] + comments: number + /** Format: uri */ + comments_url: string + /** Format: date-time */ + created_at: string + draft?: boolean + /** Format: uri */ + events_url: string + /** Format: uri */ + html_url: string + id: number + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + color?: string | null + default?: boolean + description?: string | null + /** Format: int64 */ + id?: number + name?: string + node_id?: string + /** Format: uri */ + url?: string + } + )[] + labels_url: string + locked: boolean + milestone: components['schemas']['nullable-milestone'] + node_id: string + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number + performed_via_github_app?: components['schemas']['nullable-integration'] + pull_request?: { + /** Format: uri */ + diff_url: string | null + /** Format: uri */ + html_url: string | null + /** Format: date-time */ + merged_at?: string | null + /** Format: uri */ + patch_url: string | null + /** Format: uri */ + url: string | null + } + reactions?: components['schemas']['reaction-rollup'] + repository?: components['schemas']['repository'] + /** Format: uri */ + repository_url: string + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string + /** Format: uri */ + timeline_url?: string + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string + /** Format: date-time */ + updated_at: string + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + 'issue-comment': { + author_association: components['schemas']['author_association'] + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string + body_html?: string + body_text?: string + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string + /** Format: uri */ + html_url: string + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number + /** Format: uri */ + issue_url: string + node_id: string + performed_via_github_app?: components['schemas']['nullable-integration'] + reactions?: components['schemas']['reaction-rollup'] + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Issue Event + * @description Issue Event + */ + 'issue-event': { + actor: components['schemas']['nullable-simple-user'] + assignee?: components['schemas']['nullable-simple-user'] + assigner?: components['schemas']['nullable-simple-user'] + author_association?: components['schemas']['author_association'] + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string + dismissed_review?: components['schemas']['issue-event-dismissed-review'] + /** @example closed */ + event: string + /** @example 1 */ + id: number + issue?: components['schemas']['nullable-issue'] + label?: components['schemas']['issue-event-label'] + lock_reason?: string | null + milestone?: components['schemas']['issue-event-milestone'] + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string + performed_via_github_app?: components['schemas']['nullable-integration'] + project_card?: components['schemas']['issue-event-project-card'] + rename?: components['schemas']['issue-event-rename'] + requested_reviewer?: components['schemas']['nullable-simple-user'] + requested_team?: components['schemas']['team'] + review_requester?: components['schemas']['nullable-simple-user'] + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string + } + /** Issue Event Dismissed Review */ + 'issue-event-dismissed-review': { + dismissal_commit_id?: string | null + dismissal_message: string | null + review_id: number + state: string + } + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + 'issue-event-for-issue': + | components['schemas']['labeled-issue-event'] + | components['schemas']['unlabeled-issue-event'] + | components['schemas']['assigned-issue-event'] + | components['schemas']['unassigned-issue-event'] + | components['schemas']['milestoned-issue-event'] + | components['schemas']['demilestoned-issue-event'] + | components['schemas']['renamed-issue-event'] + | components['schemas']['review-requested-issue-event'] + | components['schemas']['review-request-removed-issue-event'] + | components['schemas']['review-dismissed-issue-event'] + | components['schemas']['locked-issue-event'] + | components['schemas']['added-to-project-issue-event'] + | components['schemas']['moved-column-in-project-issue-event'] + | components['schemas']['removed-from-project-issue-event'] + | components['schemas']['converted-note-to-issue-issue-event'] + /** + * Issue Event Label + * @description Issue Event Label + */ + 'issue-event-label': { + color: string | null + name: string | null + } + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + 'issue-event-milestone': { + title: string + } + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + 'issue-event-project-card': { + column_name: string + id: number + previous_column_name?: string + project_id: number + /** Format: uri */ + project_url: string + /** Format: uri */ + url: string + } + /** + * Issue Event Rename + * @description Issue Event Rename + */ + 'issue-event-rename': { + from: string + to: string + } + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + 'issue-search-result-item': { + active_lock_reason?: string | null + assignee: components['schemas']['nullable-simple-user'] + assignees?: components['schemas']['simple-user'][] | null + author_association: components['schemas']['author_association'] + body?: string + body_html?: string + body_text?: string + /** Format: date-time */ + closed_at: string | null + comments: number + /** Format: uri */ + comments_url: string + /** Format: date-time */ + created_at: string + draft?: boolean + /** Format: uri */ + events_url: string + /** Format: uri */ + html_url: string + id: number + labels: { + color?: string + default?: boolean + description?: string | null + /** Format: int64 */ + id?: number + name?: string + node_id?: string + url?: string + }[] + labels_url: string + locked: boolean + milestone: components['schemas']['nullable-milestone'] + node_id: string + number: number + performed_via_github_app?: components['schemas']['nullable-integration'] + pull_request?: { + /** Format: uri */ + diff_url: string | null + /** Format: uri */ + html_url: string | null + /** Format: date-time */ + merged_at?: string | null + /** Format: uri */ + patch_url: string | null + /** Format: uri */ + url: string | null + } + reactions?: components['schemas']['reaction-rollup'] + repository?: components['schemas']['repository'] + /** Format: uri */ + repository_url: string + score: number + state: string + text_matches?: components['schemas']['search-result-text-matches'] + /** Format: uri */ + timeline_url?: string + title: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null + /** + * @description The id of the job. + * @example 21 + */ + id: number + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[] + /** + * @description The name of the job. + * @example test-coverage + */ + name: string + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: 'queued' | 'in_progress' | 'completed' + /** @description Steps in this job. */ + steps?: { + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null + /** + * @description The name of the job. + * @example test-coverage + */ + name: string + /** @example 1 */ + number: number + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: 'queued' | 'in_progress' | 'completed' + }[] + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string + } + /** + * Key + * @description Key + */ + key: { + /** Format: date-time */ + created_at: string + id: number + key: string + read_only: boolean + title: string + url: string + verified: boolean + } + /** + * Key Simple + * @description Key Simple + */ + 'key-simple': { + id: number + key: string + } + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string + /** @example true */ + default: boolean + /** @example Something isn't working */ + description: string | null + /** + * Format: int64 + * @example 208045946 + */ + id: number + /** + * @description The name of the label. + * @example bug + */ + name: string + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string + } + /** + * Label Search Result Item + * @description Label Search Result Item + */ + 'label-search-result-item': { + color: string + default: boolean + description: string | null + id: number + name: string + node_id: string + score: number + text_matches?: components['schemas']['search-result-text-matches'] + /** Format: uri */ + url: string + } + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + 'labeled-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + label: { + color: string + name: string + } + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Language + * @description Language + */ + language: { [key: string]: number } + /** + * License + * @description License + */ + license: { + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + body: string + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[] + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string + /** @example true */ + featured: boolean + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string + /** @example mit */ + key: string + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[] + /** @example MIT License */ + name: string + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[] + /** @example MIT */ + spdx_id: string | null + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null + } + /** + * License Content + * @description License Content + */ + 'license-content': { + _links: { + /** Format: uri */ + git: string | null + /** Format: uri */ + html: string | null + /** Format: uri */ + self: string + } + content: string + /** Format: uri */ + download_url: string | null + encoding: string + /** Format: uri */ + git_url: string | null + /** Format: uri */ + html_url: string | null + license: components['schemas']['nullable-license-simple'] + name: string + path: string + sha: string + size: number + type: string + /** Format: uri */ + url: string + } + /** + * License Simple + * @description License Simple + */ + 'license-simple': { + /** Format: uri */ + html_url?: string + /** @example mit */ + key: string + /** @example MIT License */ + name: string + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string + /** @example MIT */ + spdx_id: string | null + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null + } + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string + } + /** + * Link With Type + * @description Hypermedia Link with Type + */ + 'link-with-type': { + href: string + type: string + } + /** + * Locked Issue Event + * @description Locked Issue Event + */ + 'locked-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + /** @example "off-topic" */ + lock_reason: string | null + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** Marketplace Account */ + 'marketplace-account': { + /** Format: email */ + email?: string | null + id: number + login: string + node_id?: string + /** Format: email */ + organization_billing_email?: string | null + type: string + /** Format: uri */ + url: string + } + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + 'marketplace-listing-plan': { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[] + /** @example A professional-grade CI solution */ + description: string + /** @example true */ + has_free_trial: boolean + /** @example 1313 */ + id: number + /** @example 1099 */ + monthly_price_in_cents: number + /** @example Pro */ + name: string + /** @example 3 */ + number: number + /** @example flat-rate */ + price_model: string + /** @example published */ + state: string + unit_name: string | null + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string + /** @example 11870 */ + yearly_price_in_cents: number + } + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + 'marketplace-purchase': { + email?: string | null + id: number + login: string + marketplace_pending_change?: { + effective_date?: string + id?: number + is_installed?: boolean + plan?: components['schemas']['marketplace-listing-plan'] + unit_count?: number | null + } | null + marketplace_purchase: { + billing_cycle?: string + free_trial_ends_on?: string | null + is_installed?: boolean + next_billing_date?: string | null + on_free_trial?: boolean + plan?: components['schemas']['marketplace-listing-plan'] + unit_count?: number | null + updated_at?: string + } + organization_billing_email?: string + type: string + url: string + } + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + 'merged-upstream': { + base_branch?: string + /** @enum {string} */ + merge_type?: 'merge' | 'fast-forward' | 'none' + message?: string + } + /** + * Migration + * @description A migration. + */ + migration: { + /** Format: uri */ + archive_url?: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string + exclude?: unknown[] + exclude_attachments: boolean + exclude_git_data: boolean + exclude_metadata: boolean + exclude_owner_projects: boolean + exclude_releases: boolean + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string + /** @example 79 */ + id: number + /** @example true */ + lock_repositories: boolean + node_id: string + owner: components['schemas']['nullable-simple-user'] + repositories: components['schemas']['repository'][] + /** @example pending */ + state: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string + } + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null + /** @example 8 */ + closed_issues: number + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** @example Tracking milestone for version 1.0 */ + description: string | null + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string + /** @example 1002604 */ + id: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string + /** + * @description The number of the milestone. + * @example 42 + */ + number: number + /** @example 4 */ + open_issues: number + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: 'open' | 'closed' + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string + } + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + 'milestoned-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + milestone: { + title: string + } + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Minimal Repository + * @description Minimal Repository + */ + 'minimal-repository': { + allow_forking?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + archived?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + clone_url?: string + code_of_conduct?: components['schemas']['code-of-conduct'] + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + default_branch?: string + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + disabled?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + /** @example 0 */ + forks?: number + forks_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + has_downloads?: boolean + has_issues?: boolean + has_pages?: boolean + has_projects?: boolean + has_wiki?: boolean + homepage?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example 1296269 */ + id: number + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license?: { + key?: string + name?: string + node_id?: string + spdx_id?: string + url?: string + } | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + mirror_url?: string | null + /** @example Hello-World */ + name: string + network_count?: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example 0 */ + open_issues?: number + open_issues_count?: number + owner: components['schemas']['simple-user'] + permissions?: { + admin?: boolean + maintain?: boolean + pull?: boolean + push?: boolean + triage?: boolean + } + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example admin */ + role_name?: string + size?: number + ssh_url?: string + stargazers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + subscribers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + svn_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string + template_repository?: components['schemas']['nullable-repository'] + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + visibility?: string + /** @example 0 */ + watchers?: number + watchers_count?: number + } + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + 'moved-column-in-project-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + project_card?: { + column_name: string + id: number + previous_column_name?: string + project_id: number + /** Format: uri */ + project_url: string + /** Format: uri */ + url: string + } + url: string + } + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + 'nullable-code-of-conduct-simple': { + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null + /** @example citizen_code_of_conduct */ + key: string + /** @example Citizen Code of Conduct */ + name: string + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string + } | null + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + 'nullable-codespace-machine': { + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. + * @example blob + * @enum {string|null} + */ + prebuild_availability: ('none' | 'blob' | 'pool') | null + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number + } | null + /** + * Collaborator + * @description Collaborator + */ + 'nullable-collaborator': { + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + email?: string | null + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + /** @example octocat */ + login: string + name?: string | null + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + /** @example admin */ + role_name: string + site_admin: boolean + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** @example User */ + type: string + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + } | null + /** Community Health File */ + 'nullable-community-health-file': { + /** Format: uri */ + html_url: string + /** Format: uri */ + url: string + } | null + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + 'nullable-git-user': { + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string + /** @example "chris@ozmm.org" */ + email?: string + /** @example "Chris Wanstrath" */ + name?: string + } | null + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + 'nullable-integration': { + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string + /** @example The description of the app. */ + description: string | null + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[] + /** + * Format: uri + * @example https://example.com + */ + external_url: string + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string + owner: components['schemas']['nullable-simple-user'] + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + checks?: string + contents?: string + deployments?: string + issues?: string + metadata?: string + } & { [key: string]: string } + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + } | null + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + 'nullable-issue': { + active_lock_reason?: string | null + assignee: components['schemas']['nullable-simple-user'] + assignees?: components['schemas']['simple-user'][] | null + author_association: components['schemas']['author_association'] + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null + body_html?: string + body_text?: string + /** Format: date-time */ + closed_at: string | null + closed_by?: components['schemas']['nullable-simple-user'] + comments: number + /** Format: uri */ + comments_url: string + /** Format: date-time */ + created_at: string + draft?: boolean + /** Format: uri */ + events_url: string + /** Format: uri */ + html_url: string + id: number + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + color?: string | null + default?: boolean + description?: string | null + /** Format: int64 */ + id?: number + name?: string + node_id?: string + /** Format: uri */ + url?: string + } + )[] + labels_url: string + locked: boolean + milestone: components['schemas']['nullable-milestone'] + node_id: string + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number + performed_via_github_app?: components['schemas']['nullable-integration'] + pull_request?: { + /** Format: uri */ + diff_url: string | null + /** Format: uri */ + html_url: string | null + /** Format: date-time */ + merged_at?: string | null + /** Format: uri */ + patch_url: string | null + /** Format: uri */ + url: string | null + } + reactions?: components['schemas']['reaction-rollup'] + repository?: components['schemas']['repository'] + /** Format: uri */ + repository_url: string + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string + /** Format: uri */ + timeline_url?: string + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string + /** Format: date-time */ + updated_at: string + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } | null + /** + * License Simple + * @description License Simple + */ + 'nullable-license-simple': { + /** Format: uri */ + html_url?: string + /** @example mit */ + key: string + /** @example MIT License */ + name: string + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string + /** @example MIT */ + spdx_id: string | null + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null + } | null + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + 'nullable-milestone': { + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null + /** @example 8 */ + closed_issues: number + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** @example Tracking milestone for version 1.0 */ + description: string | null + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string + /** @example 1002604 */ + id: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string + /** + * @description The number of the milestone. + * @example 42 + */ + number: number + /** @example 4 */ + open_issues: number + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: 'open' | 'closed' + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string + } | null + /** + * Minimal Repository + * @description Minimal Repository + */ + 'nullable-minimal-repository': { + allow_forking?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + archived?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + clone_url?: string + code_of_conduct?: components['schemas']['code-of-conduct'] + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + default_branch?: string + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + disabled?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + /** @example 0 */ + forks?: number + forks_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + has_downloads?: boolean + has_issues?: boolean + has_pages?: boolean + has_projects?: boolean + has_wiki?: boolean + homepage?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example 1296269 */ + id: number + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license?: { + key?: string + name?: string + node_id?: string + spdx_id?: string + url?: string + } | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + mirror_url?: string | null + /** @example Hello-World */ + name: string + network_count?: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example 0 */ + open_issues?: number + open_issues_count?: number + owner: components['schemas']['simple-user'] + permissions?: { + admin?: boolean + maintain?: boolean + pull?: boolean + push?: boolean + triage?: boolean + } + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example admin */ + role_name?: string + size?: number + ssh_url?: string + stargazers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + subscribers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + svn_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string + template_repository?: components['schemas']['nullable-repository'] + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + visibility?: string + /** @example 0 */ + watchers?: number + watchers_count?: number + } | null + /** + * Repository + * @description A git repository + */ + 'nullable-repository': { + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + forks: number + /** @example 9 */ + forks_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + has_pages: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + network_count?: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + open_issues: number + /** @example 0 */ + open_issues_count: number + organization?: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example 108 */ + size: number + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** @example 80 */ + stargazers_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + subscribers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string + template_repository?: { + allow_auto_merge?: boolean + allow_merge_commit?: boolean + allow_rebase_merge?: boolean + allow_squash_merge?: boolean + allow_update_branch?: boolean + archive_url?: string + archived?: boolean + assignees_url?: string + blobs_url?: string + branches_url?: string + clone_url?: string + collaborators_url?: string + comments_url?: string + commits_url?: string + compare_url?: string + contents_url?: string + contributors_url?: string + created_at?: string + default_branch?: string + delete_branch_on_merge?: boolean + deployments_url?: string + description?: string + disabled?: boolean + downloads_url?: string + events_url?: string + fork?: boolean + forks_count?: number + forks_url?: string + full_name?: string + git_commits_url?: string + git_refs_url?: string + git_tags_url?: string + git_url?: string + has_downloads?: boolean + has_issues?: boolean + has_pages?: boolean + has_projects?: boolean + has_wiki?: boolean + homepage?: string + hooks_url?: string + html_url?: string + id?: number + is_template?: boolean + issue_comment_url?: string + issue_events_url?: string + issues_url?: string + keys_url?: string + labels_url?: string + language?: string + languages_url?: string + merges_url?: string + milestones_url?: string + mirror_url?: string + name?: string + network_count?: number + node_id?: string + notifications_url?: string + open_issues_count?: number + owner?: { + avatar_url?: string + events_url?: string + followers_url?: string + following_url?: string + gists_url?: string + gravatar_id?: string + html_url?: string + id?: number + login?: string + node_id?: string + organizations_url?: string + received_events_url?: string + repos_url?: string + site_admin?: boolean + starred_url?: string + subscriptions_url?: string + type?: string + url?: string + } + permissions?: { + admin?: boolean + maintain?: boolean + pull?: boolean + push?: boolean + triage?: boolean + } + private?: boolean + pulls_url?: string + pushed_at?: string + releases_url?: string + size?: number + ssh_url?: string + stargazers_count?: number + stargazers_url?: string + statuses_url?: string + subscribers_count?: number + subscribers_url?: string + subscription_url?: string + svn_url?: string + tags_url?: string + teams_url?: string + temp_clone_token?: string + topics?: string[] + trees_url?: string + updated_at?: string + url?: string + visibility?: string + watchers_count?: number + } | null + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + watchers: number + /** @example 80 */ + watchers_count: number + } | null + /** Scoped Installation */ + 'nullable-scoped-installation': { + account: components['schemas']['simple-user'] + /** @example true */ + has_multiple_single_files?: boolean + permissions: components['schemas']['app-permissions'] + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] + } | null + /** + * Simple Commit + * @description Simple Commit + */ + 'nullable-simple-commit': { + author: { + email: string + name: string + } | null + committer: { + email: string + name: string + } | null + id: string + message: string + /** Format: date-time */ + timestamp: string + tree_id: string + } | null + /** + * Simple User + * @description Simple User + */ + 'nullable-simple-user': { + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + email?: string | null + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + /** @example octocat */ + login: string + name?: string | null + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** @example User */ + type: string + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + } | null + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + 'nullable-team-simple': { + /** + * @description Description of the team + * @example A great team. + */ + description: string | null + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string + /** + * @description Name of the team + * @example Justice League + */ + name: string + /** @example MDQ6VGVhbTE= */ + node_id: string + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string + /** @example justice-league */ + slug: string + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string + } | null + /** + * Org Hook + * @description Org Hook + */ + 'org-hook': { + /** @example true */ + active: boolean + config: { + /** @example "form" */ + content_type?: string + /** @example "0" */ + insecure_ssl?: string + /** @example "********" */ + secret?: string + /** @example "http://example.com/2" */ + url?: string + } + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[] + /** @example 1 */ + id: number + /** @example web */ + name: string + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string + type: string + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string + } + /** + * Org Membership + * @description Org Membership + */ + 'org-membership': { + organization: components['schemas']['organization-simple'] + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string + permissions?: { + can_create_repository: boolean + } + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: 'admin' | 'member' | 'billing_manager' + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: 'active' | 'pending' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + 'organization-actions-secret': { + /** Format: date-time */ + created_at: string + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string + /** Format: date-time */ + updated_at: string + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + } + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + 'organization-custom-repository-role': { + id: number + name: string + } + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + 'organization-dependabot-secret': { + /** Format: date-time */ + created_at: string + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string + /** Format: date-time */ + updated_at: string + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + } + /** + * Organization Full + * @description Organization Full + */ + 'organization-full': { + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string + /** @example 8 */ + collaborators?: number | null + /** @example GitHub */ + company?: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + default_repository_permission?: string | null + /** @example A great organization */ + description: string | null + /** @example 10000 */ + disk_usage?: number | null + /** + * Format: email + * @example octocat@github.com + */ + email?: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** @example true */ + has_organization_projects: boolean + /** @example true */ + has_repository_projects: boolean + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + /** @example true */ + is_verified?: boolean + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example San Francisco */ + location?: string + /** @example github */ + login: string + /** @example all */ + members_allowed_repository_creation_type?: string + /** @example true */ + members_can_create_internal_repositories?: boolean + /** @example true */ + members_can_create_pages?: boolean + /** @example true */ + members_can_create_private_pages?: boolean + /** @example true */ + members_can_create_private_repositories?: boolean + /** @example true */ + members_can_create_public_pages?: boolean + /** @example true */ + members_can_create_public_repositories?: boolean + /** @example true */ + members_can_create_repositories?: boolean | null + /** @example false */ + members_can_fork_private_repositories?: boolean | null + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example github */ + name?: string + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string + /** @example 100 */ + owned_private_repos?: number + plan?: { + filled_seats?: number + name: string + private_repos: number + seats?: number + space: number + } + /** @example 81 */ + private_gists?: number | null + /** @example 1 */ + public_gists: number + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example 2 */ + public_repos: number + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string + /** @example 100 */ + total_private_repos?: number + /** @example github */ + twitter_username?: string | null + /** @example true */ + two_factor_requirement_enabled?: boolean | null + /** @example Organization */ + type: string + /** Format: date-time */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string + } + /** + * Organization Invitation + * @description Organization Invitation + */ + 'organization-invitation': { + created_at: string + email: string | null + failed_at?: string | null + failed_reason?: string | null + id: number + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string + inviter: components['schemas']['simple-user'] + login: string | null + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string + role: string + team_count: number + } + 'organization-secret-scanning-alert': { + created_at?: components['schemas']['alert-created-at'] + html_url?: components['schemas']['alert-html-url'] + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string + number?: components['schemas']['alert-number'] + repository?: components['schemas']['minimal-repository'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null + resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The secret that was detected. */ + secret?: string + /** @description The type of secret that secret scanning detected. */ + secret_type?: string + state?: components['schemas']['secret-scanning-alert-state'] + url?: components['schemas']['alert-url'] + } + /** + * Organization Simple + * @description Organization Simple + */ + 'organization-simple': { + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example 1 */ + id: number + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example github */ + login: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string + } + /** + * Package + * @description A software package + */ + package: { + /** Format: date-time */ + created_at: string + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number + /** + * @description The name of the package. + * @example super-linter + */ + name: string + owner?: components['schemas']['nullable-simple-user'] + /** + * @example docker + * @enum {string} + */ + package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + repository?: components['schemas']['nullable-minimal-repository'] + /** Format: date-time */ + updated_at: string + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number + /** + * @example private + * @enum {string} + */ + visibility: 'private' | 'public' + } + /** + * Package Version + * @description A version of a software package + */ + 'package-version': { + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string + description?: string + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number + /** @example MIT */ + license?: string + /** Package Version Metadata */ + metadata?: { + /** Container Metadata */ + container?: { + tags: string[] + } + /** Docker Metadata */ + docker?: { + tag?: string[] + } & { + tags: unknown + } + /** + * @example docker + * @enum {string} + */ + package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + } + /** + * @description The name of the package version. + * @example latest + */ + name: string + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string + } + 'packages-billing-usage': { + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number + } + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string + https_certificate?: components['schemas']['pages-https-certificate'] + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ('pending' | 'verified' | 'unverified') | null + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean + source?: components['schemas']['pages-source-hash'] + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ('built' | 'building' | 'errored') | null + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string + } + /** + * Page Build + * @description Page Build + */ + 'page-build': { + commit: string + /** Format: date-time */ + created_at: string + duration: number + error: { + message: string | null + } + pusher: components['schemas']['nullable-simple-user'] + status: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + } + /** + * Page Build Status + * @description Page Build Status + */ + 'page-build-status': { + /** @example queued */ + status: string + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string + } + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + 'pages-health-check': { + alt_domain?: { + caa_error?: string | null + dns_resolves?: boolean + enforces_https?: boolean + has_cname_record?: boolean | null + has_mx_records_present?: boolean | null + host?: string + https_error?: string | null + is_a_record?: boolean | null + is_apex_domain?: boolean + is_cloudflare_ip?: boolean | null + is_cname_to_fastly?: boolean | null + is_cname_to_github_user_domain?: boolean | null + is_cname_to_pages_dot_github_dot_com?: boolean | null + is_fastly_ip?: boolean | null + is_https_eligible?: boolean | null + is_non_github_pages_ip_present?: boolean | null + is_old_ip_address?: boolean | null + is_pages_domain?: boolean + is_pointed_to_github_pages_ip?: boolean | null + is_proxied?: boolean | null + is_served_by_pages?: boolean | null + is_valid?: boolean + is_valid_domain?: boolean + nameservers?: string + reason?: string | null + responds_to_https?: boolean + should_be_a_record?: boolean | null + uri?: string + } | null + domain?: { + caa_error?: string | null + dns_resolves?: boolean + enforces_https?: boolean + has_cname_record?: boolean | null + has_mx_records_present?: boolean | null + host?: string + https_error?: string | null + is_a_record?: boolean | null + is_apex_domain?: boolean + is_cloudflare_ip?: boolean | null + is_cname_to_fastly?: boolean | null + is_cname_to_github_user_domain?: boolean | null + is_cname_to_pages_dot_github_dot_com?: boolean | null + is_fastly_ip?: boolean | null + is_https_eligible?: boolean | null + is_non_github_pages_ip_present?: boolean | null + is_old_ip_address?: boolean | null + is_pages_domain?: boolean + is_pointed_to_github_pages_ip?: boolean | null + is_proxied?: boolean | null + is_served_by_pages?: boolean | null + is_valid?: boolean + is_valid_domain?: boolean + nameservers?: string + reason?: string | null + responds_to_https?: boolean + should_be_a_record?: boolean | null + uri?: string + } + } + /** Pages Https Certificate */ + 'pages-https-certificate': { + /** @example Certificate is approved */ + description: string + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[] + /** Format: date */ + expires_at?: string + /** + * @example approved + * @enum {string} + */ + state: + | 'new' + | 'authorization_created' + | 'authorization_pending' + | 'authorized' + | 'authorization_revoked' + | 'issued' + | 'uploaded' + | 'approved' + | 'errored' + | 'bad_authz' + | 'destroy_pending' + | 'dns_changed' + } + /** Pages Source Hash */ + 'pages-source-hash': { + branch: string + path: string + } + /** Participation Stats */ + 'participation-stats': { + all: number[] + owner: number[] + } + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + 'pending-deployment': { + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean + environment: { + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number + /** + * @description The name of the environment. + * @example staging + */ + name?: string + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string + } + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + reviewer?: components['schemas']['simple-user'] | components['schemas']['team'] + type?: components['schemas']['deployment-reviewer-type'] + }[] + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null + } + /** + * Porter Author + * @description Porter Author + */ + 'porter-author': { + email: string + id: number + /** Format: uri */ + import_url: string + name: string + remote_id: string + remote_name: string + /** Format: uri */ + url: string + } + /** + * Porter Large File + * @description Porter Large File + */ + 'porter-large-file': { + oid: string + path: string + ref_name: string + size: number + } + /** + * Private User + * @description Private User + */ + 'private-user': { + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + /** @example There once was... */ + bio: string | null + /** @example https://github.com/blog */ + blog: string | null + business_plus?: boolean + /** @example 8 */ + collaborators: number + /** @example GitHub */ + company: string | null + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** @example 10000 */ + disk_usage: number + /** + * Format: email + * @example octocat@github.com + */ + email: string | null + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** @example 20 */ + followers: number + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example 0 */ + following: number + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + hireable: boolean | null + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + ldap_dn?: string + /** @example San Francisco */ + location: string | null + /** @example octocat */ + login: string + /** @example monalisa octocat */ + name: string | null + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + /** @example 100 */ + owned_private_repos: number + plan?: { + collaborators: number + name: string + private_repos: number + space: number + } + /** @example 81 */ + private_gists: number + /** @example 1 */ + public_gists: number + /** @example 2 */ + public_repos: number + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + site_admin: boolean + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** Format: date-time */ + suspended_at?: string | null + /** @example 100 */ + total_private_repos: number + /** @example monalisa */ + twitter_username?: string | null + /** @example true */ + two_factor_authentication: boolean + /** @example User */ + type: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + } + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string + /** @example 1002604 */ + id: number + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string + /** @example 1 */ + number: number + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string + } + /** + * Project Card + * @description Project cards represent a scope of work. + */ + 'project-card': { + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean + column_name?: string + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string + creator: components['schemas']['nullable-simple-user'] + /** + * @description The project card's ID + * @example 42 + */ + id: number + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string + /** @example Add payload for delete Project column */ + note: string | null + project_id?: string + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string + } + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + 'project-collaborator-permission': { + permission: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Project Column + * @description Project columns contain cards of work. + */ + 'project-column': { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string + } + /** + * Protected Branch + * @description Branch protections protect branches + */ + 'protected-branch': { + allow_deletions?: { + enabled: boolean + } + allow_force_pushes?: { + enabled: boolean + } + enforce_admins?: { + enabled: boolean + /** Format: uri */ + url: string + } + required_conversation_resolution?: { + enabled?: boolean + } + required_linear_history?: { + enabled: boolean + } + required_pull_request_reviews?: { + bypass_pull_request_allowances?: { + teams: components['schemas']['team'][] + users: components['schemas']['simple-user'][] + } + dismiss_stale_reviews?: boolean + dismissal_restrictions?: { + teams: components['schemas']['team'][] + /** Format: uri */ + teams_url: string + /** Format: uri */ + url: string + users: components['schemas']['simple-user'][] + /** Format: uri */ + users_url: string + } + require_code_owner_reviews?: boolean + required_approving_review_count?: number + /** Format: uri */ + url: string + } + required_signatures?: { + /** @example true */ + enabled: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string + } + required_status_checks?: components['schemas']['status-check-policy'] + restrictions?: components['schemas']['branch-restriction-policy'] + /** Format: uri */ + url: string + } + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + 'protected-branch-admin-enforced': { + /** @example true */ + enabled: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string + } + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + 'protected-branch-pull-request-review': { + /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + bypass_pull_request_allowances?: { + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components['schemas']['team'][] + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components['schemas']['simple-user'][] + } | null + /** @example true */ + dismiss_stale_reviews: boolean + dismissal_restrictions?: { + /** @description The list of teams with review dismissal access. */ + teams?: components['schemas']['team'][] + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string + /** @description The list of users with review dismissal access. */ + users?: components['schemas']['simple-user'][] + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string + } + /** @example true */ + require_code_owner_reviews: boolean + /** @example 2 */ + required_approving_review_count?: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string + } + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + 'protected-branch-required-status-check': { + checks: { + app_id: number | null + context: string + }[] + contexts: string[] + contexts_url?: string + enforcement_level?: string + strict?: boolean + url?: string + } + /** + * Public User + * @description Public User + */ + 'public-user': { + /** Format: uri */ + avatar_url: string + bio: string | null + blog: string | null + /** @example 3 */ + collaborators?: number + company: string | null + /** Format: date-time */ + created_at: string + /** @example 1 */ + disk_usage?: number + /** Format: email */ + email: string | null + events_url: string + followers: number + /** Format: uri */ + followers_url: string + following: number + following_url: string + gists_url: string + gravatar_id: string | null + hireable: boolean | null + /** Format: uri */ + html_url: string + id: number + location: string | null + login: string + name: string | null + node_id: string + /** Format: uri */ + organizations_url: string + /** @example 2 */ + owned_private_repos?: number + plan?: { + collaborators: number + name: string + private_repos: number + space: number + } + /** @example 1 */ + private_gists?: number + public_gists: number + public_repos: number + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + /** Format: date-time */ + suspended_at?: string | null + /** @example 2 */ + total_private_repos?: number + twitter_username?: string | null + type: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + } + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + 'pull-request': { + _links: { + comments: components['schemas']['link'] + commits: components['schemas']['link'] + html: components['schemas']['link'] + issue: components['schemas']['link'] + review_comment: components['schemas']['link'] + review_comments: components['schemas']['link'] + self: components['schemas']['link'] + statuses: components['schemas']['link'] + } + /** @example too heated */ + active_lock_reason?: string | null + /** @example 100 */ + additions: number + assignee: components['schemas']['nullable-simple-user'] + assignees?: components['schemas']['simple-user'][] | null + author_association: components['schemas']['author_association'] + auto_merge: components['schemas']['auto_merge'] + base: { + label: string + ref: string + repo: { + allow_forking?: boolean + allow_merge_commit?: boolean + allow_rebase_merge?: boolean + allow_squash_merge?: boolean + archive_url: string + archived: boolean + assignees_url: string + blobs_url: string + branches_url: string + clone_url: string + collaborators_url: string + comments_url: string + commits_url: string + compare_url: string + contents_url: string + /** Format: uri */ + contributors_url: string + /** Format: date-time */ + created_at: string + default_branch: string + /** Format: uri */ + deployments_url: string + description: string | null + disabled: boolean + /** Format: uri */ + downloads_url: string + /** Format: uri */ + events_url: string + fork: boolean + forks: number + forks_count: number + /** Format: uri */ + forks_url: string + full_name: string + git_commits_url: string + git_refs_url: string + git_tags_url: string + git_url: string + has_downloads: boolean + has_issues: boolean + has_pages: boolean + has_projects: boolean + has_wiki: boolean + /** Format: uri */ + homepage: string | null + /** Format: uri */ + hooks_url: string + /** Format: uri */ + html_url: string + id: number + is_template?: boolean + issue_comment_url: string + issue_events_url: string + issues_url: string + keys_url: string + labels_url: string + language: string | null + /** Format: uri */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** Format: uri */ + merges_url: string + milestones_url: string + /** Format: uri */ + mirror_url: string | null + name: string + node_id: string + notifications_url: string + open_issues: number + open_issues_count: number + owner: { + /** Format: uri */ + avatar_url: string + events_url: string + /** Format: uri */ + followers_url: string + following_url: string + gists_url: string + gravatar_id: string | null + /** Format: uri */ + html_url: string + id: number + login: string + node_id: string + /** Format: uri */ + organizations_url: string + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + type: string + /** Format: uri */ + url: string + } + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + private: boolean + pulls_url: string + /** Format: date-time */ + pushed_at: string + releases_url: string + size: number + ssh_url: string + stargazers_count: number + /** Format: uri */ + stargazers_url: string + statuses_url: string + /** Format: uri */ + subscribers_url: string + /** Format: uri */ + subscription_url: string + /** Format: uri */ + svn_url: string + /** Format: uri */ + tags_url: string + /** Format: uri */ + teams_url: string + temp_clone_token?: string + topics?: string[] + trees_url: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + /** @description The repository visibility: public, private, or internal. */ + visibility?: string + watchers: number + watchers_count: number + } + sha: string + user: { + /** Format: uri */ + avatar_url: string + events_url: string + /** Format: uri */ + followers_url: string + following_url: string + gists_url: string + gravatar_id: string | null + /** Format: uri */ + html_url: string + id: number + login: string + node_id: string + /** Format: uri */ + organizations_url: string + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + type: string + /** Format: uri */ + url: string + } + } + /** @example Please pull these awesome changes */ + body: string | null + /** @example 5 */ + changed_files: number + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null + /** @example 10 */ + comments: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string + /** @example 3 */ + commits: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string + /** @example 3 */ + deletions: number + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean + head: { + label: string + ref: string + repo: { + allow_forking?: boolean + allow_merge_commit?: boolean + allow_rebase_merge?: boolean + allow_squash_merge?: boolean + archive_url: string + archived: boolean + assignees_url: string + blobs_url: string + branches_url: string + clone_url: string + collaborators_url: string + comments_url: string + commits_url: string + compare_url: string + contents_url: string + /** Format: uri */ + contributors_url: string + /** Format: date-time */ + created_at: string + default_branch: string + /** Format: uri */ + deployments_url: string + description: string | null + disabled: boolean + /** Format: uri */ + downloads_url: string + /** Format: uri */ + events_url: string + fork: boolean + forks: number + forks_count: number + /** Format: uri */ + forks_url: string + full_name: string + git_commits_url: string + git_refs_url: string + git_tags_url: string + git_url: string + has_downloads: boolean + has_issues: boolean + has_pages: boolean + has_projects: boolean + has_wiki: boolean + /** Format: uri */ + homepage: string | null + /** Format: uri */ + hooks_url: string + /** Format: uri */ + html_url: string + id: number + is_template?: boolean + issue_comment_url: string + issue_events_url: string + issues_url: string + keys_url: string + labels_url: string + language: string | null + /** Format: uri */ + languages_url: string + license: { + key: string + name: string + node_id: string + spdx_id: string | null + /** Format: uri */ + url: string | null + } | null + master_branch?: string + /** Format: uri */ + merges_url: string + milestones_url: string + /** Format: uri */ + mirror_url: string | null + name: string + node_id: string + notifications_url: string + open_issues: number + open_issues_count: number + owner: { + /** Format: uri */ + avatar_url: string + events_url: string + /** Format: uri */ + followers_url: string + following_url: string + gists_url: string + gravatar_id: string | null + /** Format: uri */ + html_url: string + id: number + login: string + node_id: string + /** Format: uri */ + organizations_url: string + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + type: string + /** Format: uri */ + url: string + } + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + private: boolean + pulls_url: string + /** Format: date-time */ + pushed_at: string + releases_url: string + size: number + ssh_url: string + stargazers_count: number + /** Format: uri */ + stargazers_url: string + statuses_url: string + /** Format: uri */ + subscribers_url: string + /** Format: uri */ + subscription_url: string + /** Format: uri */ + svn_url: string + /** Format: uri */ + tags_url: string + /** Format: uri */ + teams_url: string + temp_clone_token?: string + topics?: string[] + trees_url: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + /** @description The repository visibility: public, private, or internal. */ + visibility?: string + watchers: number + watchers_count: number + } | null + sha: string + user: { + /** Format: uri */ + avatar_url: string + events_url: string + /** Format: uri */ + followers_url: string + following_url: string + gists_url: string + gravatar_id: string | null + /** Format: uri */ + html_url: string + id: number + login: string + node_id: string + /** Format: uri */ + organizations_url: string + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + type: string + /** Format: uri */ + url: string + } + } + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string + /** @example 1 */ + id: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string + labels: { + color: string + default: boolean + description: string | null + /** Format: int64 */ + id: number + name: string + node_id: string + url: string + }[] + /** @example true */ + locked: boolean + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null + /** @example true */ + mergeable: boolean | null + /** @example clean */ + mergeable_state: string + merged: boolean + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null + merged_by: components['schemas']['nullable-simple-user'] + milestone: components['schemas']['nullable-milestone'] + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string + /** @example true */ + rebaseable?: boolean | null + requested_reviewers?: components['schemas']['simple-user'][] | null + requested_teams?: components['schemas']['team-simple'][] | null + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string + /** @example 0 */ + review_comments: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: 'open' | 'closed' + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + 'pull-request-merge-result': { + merged: boolean + message: string + sha: string + } + /** Pull Request Minimal */ + 'pull-request-minimal': { + base: { + ref: string + repo: { + id: number + name: string + url: string + } + sha: string + } + head: { + ref: string + repo: { + id: number + name: string + url: string + } + sha: string + } + id: number + number: number + url: string + } + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + 'pull-request-review': { + _links: { + html: { + href: string + } + pull_request: { + href: string + } + } + author_association: components['schemas']['author_association'] + /** + * @description The text of the review. + * @example This looks great. + */ + body: string + body_html?: string + body_text?: string + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string + /** @example CHANGES_REQUESTED */ + state: string + /** Format: date-time */ + submitted_at?: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + 'pull-request-review-comment': { + _links: { + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string + } + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string + } + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string + } + } + author_association: components['schemas']['author_association'] + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string + /** @example "

comment body

" */ + body_html?: string + /** @example "comment body" */ + body_text?: string + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number + /** + * @description The index of the original line in the diff to which the comment applies. + * @example 4 + */ + original_position: number + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string + /** + * @description The line index in the diff to which the comment applies. + * @example 1 + */ + position: number + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string + reactions?: components['schemas']['reaction-rollup'] + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ('LEFT' | 'RIGHT') | null + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string + user: components['schemas']['simple-user'] + } + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + 'pull-request-review-request': { + teams: components['schemas']['team'][] + users: components['schemas']['simple-user'][] + } + /** + * Pull Request Simple + * @description Pull Request Simple + */ + 'pull-request-simple': { + _links: { + comments: components['schemas']['link'] + commits: components['schemas']['link'] + html: components['schemas']['link'] + issue: components['schemas']['link'] + review_comment: components['schemas']['link'] + review_comments: components['schemas']['link'] + self: components['schemas']['link'] + statuses: components['schemas']['link'] + } + /** @example too heated */ + active_lock_reason?: string | null + assignee: components['schemas']['nullable-simple-user'] + assignees?: components['schemas']['simple-user'][] | null + author_association: components['schemas']['author_association'] + auto_merge: components['schemas']['auto_merge'] + base: { + label: string + ref: string + repo: components['schemas']['repository'] + sha: string + user: components['schemas']['nullable-simple-user'] + } + /** @example Please pull these awesome changes */ + body: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean + head: { + label: string + ref: string + repo: components['schemas']['repository'] + sha: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string + /** @example 1 */ + id: number + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string + labels: { + color: string + default: boolean + description: string + /** Format: int64 */ + id: number + name: string + node_id: string + url: string + }[] + /** @example true */ + locked: boolean + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null + milestone: components['schemas']['nullable-milestone'] + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string + /** @example 1347 */ + number: number + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string + requested_reviewers?: components['schemas']['simple-user'][] | null + requested_teams?: components['schemas']['team'][] | null + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string + /** @example open */ + state: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string + /** @example new-feature */ + title: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** Rate Limit */ + 'rate-limit': { + limit: number + remaining: number + reset: number + used: number + } + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + 'rate-limit-overview': { + rate: components['schemas']['rate-limit'] + resources: { + actions_runner_registration?: components['schemas']['rate-limit'] + code_scanning_upload?: components['schemas']['rate-limit'] + core: components['schemas']['rate-limit'] + graphql?: components['schemas']['rate-limit'] + integration_manifest?: components['schemas']['rate-limit'] + scim?: components['schemas']['rate-limit'] + search: components['schemas']['rate-limit'] + source_import?: components['schemas']['rate-limit'] + } + } + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string + /** @example 1 */ + id: number + /** @example MDg6UmVhY3Rpb24x */ + node_id: string + user: components['schemas']['nullable-simple-user'] + } + /** Reaction Rollup */ + 'reaction-rollup': { + '-1': number + '+1': number + confused: number + eyes: number + heart: number + hooray: number + laugh: number + rocket: number + total_count: number + /** Format: uri */ + url: string + } + /** + * Referrer Traffic + * @description Referrer Traffic + */ + 'referrer-traffic': { + /** @example 4 */ + count: number + /** @example Google */ + referrer: string + /** @example 3 */ + uniques: number + } + /** + * Release + * @description A release. + */ + release: { + assets: components['schemas']['release-asset'][] + /** Format: uri */ + assets_url: string + author: components['schemas']['simple-user'] + body?: string | null + body_html?: string + body_text?: string + /** Format: date-time */ + created_at: string + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean + /** Format: uri */ + html_url: string + id: number + mentions_count?: number + name: string | null + node_id: string + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean + /** Format: date-time */ + published_at: string | null + reactions?: components['schemas']['reaction-rollup'] + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string + /** Format: uri */ + tarball_url: string | null + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string + upload_url: string + /** Format: uri */ + url: string + /** Format: uri */ + zipball_url: string | null + } + /** + * Release Asset + * @description Data related to a release. + */ + 'release-asset': { + /** Format: uri */ + browser_download_url: string + content_type: string + /** Format: date-time */ + created_at: string + download_count: number + id: number + label: string | null + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string + node_id: string + size: number + /** + * @description State of the release asset. + * @enum {string} + */ + state: 'uploaded' | 'open' + /** Format: date-time */ + updated_at: string + uploader: components['schemas']['nullable-simple-user'] + /** Format: uri */ + url: string + } + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + 'release-notes-content': { + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string + } + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + 'removed-from-project-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + project_card?: { + column_name: string + id: number + previous_column_name?: string + project_id: number + /** Format: uri */ + project_url: string + /** Format: uri */ + url: string + } + url: string + } + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + 'renamed-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + rename: { + from: string + to: string + } + url: string + } + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + 'repo-search-result-item': { + allow_auto_merge?: boolean + allow_forking?: boolean + allow_merge_commit?: boolean + allow_rebase_merge?: boolean + allow_squash_merge?: boolean + archive_url: string + archived: boolean + assignees_url: string + blobs_url: string + branches_url: string + clone_url: string + collaborators_url: string + comments_url: string + commits_url: string + compare_url: string + contents_url: string + /** Format: uri */ + contributors_url: string + /** Format: date-time */ + created_at: string + default_branch: string + delete_branch_on_merge?: boolean + /** Format: uri */ + deployments_url: string + description: string | null + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** Format: uri */ + downloads_url: string + /** Format: uri */ + events_url: string + fork: boolean + forks: number + forks_count: number + /** Format: uri */ + forks_url: string + full_name: string + git_commits_url: string + git_refs_url: string + git_tags_url: string + git_url: string + has_downloads: boolean + has_issues: boolean + has_pages: boolean + has_projects: boolean + has_wiki: boolean + /** Format: uri */ + homepage: string | null + /** Format: uri */ + hooks_url: string + /** Format: uri */ + html_url: string + id: number + is_template?: boolean + issue_comment_url: string + issue_events_url: string + issues_url: string + keys_url: string + labels_url: string + language: string | null + /** Format: uri */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** Format: uri */ + merges_url: string + milestones_url: string + /** Format: uri */ + mirror_url: string | null + name: string + node_id: string + notifications_url: string + open_issues: number + open_issues_count: number + owner: components['schemas']['nullable-simple-user'] + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + private: boolean + pulls_url: string + /** Format: date-time */ + pushed_at: string + releases_url: string + score: number + size: number + ssh_url: string + stargazers_count: number + /** Format: uri */ + stargazers_url: string + statuses_url: string + /** Format: uri */ + subscribers_url: string + /** Format: uri */ + subscription_url: string + /** Format: uri */ + svn_url: string + /** Format: uri */ + tags_url: string + /** Format: uri */ + teams_url: string + temp_clone_token?: string + text_matches?: components['schemas']['search-result-text-matches'] + topics?: string[] + trees_url: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + /** @description The repository visibility: public, private, or internal. */ + visibility?: string + watchers: number + watchers_count: number + } + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + forks: number + /** @example 9 */ + forks_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + has_pages: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + network_count?: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + open_issues: number + /** @example 0 */ + open_issues_count: number + organization?: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example 108 */ + size: number + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** @example 80 */ + stargazers_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + subscribers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string + template_repository?: { + allow_auto_merge?: boolean + allow_merge_commit?: boolean + allow_rebase_merge?: boolean + allow_squash_merge?: boolean + allow_update_branch?: boolean + archive_url?: string + archived?: boolean + assignees_url?: string + blobs_url?: string + branches_url?: string + clone_url?: string + collaborators_url?: string + comments_url?: string + commits_url?: string + compare_url?: string + contents_url?: string + contributors_url?: string + created_at?: string + default_branch?: string + delete_branch_on_merge?: boolean + deployments_url?: string + description?: string + disabled?: boolean + downloads_url?: string + events_url?: string + fork?: boolean + forks_count?: number + forks_url?: string + full_name?: string + git_commits_url?: string + git_refs_url?: string + git_tags_url?: string + git_url?: string + has_downloads?: boolean + has_issues?: boolean + has_pages?: boolean + has_projects?: boolean + has_wiki?: boolean + homepage?: string + hooks_url?: string + html_url?: string + id?: number + is_template?: boolean + issue_comment_url?: string + issue_events_url?: string + issues_url?: string + keys_url?: string + labels_url?: string + language?: string + languages_url?: string + merges_url?: string + milestones_url?: string + mirror_url?: string + name?: string + network_count?: number + node_id?: string + notifications_url?: string + open_issues_count?: number + owner?: { + avatar_url?: string + events_url?: string + followers_url?: string + following_url?: string + gists_url?: string + gravatar_id?: string + html_url?: string + id?: number + login?: string + node_id?: string + organizations_url?: string + received_events_url?: string + repos_url?: string + site_admin?: boolean + starred_url?: string + subscriptions_url?: string + type?: string + url?: string + } + permissions?: { + admin?: boolean + maintain?: boolean + pull?: boolean + push?: boolean + triage?: boolean + } + private?: boolean + pulls_url?: string + pushed_at?: string + releases_url?: string + size?: number + ssh_url?: string + stargazers_count?: number + stargazers_url?: string + statuses_url?: string + subscribers_count?: number + subscribers_url?: string + subscription_url?: string + svn_url?: string + tags_url?: string + teams_url?: string + temp_clone_token?: string + topics?: string[] + trees_url?: string + updated_at?: string + url?: string + visibility?: string + watchers_count?: number + } | null + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + watchers: number + /** @example 80 */ + watchers_count: number + } + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + 'repository-collaborator-permission': { + permission: string + /** @example admin */ + role_name: string + user: components['schemas']['nullable-collaborator'] + } + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + 'repository-invitation': { + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string + /** @description Whether or not the invitation has expired */ + expired?: boolean + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number + invitee: components['schemas']['nullable-simple-user'] + inviter: components['schemas']['nullable-simple-user'] + node_id: string + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: 'read' | 'write' | 'admin' | 'triage' | 'maintain' + repository: components['schemas']['minimal-repository'] + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string + } + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + 'repository-subscription': { + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean + reason: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string + } + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + 'review-comment': { + _links: { + html: components['schemas']['link'] + pull_request: components['schemas']['link'] + self: components['schemas']['link'] + } + author_association: components['schemas']['author_association'] + /** @example Great stuff */ + body: string + body_html?: string + body_text?: string + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string + /** @example 10 */ + id: number + /** @example 8 */ + in_reply_to_id?: number + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number + /** @example 4 */ + original_position: number + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null + /** @example file1.txt */ + path: string + /** @example 1 */ + position: number | null + /** @example 42 */ + pull_request_review_id: number | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string + reactions?: components['schemas']['reaction-rollup'] + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ('LEFT' | 'RIGHT') | null + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + 'review-dismissed-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + dismissed_review: { + dismissal_commit_id?: string + dismissal_message: string | null + review_id: number + state: string + } + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + 'review-request-removed-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + requested_reviewer?: components['schemas']['simple-user'] + requested_team?: components['schemas']['team'] + review_requester: components['schemas']['simple-user'] + url: string + } + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + 'review-requested-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + requested_reviewer?: components['schemas']['simple-user'] + requested_team?: components['schemas']['team'] + review_requester: components['schemas']['simple-user'] + url: string + } + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + busy: boolean + /** + * @description The id of the runner. + * @example 5 + */ + id: number + labels: components['schemas']['runner-label'][] + /** + * @description The name of the runner. + * @example iMac + */ + name: string + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string + /** + * @description The status of the runner. + * @example online + */ + status: string + } + /** + * Runner Application + * @description Runner Application + */ + 'runner-application': { + architecture: string + download_url: string + filename: string + os: string + sha256_checksum?: string + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string + } + 'runner-groups-enterprise': { + allows_public_repositories: boolean + default: boolean + id: number + name: string + runners_url: string + selected_organizations_url?: string + visibility: string + } + 'runner-groups-org': { + allows_public_repositories: boolean + default: boolean + id: number + inherited: boolean + inherited_allows_public_repositories?: boolean + name: string + runners_url: string + /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string + visibility: string + } + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + 'runner-label': { + /** @description Unique identifier of the label. */ + id?: number + /** @description Name of the label. */ + name: string + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: 'read-only' | 'custom' + } + 'scim-enterprise-group': { + displayName?: string + externalId?: string | null + id: string + members?: { + $ref?: string + display?: string + value?: string + }[] + meta?: { + created?: string + lastModified?: string + location?: string + resourceType?: string + } + schemas: string[] + } + 'scim-enterprise-user': { + active?: boolean + emails?: { + primary?: boolean + type?: string + value?: string + }[] + externalId?: string + groups?: { + value?: string + }[] + id: string + meta?: { + created?: string + lastModified?: string + location?: string + resourceType?: string + } + name?: { + familyName?: string + givenName?: string + } + schemas: string[] + userName?: string + } + /** + * Scim Error + * @description Scim Error + */ + 'scim-error': { + detail?: string | null + documentation_url?: string | null + message?: string | null + schemas?: string[] + scimType?: string | null + status?: number + } + 'scim-group-list-enterprise': { + itemsPerPage: number + Resources: { + displayName?: string + externalId?: string | null + id: string + members?: { + $ref?: string + display?: string + value?: string + }[] + meta?: { + created?: string + lastModified?: string + location?: string + resourceType?: string + } + schemas: string[] + }[] + schemas: string[] + startIndex: number + totalResults: number + } + /** + * SCIM /Users + * @description SCIM /Users provisioning endpoints + */ + 'scim-user': { + /** + * @description The active status of the User. + * @example true + */ + active: boolean + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string | null + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + primary?: boolean + value: string + }[] + /** + * @description The ID of the User. + * @example a7b0f98395 + */ + externalId: string | null + /** @description associated groups */ + groups?: { + display?: string + value?: string + }[] + /** + * @description Unique identifier of an external identity + * @example 1b78eada-9baa-11e6-9eb6-a431576d590e + */ + id: string + meta: { + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created?: string + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + lastModified?: string + /** + * Format: uri + * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d + */ + location?: string + /** @example User */ + resourceType?: string + } + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + familyName: string | null + formatted?: string | null + givenName: string | null + } + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + operations?: { + /** @enum {string} */ + op: 'add' | 'remove' | 'replace' + path?: string + value?: string | { [key: string]: unknown } | unknown[] + }[] + /** @description The ID of the organization. */ + organization_id?: number + /** @description SCIM schema used. */ + schemas: string[] + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string | null + } + /** + * SCIM User List + * @description SCIM User List + */ + 'scim-user-list': { + /** @example 10 */ + itemsPerPage: number + Resources: components['schemas']['scim-user'][] + /** @description SCIM schema used. */ + schemas: string[] + /** @example 1 */ + startIndex: number + /** @example 3 */ + totalResults: number + } + 'scim-user-list-enterprise': { + itemsPerPage: number + Resources: { + active?: boolean + emails?: { + primary?: boolean + type?: string + value?: string + }[] + externalId?: string + groups?: { + value?: string + }[] + id: string + meta?: { + created?: string + lastModified?: string + location?: string + resourceType?: string + } + name?: { + familyName?: string + givenName?: string + } + schemas: string[] + userName?: string + }[] + schemas: string[] + startIndex: number + totalResults: number + } + /** Search Result Text Matches */ + 'search-result-text-matches': { + fragment?: string + matches?: { + indices?: number[] + text?: string + }[] + object_type?: string | null + object_url?: string + property?: string + }[] + 'secret-scanning-alert': { + created_at?: components['schemas']['alert-created-at'] + html_url?: components['schemas']['alert-html-url'] + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string + number?: components['schemas']['alert-number'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null + resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The secret that was detected. */ + secret?: string + /** @description The type of secret that secret scanning detected. */ + secret_type?: string + state?: components['schemas']['secret-scanning-alert-state'] + url?: components['schemas']['alert-url'] + } + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @enum {string|null} + */ + 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null + /** + * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + 'secret-scanning-alert-state': 'open' | 'resolved' + 'secret-scanning-location': { + details: components['schemas']['secret-scanning-location-commit'] + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + type: 'commit' + } + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + 'secret-scanning-location-commit': { + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string + /** @description The API URL to get the associated blob resource */ + blob_url: string + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string + /** @description The API URL to get the associated commit resource */ + commit_url: string + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number + /** @description Line number at which the secret ends in the file */ + end_line: number + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number + /** @description Line number at which the secret starts in the file */ + start_line: number + } + 'selected-actions': { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean + /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ + patterns_allowed?: string[] + /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ + verified_allowed?: boolean + } + /** @description The API URL to use to get or set the actions that are allowed to run, when `allowed_actions` is set to `selected`. */ + 'selected-actions-url': string + /** + * Short Blob + * @description Short Blob + */ + 'short-blob': { + sha: string + url: string + } + /** + * Short Branch + * @description Short Branch + */ + 'short-branch': { + commit: { + sha: string + /** Format: uri */ + url: string + } + name: string + protected: boolean + protection?: components['schemas']['branch-protection'] + /** Format: uri */ + protection_url?: string + } + /** + * Simple Commit + * @description Simple Commit + */ + 'simple-commit': { + author: { + email: string + name: string + } | null + committer: { + email: string + name: string + } | null + id: string + message: string + /** Format: date-time */ + timestamp: string + tree_id: string + } + /** Simple Commit Status */ + 'simple-commit-status': { + /** Format: uri */ + avatar_url: string | null + context: string + /** Format: date-time */ + created_at: string + description: string | null + id: number + node_id: string + required?: boolean | null + state: string + /** Format: uri */ + target_url: string + /** Format: date-time */ + updated_at: string + /** Format: uri */ + url: string + } + /** + * Simple User + * @description Simple User + */ + 'simple-user': { + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + email?: string | null + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** @example 1 */ + id: number + /** @example octocat */ + login: string + name?: string | null + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** @example User */ + type: string + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + } + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string + user: components['schemas']['nullable-simple-user'] + } + /** + * Starred Repository + * @description Starred Repository + */ + 'starred-repository': { + repo: components['schemas']['repository'] + /** Format: date-time */ + starred_at: string + } + /** + * Status + * @description The status of a commit. + */ + status: { + avatar_url: string | null + context: string + created_at: string + creator: components['schemas']['nullable-simple-user'] + description: string + id: number + node_id: string + state: string + target_url: string + updated_at: string + url: string + } + /** + * Status Check Policy + * @description Status Check Policy + */ + 'status-check-policy': { + checks: { + app_id: number | null + /** @example continuous-integration/travis-ci */ + context: string + }[] + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[] + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string + /** @example true */ + strict: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string + } + /** + * Tag + * @description Tag + */ + tag: { + commit: { + sha: string + /** Format: uri */ + url: string + } + /** @example v0.1 */ + name: string + node_id: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string + } + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + description: string | null + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string + id: number + members_url: string + name: string + node_id: string + parent: components['schemas']['nullable-team-simple'] + permission: string + permissions?: { + admin: boolean + maintain: boolean + pull: boolean + push: boolean + triage: boolean + } + privacy?: string + /** Format: uri */ + repositories_url: string + slug: string + /** Format: uri */ + url: string + } + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + 'team-discussion': { + author: components['schemas']['nullable-simple-user'] + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string + /** @example

Hi! This is an area for us to collaborate as a team

*/ + body_html: string + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string + /** @example 0 */ + comments_count: number + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string + /** Format: date-time */ + last_edited_at: string | null + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean + /** + * @description Whether or not this discussion should be restricted to team members and organization administrators. + * @example true + */ + private: boolean + reactions?: components['schemas']['reaction-rollup'] + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string + } + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + 'team-discussion-comment': { + author: components['schemas']['nullable-simple-user'] + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string + /** @example

Do you like apples?

*/ + body_html: string + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string + /** Format: date-time */ + last_edited_at: string | null + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number + reactions?: components['schemas']['reaction-rollup'] + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string + } + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + 'team-full': { + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string + /** @example A great team. */ + description: string | null + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string + /** @example 3 */ + members_count: number + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string + /** + * @description Name of the team + * @example Developers + */ + name: string + /** @example MDQ6VGVhbTE= */ + node_id: string + organization: components['schemas']['organization-full'] + parent?: components['schemas']['nullable-team-simple'] + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: 'closed' | 'secret' + /** @example 10 */ + repos_count: number + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string + /** @example justice-league */ + slug: string + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string + } + /** + * Team Membership + * @description Team Membership + */ + 'team-membership': { + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: 'member' | 'maintainer' + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: 'active' | 'pending' + /** Format: uri */ + url: string + } + /** + * Team Project + * @description A team's access to a project. + */ + 'team-project': { + body: string | null + columns_url: string + created_at: string + creator: components['schemas']['simple-user'] + html_url: string + id: number + name: string + node_id: string + number: number + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string + owner_url: string + permissions: { + admin: boolean + read: boolean + write: boolean + } + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean + state: string + updated_at: string + url: string + } + /** + * Team Repository + * @description A team's access to a repository. + */ + 'team-repository': { + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** @example This your first repo! */ + description: string | null + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + fork: boolean + forks: number + /** @example 9 */ + forks_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example octocat/Hello-World */ + full_name: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + has_pages: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + language: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + license: components['schemas']['nullable-license-simple'] + master_branch?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + network_count?: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + open_issues: number + /** @example 0 */ + open_issues_count: number + owner: components['schemas']['nullable-simple-user'] + permissions?: { + admin: boolean + maintain?: boolean + pull: boolean + push: boolean + triage?: boolean + } + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example admin */ + role_name?: string + /** @example 108 */ + size: number + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** @example 80 */ + stargazers_count: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + subscribers_count?: number + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + temp_clone_token?: string + template_repository?: components['schemas']['nullable-repository'] + topics?: string[] + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + watchers: number + /** @example 80 */ + watchers_count: number + } + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + 'team-simple': { + /** + * @description Description of the team + * @example A great team. + */ + description: string | null + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string + /** + * @description Name of the team + * @example Justice League + */ + name: string + /** @example MDQ6VGVhbTE= */ + node_id: string + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string + /** @example justice-league */ + slug: string + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string + } + /** + * Thread + * @description Thread + */ + thread: { + id: string + last_read_at: string | null + reason: string + repository: components['schemas']['minimal-repository'] + subject: { + latest_comment_url: string + title: string + type: string + url: string + } + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string + unread: boolean + updated_at: string + url: string + } + /** + * Thread Subscription + * @description Thread Subscription + */ + 'thread-subscription': { + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null + ignored: boolean + reason: string | null + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string + /** @example true */ + subscribed: boolean + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string + } + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + 'timeline-assigned-issue-event': { + actor: components['schemas']['simple-user'] + assignee: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + 'timeline-comment-event': { + actor: components['schemas']['simple-user'] + author_association: components['schemas']['author_association'] + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string + body_html?: string + body_text?: string + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string + event: string + /** Format: uri */ + html_url: string + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number + /** Format: uri */ + issue_url: string + node_id: string + performed_via_github_app?: components['schemas']['nullable-integration'] + reactions?: components['schemas']['reaction-rollup'] + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string + user: components['schemas']['simple-user'] + } + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + 'timeline-commit-commented-event': { + comments?: components['schemas']['commit-comment'][] + commit_id?: string + event?: string + node_id?: string + } + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + 'timeline-committed-event': { + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string + } + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string + } + event?: string + /** Format: uri */ + html_url: string + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string + node_id: string + parents: { + /** Format: uri */ + html_url: string + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + /** Format: uri */ + url: string + }[] + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string + /** Format: uri */ + url: string + } + /** Format: uri */ + url: string + verification: { + payload: string | null + reason: string + signature: string | null + verified: boolean + } + } + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + 'timeline-cross-referenced-event': { + actor?: components['schemas']['simple-user'] + /** Format: date-time */ + created_at: string + event: string + source: { + issue?: components['schemas']['issue'] + type?: string + } + /** Format: date-time */ + updated_at: string + } + /** + * Timeline Event + * @description Timeline Event + */ + 'timeline-issue-events': + | components['schemas']['labeled-issue-event'] + | components['schemas']['unlabeled-issue-event'] + | components['schemas']['milestoned-issue-event'] + | components['schemas']['demilestoned-issue-event'] + | components['schemas']['renamed-issue-event'] + | components['schemas']['review-requested-issue-event'] + | components['schemas']['review-request-removed-issue-event'] + | components['schemas']['review-dismissed-issue-event'] + | components['schemas']['locked-issue-event'] + | components['schemas']['added-to-project-issue-event'] + | components['schemas']['moved-column-in-project-issue-event'] + | components['schemas']['removed-from-project-issue-event'] + | components['schemas']['converted-note-to-issue-issue-event'] + | components['schemas']['timeline-comment-event'] + | components['schemas']['timeline-cross-referenced-event'] + | components['schemas']['timeline-committed-event'] + | components['schemas']['timeline-reviewed-event'] + | components['schemas']['timeline-line-commented-event'] + | components['schemas']['timeline-commit-commented-event'] + | components['schemas']['timeline-assigned-issue-event'] + | components['schemas']['timeline-unassigned-issue-event'] + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + 'timeline-line-commented-event': { + comments?: components['schemas']['pull-request-review-comment'][] + event?: string + node_id?: string + } + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + 'timeline-reviewed-event': { + _links: { + html: { + href: string + } + pull_request: { + href: string + } + } + author_association: components['schemas']['author_association'] + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null + body_html?: string + body_text?: string + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string + event: string + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string + /** @example CHANGES_REQUESTED */ + state: string + /** Format: date-time */ + submitted_at?: string + user: components['schemas']['simple-user'] + } + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + 'timeline-unassigned-issue-event': { + actor: components['schemas']['simple-user'] + assignee: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[] + } + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + 'topic-search-result-item': { + aliases?: + | { + topic_relation?: { + id?: number + name?: string + relation_type?: string + topic_id?: number + } + }[] + | null + /** Format: date-time */ + created_at: string + created_by: string | null + curated: boolean + description: string | null + display_name: string | null + featured: boolean + /** Format: uri */ + logo_url?: string | null + name: string + related?: + | { + topic_relation?: { + id?: number + name?: string + relation_type?: string + topic_id?: number + } + }[] + | null + released: string | null + repository_count?: number | null + score: number + short_description: string | null + text_matches?: components['schemas']['search-result-text-matches'] + /** Format: date-time */ + updated_at: string + } + /** Traffic */ + traffic: { + count: number + /** Format: date-time */ + timestamp: string + uniques: number + } + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + 'unassigned-issue-event': { + actor: components['schemas']['simple-user'] + assignee: components['schemas']['simple-user'] + assigner: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + 'unlabeled-issue-event': { + actor: components['schemas']['simple-user'] + commit_id: string | null + commit_url: string | null + created_at: string + event: string + id: number + label: { + color: string + name: string + } + node_id: string + performed_via_github_app: components['schemas']['nullable-integration'] + url: string + } + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + 'user-marketplace-purchase': { + account: components['schemas']['marketplace-account'] + /** @example monthly */ + billing_cycle: string + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null + /** @example true */ + on_free_trial: boolean + plan: components['schemas']['marketplace-listing-plan'] + unit_count: number | null + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null + } + /** + * User Search Result Item + * @description User Search Result Item + */ + 'user-search-result-item': { + /** Format: uri */ + avatar_url: string + bio?: string | null + blog?: string | null + company?: string | null + /** Format: date-time */ + created_at?: string + /** Format: email */ + email?: string | null + events_url: string + followers?: number + /** Format: uri */ + followers_url: string + following?: number + following_url: string + gists_url: string + gravatar_id: string | null + hireable?: boolean | null + /** Format: uri */ + html_url: string + id: number + location?: string | null + login: string + name?: string | null + node_id: string + /** Format: uri */ + organizations_url: string + public_gists?: number + public_repos?: number + /** Format: uri */ + received_events_url: string + /** Format: uri */ + repos_url: string + score: number + site_admin: boolean + starred_url: string + /** Format: uri */ + subscriptions_url: string + /** Format: date-time */ + suspended_at?: string | null + text_matches?: components['schemas']['search-result-text-matches'] + type: string + /** Format: date-time */ + updated_at?: string + /** Format: uri */ + url: string + } + /** + * Validation Error + * @description Validation Error + */ + 'validation-error': { + documentation_url: string + errors?: { + code: string + field?: string + index?: number + message?: string + resource?: string + value?: (string | null) | (number | null) | (string[] | null) + }[] + message: string + } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + 'validation-error-simple': { + documentation_url: string + errors?: string[] + message: string + } + /** Verification */ + verification: { + payload: string | null + reason: string + signature: string | null + verified: boolean + } + /** + * View Traffic + * @description View Traffic + */ + 'view-traffic': { + /** @example 14850 */ + count: number + /** @example 3782 */ + uniques: number + views: components['schemas']['traffic'][] + } + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + 'wait-timer': number + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + 'webhook-config': { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + url?: components['schemas']['webhook-config-url'] + } + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + 'webhook-config-content-type': string + 'webhook-config-insecure-ssl': string | number + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + 'webhook-config-secret': string + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + 'webhook-config-url': string + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string + /** @example 5 */ + id: number + /** @example CI */ + name: string + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string + /** @example ruby.yaml */ + path: string + /** + * @example active + * @enum {string} + */ + state: 'active' | 'deleted' | 'disabled_fork' | 'disabled_inactivity' | 'disabled_manually' + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string + } + /** + * Workflow Run + * @description An invocation of a workflow + */ + 'workflow-run': { + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string + /** @example neutral */ + conclusion: string | null + /** Format: date-time */ + created_at: string + /** @example push */ + event: string + /** @example master */ + head_branch: string | null + head_commit: components['schemas']['nullable-simple-commit'] + head_repository: components['schemas']['minimal-repository'] + /** @example 5 */ + head_repository_id?: number + /** + * @description The SHA of the head commit that points to the version of the worflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null + pull_requests: components['schemas']['pull-request-minimal'][] | null + repository: components['schemas']['minimal-repository'] + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string + /** @example completed */ + status: string | null + /** Format: date-time */ + updated_at: string + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string + } + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + 'workflow-run-usage': { + billable: { + MACOS?: { + job_runs?: { + duration_ms: number + job_id: number + }[] + jobs: number + total_ms: number + } + UBUNTU?: { + job_runs?: { + duration_ms: number + job_id: number + }[] + jobs: number + total_ms: number + } + WINDOWS?: { + job_runs?: { + duration_ms: number + job_id: number + }[] + jobs: number + total_ms: number + } + } + run_duration_ms?: number + } + /** + * Workflow Usage + * @description Workflow Usage + */ + 'workflow-usage': { + billable: { + MACOS?: { + total_ms?: number + } + UBUNTU?: { + total_ms?: number + } + WINDOWS?: { + total_ms?: number + } + } + } + } + responses: { + /** Accepted */ + accepted: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** Response */ + actions_runner_labels: { + content: { + 'application/json': { + labels: components['schemas']['runner-label'][] + total_count: number + } + } + } + /** Response */ + actions_runner_labels_readonly: { + content: { + 'application/json': { + labels: components['schemas']['runner-label'][] + total_count: number + } + } + } + /** Bad Request */ + bad_request: { + content: { + 'application/json': components['schemas']['basic-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Conflict */ + conflict: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Forbidden */ + forbidden: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Forbidden Gist */ + forbidden_gist: { + content: { + 'application/json': { + block?: { + created_at?: string + html_url?: string | null + reason?: string + } + documentation_url?: string + message?: string + } + } + } + /** Found */ + found: unknown + /** Gone */ + gone: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Internal Error */ + internal_error: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Moved permanently */ + moved_permanently: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** A header with no content is returned. */ + no_content: unknown + /** Resource not found */ + not_found: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Not modified */ + not_modified: unknown + /** Preview header missing */ + preview_header_missing: { + content: { + 'application/json': { + documentation_url: string + message: string + } + } + } + /** Requires authentication */ + requires_authentication: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Bad Request */ + scim_bad_request: { + content: { + 'application/json': components['schemas']['scim-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Conflict */ + scim_conflict: { + content: { + 'application/json': components['schemas']['scim-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Forbidden */ + scim_forbidden: { + content: { + 'application/json': components['schemas']['scim-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Internal Error */ + scim_internal_error: { + content: { + 'application/json': components['schemas']['scim-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Resource not found */ + scim_not_found: { + content: { + 'application/json': components['schemas']['scim-error'] + 'application/scim+json': components['schemas']['scim-error'] + } + } + /** Service unavailable */ + service_unavailable: { + content: { + 'application/json': { + code?: string + documentation_url?: string + message?: string + } + } + } + /** Temporary Redirect */ + temporary_redirect: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + /** Validation failed */ + validation_failed: { + content: { + 'application/json': components['schemas']['validation-error'] + } + } + /** Validation failed */ + validation_failed_simple: { + content: { + 'application/json': components['schemas']['validation-error-simple'] + } + } + } + parameters: { + /** @description account_id parameter */ + 'account-id': number + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor: string + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + 'alert-number': components['schemas']['alert-number'] + /** @description If `true`, show notifications marked as read. */ + all: boolean + 'app-slug': string + /** @description artifact_id parameter */ + 'artifact-id': number + /** @description asset_id parameter */ + 'asset-id': number + /** @description The attempt number of the workflow run. */ + 'attempt-number': number + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + 'audit-log-after': string + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + 'audit-log-before': string + /** + * @description The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + 'audit-log-include': 'web' | 'git' | 'all' + /** + * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + 'audit-log-order': 'desc' | 'asc' + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + 'audit-log-phrase': string + /** @description authorization_id parameter */ + 'authorization-id': number + /** @description autolink_id parameter */ + 'autolink-id': number + /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before: string + /** @description The name of the branch. */ + branch: string + /** @description card_id parameter */ + 'card-id': number + /** @description Returns check runs with the specified `name`. */ + 'check-name': string + /** @description check_run_id parameter */ + 'check-run-id': number + /** @description check_suite_id parameter */ + 'check-suite-id': number + /** @description The client ID of your GitHub app. */ + 'client-id': string + /** @description The name of the codespace. */ + 'codespace-name': string + /** @description column_id parameter */ + 'column-id': number + /** @description comment_id parameter */ + 'comment-id': number + 'comment-number': number + /** @description commit_sha parameter */ + 'commit-sha': string + /** @description Used for pagination: the number of results to return. */ + count: number + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created: string + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor: string + 'delivery-id': number + /** @description deployment_id parameter */ + 'deployment-id': number + /** @description One of `asc` (ascending) or `desc` (descending). */ + direction: 'asc' | 'desc' + 'discussion-number': number + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string + /** @description The name of the environment */ + 'environment-name': string + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string + /** @description If `true` pull requests are omitted from the response (empty array). */ + 'exclude-pull-requests': boolean + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + 'export-id': string + /** @description gist_id parameter */ + 'gist-id': string + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + 'git-ref': components['schemas']['code-scanning-ref'] + /** @description gpg_key_id parameter */ + 'gpg-key-id': number + /** @description grant_id parameter */ + 'grant-id': number + /** @description group_id parameter */ + 'group-id': number + 'hook-id': number + /** @description installation_id parameter */ + 'installation-id': number + /** @description invitation_id parameter */ + 'invitation-id': number + /** @description issue_number parameter */ + 'issue-number': number + /** @description job_id parameter */ + 'job-id': number + /** @description key_id parameter */ + 'key-id': number + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string + /** @description migration_id parameter */ + 'migration-id': number + /** @description milestone_number parameter */ + 'milestone-number': number + /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order: 'desc' | 'asc' + org: string + /** @description Unique identifier of an organization. */ + 'org-id': number + owner: string + /** @description The name of the package. */ + 'package-name': string + /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + /** @description Unique identifier of the package version. */ + 'package-version-id': number + /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + 'package-visibility': 'public' | 'private' | 'internal' + /** @description Page number of the results to fetch. */ + page: number + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + 'pagination-after': string + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + 'pagination-before': string + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean + /** @description Must be one of: `day`, `week`. */ + per: '' | 'day' | 'week' + /** @description Results per page (max 100) */ + 'per-page': number + /** @description plan_id parameter */ + 'plan-id': number + 'project-id': number + 'pull-number': number + 'reaction-id': number + /** @description release_id parameter */ + 'release-id': number + repo: string + /** @description repo_name parameter */ + 'repo-name': string + 'repository-id': number + /** @description ID of the Repository to filter on */ + 'repository-id-in-query': number + /** @description review_id parameter */ + 'review-id': number + /** @description The id of the workflow run. */ + 'run-id': number + /** @description Unique identifier of the self-hosted runner group. */ + 'runner-group-id': number + /** @description Unique identifier of the self-hosted runner. */ + 'runner-id': number + /** @description The name of a self-hosted runner's custom label. */ + 'runner-label-name': string + /** @description Identifier generated by the GitHub SCIM endpoint. */ + 'scim-group-id': string + /** @description scim_user_id parameter */ + 'scim-user-id': string + /** @description secret_name parameter */ + 'secret-name': string + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + 'secret-scanning-alert-resolution': string + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" + * for a complete list of secret types (API slug). + */ + 'secret-scanning-alert-secret-type': string + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + 'secret-scanning-alert-state': 'open' | 'resolved' + /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since: string + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + 'since-org': number + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + 'since-repo': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + 'since-user': number + /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort: 'created' | 'updated' + /** @description Used for pagination: the index of the first result to return. */ + 'start-index': number + /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + status: 'queued' | 'in_progress' | 'completed' + 'team-id': number + /** @description team_slug parameter */ + 'team-slug': string + /** @description thread_id parameter */ + 'thread-id': number + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + username: string + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + 'workflow-id': number | string + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + 'workflow-run-branch': string + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + 'workflow-run-check-suite-id': number + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + 'workflow-run-status': + | 'completed' + | 'action_required' + | 'cancelled' + | 'failure' + | 'neutral' + | 'skipped' + | 'stale' + | 'success' + | 'timed_out' + | 'in_progress' + | 'queued' + | 'requested' + | 'waiting' + } + headers: { + 'content-type'?: string + link?: string + location?: string + 'x-common-marker-version'?: string + 'x-rate-limit-limit'?: number + 'x-rate-limit-remaining'?: number + 'x-rate-limit-reset'?: number + } +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + 'meta/root': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + /** Format: uri-template */ + authorizations_url: string + /** Format: uri-template */ + code_search_url: string + /** Format: uri-template */ + commit_search_url: string + /** Format: uri-template */ + current_user_authorizations_html_url: string + /** Format: uri-template */ + current_user_repositories_url: string + /** Format: uri-template */ + current_user_url: string + /** Format: uri-template */ + emails_url: string + /** Format: uri-template */ + emojis_url: string + /** Format: uri-template */ + events_url: string + /** Format: uri-template */ + feeds_url: string + /** Format: uri-template */ + followers_url: string + /** Format: uri-template */ + following_url: string + /** Format: uri-template */ + gists_url: string + /** Format: uri-template */ + hub_url: string + /** Format: uri-template */ + issue_search_url: string + /** Format: uri-template */ + issues_url: string + /** Format: uri-template */ + keys_url: string + /** Format: uri-template */ + label_search_url: string + /** Format: uri-template */ + notifications_url: string + /** Format: uri-template */ + organization_repositories_url: string + /** Format: uri-template */ + organization_teams_url: string + /** Format: uri-template */ + organization_url: string + /** Format: uri-template */ + public_gists_url: string + /** Format: uri-template */ + rate_limit_url: string + /** Format: uri-template */ + repository_search_url: string + /** Format: uri-template */ + repository_url: string + /** Format: uri-template */ + starred_gists_url: string + /** Format: uri-template */ + starred_url: string + /** Format: uri-template */ + topic_search_url?: string + /** Format: uri-template */ + user_organizations_url: string + /** Format: uri-template */ + user_repositories_url: string + /** Format: uri-template */ + user_search_url: string + /** Format: uri-template */ + user_url: string + } + } + } + } + } + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-authenticated': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'] + } + } + } + } + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ + 'apps/create-from-manifest': { + parameters: { + path: { + code: string + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['integration'] & + ({ + client_id: string + client_secret: string + pem: string + webhook_secret: string | null + } & { [key: string]: unknown }) + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { [key: string]: unknown } + } + } + } + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-webhook-config-for-app': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + } + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/update-webhook-config-for-app': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + requestBody: { + content: { + 'application/json': { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + url?: components['schemas']['webhook-config-url'] + } + } + } + } + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/list-webhook-deliveries': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery-item'][] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-webhook-delivery': { + parameters: { + path: { + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery'] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/redeliver-webhook-delivery': { + parameters: { + path: { + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + 'apps/list-installations': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + outdated?: string + } + } + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['installation'][] + } + } + } + } + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-installation': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['installation'] + } + } + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + } + } + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/delete-installation': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/create-installation-access-token': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['installation-token'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + permissions?: components['schemas']['app-permissions'] + /** @description List of repository names that the token should have access to */ + repositories?: string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + } + } + } + } + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/suspend-installation': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/unsuspend-installation': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + 'apps/delete-authorization': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } + } + } + } + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + 'apps/check-token': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The access_token of the OAuth application. */ + access_token: string + } + } + } + } + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + 'apps/delete-token': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } + } + } + } + /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + 'apps/reset-token': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The access_token of the OAuth application. */ + access_token: string + } + } + } + } + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + 'apps/scope-token': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string + permissions?: components['schemas']['app-permissions'] + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number + } + } + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + */ + 'oauth-authorizations/list-grants': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['application-grant'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 'oauth-authorizations/get-grant': { + parameters: { + path: { + /** grant_id parameter */ + grant_id: components['parameters']['grant-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['application-grant'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + 'oauth-authorizations/delete-grant': { + parameters: { + path: { + /** grant_id parameter */ + grant_id: components['parameters']['grant-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + 'apps/get-by-slug': { + parameters: { + path: { + app_slug: components['parameters']['app-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 'oauth-authorizations/list-authorizations': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['authorization'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + 'oauth-authorizations/create-authorization': { + parameters: {} + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client key for which to create the token. */ + client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + } + } + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 'oauth-authorizations/get-authorization': { + parameters: { + path: { + /** authorization_id parameter */ + authorization_id: components['parameters']['authorization-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 'oauth-authorizations/delete-authorization': { + parameters: { + path: { + /** authorization_id parameter */ + authorization_id: components['parameters']['authorization-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + 'oauth-authorizations/update-authorization': { + parameters: { + path: { + /** authorization_id parameter */ + authorization_id: components['parameters']['authorization-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[] + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[] + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + } + } + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + 'oauth-authorizations/get-or-create-authorization-for-app': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + } + } + } + } + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components['parameters']['client-id'] + fingerprint: string + } + } + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** Response if returning a new token */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + } + } + } + } + 'codes-of-conduct/get-all-codes-of-conduct': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-of-conduct'][] + } + } + 304: components['responses']['not_modified'] + } + } + 'codes-of-conduct/get-conduct-code': { + parameters: { + path: { + key: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-of-conduct'] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + } + } + /** Lists all the emojis available to use on GitHub. */ + 'emojis/get': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': { [key: string]: string } + } + } + 304: components['responses']['not_modified'] + } + } + /** + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/get-github-actions-permissions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-enterprise-permissions'] + } + } + } + } + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-github-actions-permissions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled_organizations: components['schemas']['enabled-organizations'] + } + } + } + } + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + organizations: components['schemas']['organization-simple'][] + total_count: number + } + } + } + } + } + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[] + } + } + } + } + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of an organization. */ + org_id: components['parameters']['org-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of an organization. */ + org_id: components['parameters']['org-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/get-allowed-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + } + /** + * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-allowed-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + runner_groups: components['schemas']['runner-groups-enterprise'][] + total_count: number + } + } + } + } + } + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['runner-groups-enterprise'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** @description Name of the runner group. */ + name: string + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[] + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` + * @enum {string} + */ + visibility?: 'selected' | 'all' + } + } + } + } + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-groups-enterprise'] + } + } + } + } + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-groups-enterprise'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** @description Name of the runner group. */ + name?: string + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' + } + } + } + } + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + organizations: components['schemas']['organization-simple'][] + total_count: number + } + } + } + } + } + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[] + } + } + } + } + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of an organization. */ + org_id: components['parameters']['org-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of an organization. */ + org_id: components['parameters']['org-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + runners: components['schemas']['runner'][] + total_count: number + } + } + } + } + } + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + runners: number[] + } + } + } + } + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + runners?: components['schemas']['runner'][] + total_count?: number + } + } + } + } + } + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } + } + } + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + } + } + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } + } + } + } + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-runner-applications-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-application'][] + } + } + } + } + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + 'enterprise-admin/create-registration-token-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + 'enterprise-admin/create-remove-token-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + 'enterprise-admin/get-audit-log': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components['parameters']['audit-log-phrase'] + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components['parameters']['audit-log-include'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components['parameters']['audit-log-after'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['audit-log-event'][] + } + } + } + } + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + 'secret-scanning/list-alerts-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" + * for a complete list of secret types (API slug). + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components['parameters']['pagination-after'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-secret-scanning-alert'][] + } + } + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + 'billing/get-github-actions-billing-ghe': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-billing-usage'] + } + } + } + } + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + */ + 'billing/get-github-advanced-security-billing-ghe': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Success */ + 200: { + content: { + 'application/json': components['schemas']['advanced-security-active-committers'] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + } + } + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + 'billing/get-github-packages-billing-ghe': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['packages-billing-usage'] + } + } + } + } + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + 'billing/get-shared-storage-billing-ghe': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-billing-usage'] + } + } + } + } + /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ + 'activity/list-public-events': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 503: components['responses']['service_unavailable'] + } + } + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + 'activity/get-feeds': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['feed'] + } + } + } + } + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + 'gists/list': { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['base-gist'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + } + } + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + 'gists/create': { + parameters: {} + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string + } + } + public?: boolean | ('true' | 'false') + } + } + } + } + 'gists/get': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] + } + } + 'gists/delete': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + 'gists/update': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string + /** + * @description Names of files to be updated + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: { [key: string]: unknown } } + } | null + } + } + } + 'gists/get-revision': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + sha: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'gists/list-comments': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['gist-comment'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'gists/create-comment': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['gist-comment'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string + } + } + } + } + 'gists/get-comment': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-comment'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] + } + } + 'gists/delete-comment': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'gists/update-comment': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string + } + } + } + } + 'gists/list-commits': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['gist-commit'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'gists/list-forks': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['gist-simple'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + 'gists/fork': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['base-gist'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'gists/check-is-starred': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response if gist is starred */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + 404: { + content: { + 'application/json': { [key: string]: unknown } + } + } + } + } + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'gists/star': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'gists/unstar': { + parameters: { + path: { + /** gist_id parameter */ + gist_id: components['parameters']['gist-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + 'gists/list-public': { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['base-gist'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + } + /** List the authenticated user's starred gists: */ + 'gists/list-starred': { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['base-gist'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + 'gitignore/get-all-templates': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': string[] + } + } + 304: components['responses']['not_modified'] + } + } + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + 'gitignore/get-template': { + parameters: { + path: { + name: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gitignore-template'] + } + } + 304: components['responses']['not_modified'] + } + } + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + 'apps/list-repos-accessible-to-installation': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + repositories: components['schemas']['repository'][] + /** @example selected */ + repository_selection?: string + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + 'apps/revoke-installation-access-token': { + parameters: {} + responses: { + /** Response */ + 204: never + } + } + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list': { + parameters: { + query: { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: 'created' | 'updated' | 'comments' + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + collab?: boolean + orgs?: boolean + owned?: boolean + pulls?: boolean + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'licenses/get-all-commonly-used': { + parameters: { + query: { + featured?: boolean + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license-simple'][] + } + } + 304: components['responses']['not_modified'] + } + } + 'licenses/get': { + parameters: { + path: { + license: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'markdown/render': { + parameters: {} + responses: { + /** Response */ + 200: { + headers: { + 'Content-Length'?: string + } + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] + } + requestBody: { + content: { + 'application/json': { + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string + /** + * @description The rendering mode. Can be either `markdown` or `gfm`. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: 'markdown' | 'gfm' + /** @description The Markdown text to render in HTML. */ + text: string + } + } + } + } + /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ + 'markdown/render-raw': { + parameters: {} + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] + } + requestBody: { + content: { + 'text/plain': string + 'text/x-markdown': string + } + } + } + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/get-subscription-plan-for-account': { + parameters: { + path: { + /** account_id parameter */ + account_id: components['parameters']['account-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['marketplace-purchase'] + } + } + 401: components['responses']['requires_authentication'] + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/list-plans': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['marketplace-listing-plan'][] + } + } + 401: components['responses']['requires_authentication'] + 404: components['responses']['not_found'] + } + } + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/list-accounts-for-plan': { + parameters: { + path: { + /** plan_id parameter */ + plan_id: components['parameters']['plan-id'] + } + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['marketplace-purchase'][] + } + } + 401: components['responses']['requires_authentication'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/get-subscription-plan-for-account-stubbed': { + parameters: { + path: { + /** account_id parameter */ + account_id: components['parameters']['account-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['marketplace-purchase'] + } + } + 401: components['responses']['requires_authentication'] + /** Not Found when the account has not purchased the listing */ + 404: unknown + } + } + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/list-plans-stubbed': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['marketplace-listing-plan'][] + } + } + 401: components['responses']['requires_authentication'] + } + } + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + 'apps/list-accounts-for-plan-stubbed': { + parameters: { + path: { + /** plan_id parameter */ + plan_id: components['parameters']['plan-id'] + } + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['marketplace-purchase'][] + } + } + 401: components['responses']['requires_authentication'] + } + } + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. + */ + 'meta/get': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['api-overview'] + } + } + 304: components['responses']['not_modified'] + } + } + 'activity/list-public-events-for-repo-network': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** List all notifications for the current user, sorted by most recently updated. */ + 'activity/list-notifications-for-authenticated-user': { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components['parameters']['all'] + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components['parameters']['participating'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components['parameters']['before'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['thread'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + } + /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-notifications-as-read': { + parameters: {} + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + } + } + } + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. + */ + last_read_at?: string + /** @description Whether the notification has been read. */ + read?: boolean + } + } + } + } + 'activity/get-thread': { + parameters: { + path: { + /** thread_id parameter */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['thread'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'activity/mark-thread-as-read': { + parameters: { + path: { + /** thread_id parameter */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + } + } + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + 'activity/get-thread-subscription-for-authenticated-user': { + parameters: { + path: { + /** thread_id parameter */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['thread-subscription'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + 'activity/set-thread-subscription': { + parameters: { + path: { + /** thread_id parameter */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['thread-subscription'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean + } + } + } + } + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + 'activity/delete-thread-subscription': { + parameters: { + path: { + /** thread_id parameter */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Get the octocat as ASCII art */ + 'meta/get-octocat': { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/octocat-stream': string + } + } + } + } + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + 'orgs/list': { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components['parameters']['since-org'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + 304: components['responses']['not_modified'] + } + } + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-linked-external-idp-groups-to-team-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-groups'] + } + } + } + } + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + 'orgs/list-custom-roles': { + parameters: { + path: { + organization_id: string + } + } + responses: { + /** Response - list of custom role names */ + 200: { + content: { + 'application/json': { + custom_roles?: components['schemas']['organization-custom-repository-role'][] + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number + } + } + } + } + } + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + 'orgs/get': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + 'orgs/update': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 409: components['responses']['conflict'] + /** Validation failed */ + 422: { + content: { + 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string + /** @example "http://github.blog" */ + blog?: string + /** @description The company name. */ + company?: string + /** + * @description Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + * @default read + * @enum {string} + */ + default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description The description of the company. */ + description?: string + /** @description The publicly visible email address. */ + email?: string + /** @description Toggles whether an organization can use organization projects. */ + has_organization_projects?: boolean + /** @description Toggles whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean + /** @description The location. */ + location?: string + /** + * @description Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * \* `none` - only admin members can create repositories. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + */ + members_can_create_internal_repositories?: boolean + /** + * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: + * \* `true` - all organization members can create GitHub Pages sites. + * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean + /** + * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: + * \* `true` - all organization members can create private GitHub Pages sites. + * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean + /** + * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + */ + members_can_create_private_repositories?: boolean + /** + * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: + * \* `true` - all organization members can create public GitHub Pages sites. + * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean + /** + * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + */ + members_can_create_public_repositories?: boolean + /** + * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean + /** + * @description Toggles whether organization members can fork private organization repositories. Can be one of: + * \* `true` - all organization members can fork private repositories within the organization. + * \* `false` - no organization members can fork private repositories within the organization. + * @default false + */ + members_can_fork_private_repositories?: boolean + /** @description The shorthand name of the company. */ + name?: string + /** @description The Twitter username of the company. */ + twitter_username?: string + } + } + } + } + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/get-github-actions-permissions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-organization-permissions'] + } + } + } + } + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * + * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/set-github-actions-permissions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled_repositories: components['schemas']['enabled-repositories'] + } + } + } + } + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/list-selected-repositories-enabled-github-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + repositories: components['schemas']['repository'][] + total_count: number + } + } + } + } + } + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/set-selected-repositories-enabled-github-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[] + } + } + } + } + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/enable-selected-repository-github-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/disable-selected-repository-github-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/get-allowed-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + } + /** + * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. + * + * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/set-allowed-actions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well if GitHub Actions can submit approving pull request reviews. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/get-github-actions-default-workflow-permissions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + 'actions/set-github-actions-default-workflow-permissions-organization': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-self-hosted-runner-groups-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + runner_groups: components['schemas']['runner-groups-org'][] + total_count: number + } + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/create-self-hosted-runner-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** @description Name of the runner group. */ + name: string + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[] + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/get-self-hosted-runner-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/delete-self-hosted-runner-group-from-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/update-self-hosted-runner-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-repo-access-to-self-hosted-runner-group-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + repositories: components['schemas']['minimal-repository'][] + total_count: number + } + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/set-repo-access-to-self-hosted-runner-group-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[] + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-self-hosted-runners-in-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + runners: components['schemas']['runner'][] + total_count: number + } + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/set-self-hosted-runners-in-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + runners: number[] + } + } + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + 'actions/add-self-hosted-runner-to-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-self-hosted-runner-from-group-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-self-hosted-runners-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + runners: components['schemas']['runner'][] + total_count: number + } + } + } + } + } + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/get-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } + } + } + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/delete-self-hosted-runner-from-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + } + } + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/set-custom-labels-for-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } + } + } + } + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + } + } + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-runner-applications-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-application'][] + } + } + } + } + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + 'actions/create-registration-token-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + 'actions/create-remove-token-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/list-org-secrets': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['organization-actions-secret'][] + total_count: number + } + } + } + } + } + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/get-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-actions-secret'] + } + } + } + } + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'actions/create-or-update-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: string[] + /** + * @description Configures the access that repositories have to the organization secret. Can be one of: + * \- `all` - All repositories in an organization can access the secret. + * \- `private` - Private repositories in an organization can access the secret. + * \- `selected` - Only specific repositories can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + } + } + } + } + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/delete-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/list-selected-repos-for-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + repositories: components['schemas']['minimal-repository'][] + total_count: number + } + } + } + } + } + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/set-selected-repos-for-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] + } + } + } + } + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/add-selected-repo-to-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown + } + } + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/remove-selected-repo-from-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/get-org-public-key': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-public-key'] + } + } + } + } + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + */ + 'orgs/get-audit-log': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components['parameters']['audit-log-phrase'] + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components['parameters']['audit-log-include'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components['parameters']['audit-log-after'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['audit-log-event'][] + } + } + } + } + /** List the users blocked by an organization. */ + 'orgs/list-blocked-users': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 415: components['responses']['preview_header_missing'] + } + } + 'orgs/check-blocked-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** If the user is blocked: */ + 204: never + /** If the user is not blocked: */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + 'orgs/block-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + } + 'orgs/unblock-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all code scanning alerts for the default branch (usually `main` + * or `master`) for all eligible repositories in an organization. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alerts-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components['schemas']['code-scanning-alert-state'] + /** Can be one of `created`, `updated`. */ + sort?: 'created' | 'updated' + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['code-scanning-organization-alert-items'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + 'orgs/list-saml-sso-authorizations': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page token */ + page?: number + /** Limits the list of credentials authorizations for an organization to a specific login */ + login?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['credential-authorization'][] + } + } + } + } + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + 'orgs/remove-saml-sso-authorization': { + parameters: { + path: { + org: components['parameters']['org'] + credential_id: number + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-org-secrets': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['organization-dependabot-secret'][] + total_count: number + } + } + } + } + } + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-dependabot-secret'] + } + } + } + } + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'dependabot/create-or-update-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: string[] + /** + * @description Configures the access that repositories have to the organization secret. Can be one of: + * \- `all` - All repositories in an organization can access the secret. + * \- `private` - Private repositories in an organization can access the secret. + * \- `selected` - Only specific repositories can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + } + } + } + } + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/delete-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-selected-repos-for-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + repositories: components['schemas']['minimal-repository'][] + total_count: number + } + } + } + } + } + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/set-selected-repos-for-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] + } + } + } + } + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/add-selected-repo-to-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown + } + } + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/remove-selected-repo-from-org-secret': { + parameters: { + path: { + org: components['parameters']['org'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-public-key': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-public-key'] + } + } + } + } + 'activity/list-public-org-events': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/external-idp-group-info-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** group_id parameter */ + group_id: components['parameters']['group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-group'] + } + } + } + } + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-external-idp-groups-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page token */ + page?: number + /** Limits the list to groups containing the text in the group name */ + display_name?: string + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['external-groups'] + } + } + } + } + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + 'orgs/list-failed-invitations': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-invitation'][] + } + } + 404: components['responses']['not_found'] + } + } + 'orgs/list-webhooks': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['org-hook'][] + } + } + 404: components['responses']['not_found'] + } + } + /** Here's how you can create a hook that posts payloads in JSON format: */ + 'orgs/create-webhook': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['org-hook'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + /** @example "password" */ + password?: string + secret?: components['schemas']['webhook-config-secret'] + url: components['schemas']['webhook-config-url'] + /** @example "kdaigle" */ + username?: string + } + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Must be passed as "web". */ + name: string + } + } + } + } + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + 'orgs/get-webhook': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-hook'] + } + } + 404: components['responses']['not_found'] + } + } + 'orgs/delete-webhook': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + 'orgs/update-webhook': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-hook'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + config?: { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + url: components['schemas']['webhook-config-url'] + } + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @example "web" */ + name?: string + } + } + } + } + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + 'orgs/get-webhook-config-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + } + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + 'orgs/update-webhook-config-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + requestBody: { + content: { + 'application/json': { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + url?: components['schemas']['webhook-config-url'] + } + } + } + } + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + 'orgs/list-webhook-deliveries': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery-item'][] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Returns a delivery for a webhook configured in an organization. */ + 'orgs/get-webhook-delivery': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery'] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Redeliver a delivery for a webhook configured in an organization. */ + 'orgs/redeliver-webhook-delivery': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + 'orgs/ping-webhook': { + parameters: { + path: { + org: components['parameters']['org'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-org-installation': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['installation'] + } + } + } + } + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + 'orgs/list-app-installations': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + installations: components['schemas']['installation'][] + total_count: number + } + } + } + } + } + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + 'interactions/get-restrictions-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } + } + } + } + } + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + 'interactions/set-restrictions-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': components['schemas']['interaction-limit'] + } + } + } + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + 'interactions/remove-restrictions-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ + 'orgs/list-pending-invitations': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-invitation'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'orgs/create-invitation': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['organization-invitation'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number + /** + * @description Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + * @default direct_member + * @enum {string} + */ + role?: 'admin' | 'direct_member' | 'billing_manager' + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[] + } + } + } + } + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + 'orgs/cancel-invitation': { + parameters: { + path: { + org: components['parameters']['org'] + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + 'orgs/list-invitation-teams': { + parameters: { + path: { + org: components['parameters']['org'] + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: 'created' | 'updated' | 'comments' + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 404: components['responses']['not_found'] + } + } + /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ + 'orgs/list-members': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: '2fa_disabled' | 'all' + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: 'all' | 'admin' | 'member' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + /** Response if requester is not an organization member */ + 302: never + 422: components['responses']['validation_failed'] + } + } + /** Check if a user is, publicly or privately, a member of the organization. */ + 'orgs/check-membership-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never + /** Response if requester is not an organization member */ + 302: never + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown + } + } + /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ + 'orgs/remove-member': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + } + } + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + 'orgs/get-membership-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-membership'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + 'orgs/set-membership-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-membership'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + * @default member + * @enum {string} + */ + role?: 'admin' | 'member' + } + } + } + } + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + 'orgs/remove-membership-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists the most recent migrations. */ + 'migrations/list-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Exclude attributes from the API response to improve performance */ + exclude?: 'repositories'[] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['migration'][] + } + } + } + } + /** Initiates the generation of a migration archive. */ + 'migrations/start-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['migration'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + exclude?: 'repositories'[] + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[] + } + } + } + } + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + 'migrations/get-status-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: 'repositories'[] + } + } + responses: { + /** + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + 200: { + content: { + 'application/json': components['schemas']['migration'] + } + } + 404: components['responses']['not_found'] + } + } + /** Fetches the URL to a migration archive. */ + 'migrations/download-archive-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + } + responses: { + /** Response */ + 302: never + 404: components['responses']['not_found'] + } + } + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + 'migrations/delete-archive-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + 'migrations/unlock-repo-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + /** repo_name parameter */ + repo_name: components['parameters']['repo-name'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** List all the repositories for this organization migration. */ + 'migrations/list-repos-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 404: components['responses']['not_found'] + } + } + /** List all users who are outside collaborators of an organization. */ + 'orgs/list-outside-collaborators': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: '2fa_disabled' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + 'orgs/convert-member-to-outside-collaborator': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** User was converted */ + 204: never + /** Forbidden if user is the last owner of the organization or not a member of the organization */ + 403: unknown + 404: components['responses']['not_found'] + } + } + /** Removing a user from this list will remove them from all the organization's repositories. */ + 'orgs/remove-outside-collaborator': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + } + } + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/list-packages-for-organization': { + parameters: { + query: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components['parameters']['package-visibility'] + } + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-for-organization': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'] + } + } + } + } + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + 'packages/delete-package-for-org': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 'packages/restore-package-for-org': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + } + query: { + /** package token */ + token?: string + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-all-package-versions-for-package-owned-by-org': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** The state of the package, either active or deleted. */ + state?: 'active' | 'deleted' + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-version-for-organization': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'] + } + } + } + } + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + 'packages/delete-package-version-for-org': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 'packages/restore-package-version-for-org': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + org: components['parameters']['org'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/list-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['project'][] + } + } + 422: components['responses']['validation_failed_simple'] + } + } + /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/create-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The description of the project. */ + body?: string + /** @description The name of the project. */ + name: string + } + } + } + } + /** Members of an organization can choose to have their membership publicized or not. */ + 'orgs/list-public-members': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + 'orgs/check-public-membership-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response if user is a public member */ + 204: never + /** Not Found if user is not a public member */ + 404: unknown + } + } + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'orgs/set-public-membership-for-authenticated-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + } + } + 'orgs/remove-public-membership-for-authenticated-user': { + parameters: { + path: { + org: components['parameters']['org'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists repositories for the specified organization. */ + 'repos/list-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' + /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + sort?: 'created' | 'updated' | 'pushed' | 'full_name' + /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + } + } + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + 'repos/create-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['repository'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean + /** @description A short description of the repository. */ + description?: string + /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ + gitignore_template?: string + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean + /** @description A URL with more information about the repository. */ + homepage?: string + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ + license_template?: string + /** @description The name of the repository. */ + name: string + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: 'public' | 'private' | 'internal' + } + } + } + } + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-alerts-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" + * for a complete list of secret types (API slug). + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-secret-scanning-alert'][] + } + } + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + 'billing/get-github-actions-billing-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-billing-usage'] + } + } + } + } + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. + * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + */ + 'billing/get-github-advanced-security-billing-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Success */ + 200: { + content: { + 'application/json': components['schemas']['advanced-security-active-committers'] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + } + } + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + 'billing/get-github-packages-billing-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['packages-billing-usage'] + } + } + } + } + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + 'billing/get-shared-storage-billing-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-billing-usage'] + } + } + } + } + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + 'teams/list-idp-groups-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page token */ + page?: string + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['group-mapping'] + } + } + } + } + /** Lists all teams in an organization that are visible to the authenticated user. */ + 'teams/list': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team'][] + } + } + 403: components['responses']['forbidden'] + } + } + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + 'teams/create': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The description of the team. */ + description?: string + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[] + /** @description The name of the team. */ + name: string + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' + /** + * @description The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` + * @enum {string} + */ + privacy?: 'secret' | 'closed' + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[] + } + } + } + } + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + 'teams/get-by-name': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + 'teams/delete-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + 'teams/update-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The description of the team. */ + description?: string + /** @description The name of the team. */ + name?: string + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: 'secret' | 'closed' + } + } + } + } + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + 'teams/list-discussions-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Pinned discussions only filter */ + pinned?: string + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-discussion'][] + } + } + } + } + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + 'teams/create-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion post's body text. */ + body: string + /** + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false + */ + private?: boolean + /** @description The discussion post's title. */ + title: string + } + } + } + } + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + 'teams/get-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + } + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + 'teams/delete-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + 'teams/update-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion post's body text. */ + body?: string + /** @description The discussion post's title. */ + title?: string + } + } + } + } + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + 'teams/list-discussion-comments-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-discussion-comment'][] + } + } + } + } + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + 'teams/create-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } + } + } + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + 'teams/get-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + } + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + 'teams/delete-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + 'teams/update-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } + } + } + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + 'reactions/list-for-team-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + } + } + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + 'reactions/create-for-team-discussion-comment-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/delete-for-team-discussion-comment': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + 'reactions/list-for-team-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + } + } + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + 'reactions/create-for-team-discussion-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/delete-for-team-discussion': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + discussion_number: components['parameters']['discussion-number'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + 'teams/unlink-external-idp-group-from-team-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/link-external-idp-group-to-team-for-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description External Group Id + * @example 1 + */ + group_id: number + } + } + } + } + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + 'teams/list-pending-invitations-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-invitation'][] + } + } + } + } + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/list-members-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: 'member' | 'maintainer' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + 'teams/get-membership-for-user-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** if user has no team membership */ + 404: unknown + } + } + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + 'teams/add-or-update-membership-for-user-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown + } + requestBody: { + content: { + 'application/json': { + /** + * @description The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' + } + } + } + } + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + 'teams/remove-membership-for-user-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + /** Forbidden if team synchronization is set up */ + 403: unknown + } + } + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + 'teams/list-projects-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-project'][] + } + } + } + } + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + 'teams/check-permissions-for-project-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown + } + } + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + 'teams/add-or-update-project-permissions-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' + } | null + } + } + } + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + 'teams/remove-project-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + 'teams/list-repos-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + } + } + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + 'teams/check-permissions-for-repo-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + 'application/json': components['schemas']['team-repository'] + } + } + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never + /** Not Found if team does not have permission for the repository */ + 404: unknown + } + } + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + 'teams/add-or-update-repo-permissions-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. + * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. + * \* custom repository role name - A custom repository role if the owning organization has defined any. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + } + } + } + } + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + 'teams/remove-repo-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + 'teams/list-idp-groups-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['group-mapping'] + } + } + } + } + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + 'teams/create-or-update-idp-group-connections-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['group-mapping'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups?: { + /** @description Description of the IdP group. */ + group_description: string + /** @description ID of the IdP group. */ + group_id: string + /** @description Name of the IdP group. */ + group_name: string + }[] + } + } + } + } + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + 'teams/list-child-in-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** team_slug parameter */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team'][] + } + } + } + } + /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/get': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + 'projects/delete': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Delete Success */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + /** Forbidden */ + 403: { + content: { + 'application/json': { + documentation_url?: string + errors?: string[] + message?: string + } + } + } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/update': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + /** Forbidden */ + 403: { + content: { + 'application/json': { + documentation_url?: string + errors?: string[] + message?: string + } + } + } + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string + } + } + } + } + /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ + 'projects/list-collaborators': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + query: { + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: 'outside' | 'direct' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + 'projects/add-collaborator': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' + } | null + } + } + } + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + 'projects/remove-collaborator': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ + 'projects/get-permission-for-user': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project-collaborator-permission'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'projects/list-columns': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['project-column'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'projects/create-column': { + parameters: { + path: { + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project-column'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string + } + } + } + } + 'projects/get-column': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project-column'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'projects/delete-column': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'projects/update-column': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project-column'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string + } + } + } + } + 'projects/list-cards': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + query: { + /** Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. */ + archived_state?: 'all' | 'archived' | 'not_archived' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['project-card'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'projects/create-card': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project-card'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + /** Validation failed */ + 422: { + content: { + 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } + /** Response */ + 503: { + content: { + 'application/json': { + code?: string + documentation_url?: string + errors?: { + code?: string + message?: string + }[] + message?: string + } + } + } + } + requestBody: { + content: { + 'application/json': + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string + } + } + } + } + 'projects/move-column': { + parameters: { + path: { + /** column_id parameter */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string + } + } + } + } + 'projects/get-card': { + parameters: { + path: { + /** card_id parameter */ + card_id: components['parameters']['card-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project-card'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'projects/delete-card': { + parameters: { + path: { + /** card_id parameter */ + card_id: components['parameters']['card-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + /** Forbidden */ + 403: { + content: { + 'application/json': { + documentation_url?: string + errors?: string[] + message?: string + } + } + } + 404: components['responses']['not_found'] + } + } + 'projects/update-card': { + parameters: { + path: { + /** card_id parameter */ + card_id: components['parameters']['card-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['project-card'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null + } + } + } + } + 'projects/move-card': { + parameters: { + path: { + /** card_id parameter */ + card_id: components['parameters']['card-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + /** Forbidden */ + 403: { + content: { + 'application/json': { + documentation_url?: string + errors?: { + code?: string + field?: string + message?: string + resource?: string + }[] + message?: string + } + } + } + 422: components['responses']['validation_failed'] + /** Response */ + 503: { + content: { + 'application/json': { + code?: string + documentation_url?: string + errors?: { + code?: string + message?: string + }[] + message?: string + } + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string + } + } + } + } + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + 'rate-limit/get': { + parameters: {} + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['rate-limit-overview'] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). + * + * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). + */ + 'reactions/delete-legacy': { + parameters: { + path: { + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + } + } + /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ + 'repos/get': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['full-repository'] + } + } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + 'repos/delete': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 307: components['responses']['temporary_redirect'] + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + 404: components['responses']['not_found'] + } + } + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + 'repos/update': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['full-repository'] + } + } + 307: components['responses']['temporary_redirect'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean + /** @description Updates the default branch for this repository. */ + default_branch?: string + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean + /** @description A short description of the repository. */ + description?: string + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean + /** @description A URL with more information about the repository. */ + homepage?: string + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean + /** @description The name of the repository. */ + name?: string + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean + /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } + } | null + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: 'public' | 'private' | 'internal' + } + } + } + } + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/list-artifacts-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + artifacts: components['schemas']['artifact'][] + total_count: number + } + } + } + } + } + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/get-artifact': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** artifact_id parameter */ + artifact_id: components['parameters']['artifact-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['artifact'] + } + } + } + } + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + 'actions/delete-artifact': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** artifact_id parameter */ + artifact_id: components['parameters']['artifact-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/download-artifact': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** artifact_id parameter */ + artifact_id: components['parameters']['artifact-id'] + archive_format: string + } + } + responses: { + /** Response */ + 302: never + } + } + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/get-job-for-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** job_id parameter */ + job_id: components['parameters']['job-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['job'] + } + } + } + } + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + 'actions/download-job-logs-for-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** job_id parameter */ + job_id: components['parameters']['job-id'] + } + } + responses: { + /** Response */ + 302: never + } + } + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + 'actions/get-github-actions-permissions-repository': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-repository-permissions'] + } + } + } + } + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. + * + * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + 'actions/set-github-actions-permissions-repository': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + allowed_actions?: components['schemas']['allowed-actions'] + enabled: components['schemas']['actions-enabled'] + } + } + } + } + /** + * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + 'actions/get-allowed-actions-repository': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + } + /** + * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. + * + * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. + */ + 'actions/set-allowed-actions-repository': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } + } + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + 'actions/list-self-hosted-runners-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + runners: components['schemas']['runner'][] + total_count: number + } + } + } + } + } + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/get-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } + } + } + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + 'actions/delete-self-hosted-runner-from-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + } + } + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } + } + } + } + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + } + } + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + 'actions/list-runner-applications-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-application'][] + } + } + } + } + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + 'actions/create-registration-token-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + 'actions/create-remove-token-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } + } + } + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/list-workflow-runs-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components['parameters']['actor'] + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components['parameters']['workflow-run-branch'] + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components['parameters']['event'] + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components['parameters']['workflow-run-status'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components['parameters']['created'] + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components['parameters']['workflow-run-check-suite-id'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + workflow_runs: components['schemas']['workflow-run'][] + } + } + } + } + } + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/get-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['workflow-run'] + } + } + } + } + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + 'actions/delete-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/get-reviews-for-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['environment-approvals'][] + } + } + } + } + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + 'actions/approve-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/list-workflow-run-artifacts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + artifacts: components['schemas']['artifact'][] + total_count: number + } + } + } + } + } + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + 'actions/get-workflow-run-attempt': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] + } + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['workflow-run'] + } + } + } + } + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + 'actions/list-jobs-for-workflow-run-attempt': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + jobs: components['schemas']['job'][] + total_count: number + } + } + } + 404: components['responses']['not_found'] + } + } + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/download-workflow-run-attempt-logs': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] + } + } + responses: { + /** Response */ + 302: never + } + } + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + 'actions/cancel-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': { [key: string]: unknown } + } + } + } + } + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + 'actions/list-jobs-for-workflow-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + query: { + /** + * Filters jobs by their `completed_at` timestamp. Can be one of: + * \* `latest`: Returns jobs from the most recent execution of the workflow run. + * \* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run. + */ + filter?: 'latest' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + jobs: components['schemas']['job'][] + total_count: number + } + } + } + } + } + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + 'actions/download-workflow-run-logs': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 302: never + } + } + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + 'actions/delete-workflow-run-logs': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 500: components['responses']['internal_error'] + } + } + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-pending-deployments-for-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pending-deployment'][] + } + } + } + } + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Anyone with read access to the repository contents and deployments can use this endpoint. + */ + 'actions/review-pending-deployments-for-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['deployment'][] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[] + /** + * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` + * @example approved + * @enum {string} + */ + state: 'approved' | 'rejected' + } + } + } + } + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + 'actions/re-run-workflow': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + } + } + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-workflow-run-usage': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The id of the workflow run. */ + run_id: components['parameters']['run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['workflow-run-usage'] + } + } + } + } + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/list-repo-secrets': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['actions-secret'][] + total_count: number + } + } + } + } + } + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/get-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } + } + } + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'actions/create-or-update-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + } + } + } + } + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/delete-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/get-repo-public-key': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-public-key'] + } + } + } + } + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/list-repo-workflows': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + workflows: components['schemas']['workflow'][] + } + } + } + } + } + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'actions/get-workflow': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['workflow'] + } + } + } + } + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + 'actions/disable-workflow': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + */ + 'actions/create-workflow-dispatch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string } + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string + } + } + } + } + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + 'actions/enable-workflow': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + 'actions/list-workflow-runs': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components['parameters']['actor'] + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components['parameters']['workflow-run-branch'] + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components['parameters']['event'] + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components['parameters']['workflow-run-status'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components['parameters']['created'] + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components['parameters']['workflow-run-check-suite-id'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + workflow_runs: components['schemas']['workflow-run'][] + } + } + } + } + } + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-workflow-usage': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['workflow-usage'] + } + } + } + } + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + 'issues/list-assignees': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + 'issues/check-user-can-be-assigned': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + assignee: string + } + } + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + 'repos/list-autolinks': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['autolink'][] + } + } + } + } + /** Users with admin access to the repository can create an autolink. */ + 'repos/create-autolink': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['autolink'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string + /** @description The URL must contain for the reference number. */ + url_template: string + } + } + } + } + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + 'repos/get-autolink': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** autolink_id parameter */ + autolink_id: components['parameters']['autolink-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['autolink'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + 'repos/delete-autolink': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** autolink_id parameter */ + autolink_id: components['parameters']['autolink-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + 'repos/enable-automated-security-fixes': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + 'repos/disable-automated-security-fixes': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'repos/list-branches': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['short-branch'][] + } + } + 404: components['responses']['not_found'] + } + } + 'repos/get-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['branch-with-protection'] + } + } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['branch-protection'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + 'repos/update-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null + /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ + enforce_admins: boolean | null + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + bypass_pull_request_allowances?: { + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[] + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[] + } | null + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean + /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of team `slug`s with dismissal access */ + teams?: string[] + /** @description The list of user `login`s with dismissal access */ + users?: string[] + } + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number + } | null + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number + /** @description The name of the required check */ + context: string + }[] + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[] + /** @description Require branches to be up to date before merging. */ + strict: boolean + } | null + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of app `slug`s with push access */ + apps?: string[] + /** @description The list of team `slug`s with push access */ + teams: string[] + /** @description The list of user `login`s with push access */ + users: string[] + } | null + } + } + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/delete-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-admin-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-admin-enforced'] + } + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + 'repos/set-admin-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-admin-enforced'] + } + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + 'repos/delete-admin-branch-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-pull-request-review-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-pull-request-review'] + } + } + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/delete-pull-request-review-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + 'repos/update-pull-request-review-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-pull-request-review'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + bypass_pull_request_allowances?: { + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[] + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[] + } | null + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean + /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of team `slug`s with dismissal access */ + teams?: string[] + /** @description The list of user `login`s with dismissal access */ + users?: string[] + } + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number + } + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + 'repos/get-commit-signature-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-admin-enforced'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + 'repos/create-commit-signature-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['protected-branch-admin-enforced'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + 'repos/delete-commit-signature-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-status-checks-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['status-check-policy'] + } + } + 404: components['responses']['not_found'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/remove-status-check-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + 'repos/update-status-check-protection': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['status-check-policy'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number + /** @description The name of the required check */ + context: string + }[] + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[] + /** @description Require branches to be up to date before merging. */ + strict?: boolean + } + } + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-all-status-check-contexts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': string[] + } + } + 404: components['responses']['not_found'] + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/set-status-check-contexts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': string[] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description contexts parameter */ + contexts: string[] + } + | string[] + } + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/add-status-check-contexts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': string[] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description contexts parameter */ + contexts: string[] + } + | string[] + } + } + } + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/remove-status-check-contexts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': string[] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description contexts parameter */ + contexts: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + 'repos/get-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['branch-restriction-policy'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + 'repos/delete-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + 'repos/get-apps-with-access-to-protected-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/set-app-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description apps parameter */ + apps: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/add-app-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description apps parameter */ + apps: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/remove-app-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['integration'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description apps parameter */ + apps: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + 'repos/get-teams-with-access-to-protected-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/set-team-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description teams parameter */ + teams: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/add-team-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description teams parameter */ + teams: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/remove-team-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description teams parameter */ + teams: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + 'repos/get-users-with-access-to-protected-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/set-user-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description users parameter */ + users: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/add-user-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description users parameter */ + users: string[] + } + | string[] + } + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/remove-user-access-restrictions': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description users parameter */ + users: string[] + } + | string[] + } + } + } + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + 'repos/rename-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['branch-with-protection'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new name of the branch. */ + new_name: string + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + 'checks/create': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['check-run'] + } + } + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @enum {undefined} */ + status: 'completed' + } & { + conclusion: unknown + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: 'queued' | 'in_progress' + } & { [key: string]: unknown }) + ) & { + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string + }[] + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string + /** @description A reference for the run on the integrator's system. */ + external_id?: string + /** @description The SHA of the commit. */ + head_sha: string + /** @description The name of the check. For example, "code-coverage". */ + name: string + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */ + output?: { + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: { + /** + * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @enum {string} + */ + annotation_level: 'notice' | 'warning' | 'failure' + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number + /** @description The end line of the annotation. */ + end_line: number + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number + /** @description The start line of the annotation. */ + start_line: number + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string + }[] + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string + /** @description A short image description. */ + caption?: string + /** @description The full URL of the image. */ + image_url: string + }[] + /** @description The summary of the check run. This parameter supports Markdown. */ + summary: string + /** @description The details of the check run. This parameter supports Markdown. */ + text?: string + /** @description The title of the check run. */ + title: string + } + /** + * Format: date-time + * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string + /** + * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @default queued + * @enum {string} + */ + status?: 'queued' | 'in_progress' | 'completed' + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + 'checks/get': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_run_id parameter */ + check_run_id: components['parameters']['check-run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['check-run'] + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + 'checks/update': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_run_id parameter */ + check_run_id: components['parameters']['check-run-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['check-run'] + } + } + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @enum {undefined} */ + status?: 'completed' + } & { + conclusion: unknown + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: 'queued' | 'in_progress' + } & { [key: string]: unknown }) + ) & { + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string + }[] + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string + /** @description A reference for the run on the integrator's system. */ + external_id?: string + /** @description The name of the check. For example, "code-coverage". */ + name?: string + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: { + /** + * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @enum {string} + */ + annotation_level: 'notice' | 'warning' | 'failure' + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number + /** @description The end line of the annotation. */ + end_line: number + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number + /** @description The start line of the annotation. */ + start_line: number + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string + }[] + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string + /** @description A short image description. */ + caption?: string + /** @description The full URL of the image. */ + image_url: string + }[] + /** @description Can contain Markdown. */ + summary: string + /** @description Can contain Markdown. */ + text?: string + /** @description **Required**. */ + title?: string + } + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string + /** + * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status?: 'queued' | 'in_progress' | 'completed' + } + } + } + } + /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ + 'checks/list-annotations': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_run_id parameter */ + check_run_id: components['parameters']['check-run-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['check-annotation'][] + } + } + } + } + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + 'checks/rerequest-run': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_run_id parameter */ + check_run_id: components['parameters']['check-run-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + 404: components['responses']['not_found'] + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + 'checks/create-suite': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** when the suite already existed */ + 200: { + content: { + 'application/json': components['schemas']['check-suite'] + } + } + /** Response when the suite was created */ + 201: { + content: { + 'application/json': components['schemas']['check-suite'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The sha of the head commit. */ + head_sha: string + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + 'checks/get-suite': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_suite_id parameter */ + check_suite_id: components['parameters']['check-suite-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['check-suite'] + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + 'checks/list-for-suite': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_suite_id parameter */ + check_suite_id: components['parameters']['check-suite-id'] + } + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ + filter?: 'latest' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + check_runs: components['schemas']['check-run'][] + total_count: number + } + } + } + } + } + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + 'checks/rerequest-suite': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** check_suite_id parameter */ + check_suite_id: components['parameters']['check-suite-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + } + } + /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + 'checks/set-suites-preferences': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['check-suite-preference'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean + }[] + } + } + } + } + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + 'code-scanning/list-alerts-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components['parameters']['tool-name'] + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components['parameters']['tool-guid'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components['parameters']['git-ref'] + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Can be one of `created`, `updated`, `number`. */ + sort?: 'created' | 'updated' | 'number' + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components['schemas']['code-scanning-alert-state'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-alert-items'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + 'code-scanning/get-alert': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-alert'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + 'code-scanning/update-alert': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-alert'] + } + } + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] + state: components['schemas']['code-scanning-alert-set-state'] + } + } + } + } + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alert-instances': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components['parameters']['git-ref'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-alert-instance'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + 'code-scanning/list-recent-analyses': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components['parameters']['tool-name'] + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components['parameters']['tool-guid'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components['schemas']['code-scanning-ref'] + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-analysis'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + 'code-scanning/get-analysis': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json+sarif': string + 'application/json': components['schemas']['code-scanning-analysis'] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + 'code-scanning/delete-analysis': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number + } + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-analysis-deletion'] + } + } + 400: components['responses']['bad_request'] + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + 'code-scanning/upload-sarif': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': components['schemas']['code-scanning-sarifs-receipt'] + } + } + /** Bad Request if the sarif field is invalid */ + 400: unknown + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + 413: unknown + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + ref: components['schemas']['code-scanning-ref'] + sarif: components['schemas']['code-scanning-analysis-sarif-file'] + /** + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string + } + } + } + } + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + 'code-scanning/get-sarif': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The SARIF ID obtained after uploading. */ + sarif_id: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['code-scanning-sarifs-status'] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/list-in-repository-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + codespaces: components['schemas']['codespace'][] + total_count: number + } + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/create-with-repo-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number + /** @description Location for this codespace */ + location: string + /** @description Machine type to use for this codespace */ + machine?: string + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string + /** @description Working directory for this codespace */ + working_directory?: string + } + } + } + } + /** + * List the machine types available for a given repository based on its configuration. + * + * Location is required. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/repo-machines-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Required. The location to check for available machines. */ + location: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + machines: components['schemas']['codespace-machine'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/list-collaborators': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: 'outside' | 'direct' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['collaborator'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/check-collaborator': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + username: components['parameters']['username'] + } + } + responses: { + /** Response if user is a collaborator */ + 204: never + /** Not Found if user is not a collaborator */ + 404: unknown + } + } + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + 'repos/add-collaborator': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + username: components['parameters']['username'] + } + } + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + 'application/json': components['schemas']['repository-invitation'] + } + } + /** Response when person is already a collaborator */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. + * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. + * \* custom repository role name - A custom repository role, if the owning organization has defined any. + * @default push + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + /** @example "push" */ + permissions?: string + } + } + } + } + 'repos/remove-collaborator': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + 'repos/get-collaborator-permission-level': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + username: components['parameters']['username'] + } + } + responses: { + /** if user has admin permissions */ + 200: { + content: { + 'application/json': components['schemas']['repository-collaborator-permission'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + 'repos/list-commit-comments-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['commit-comment'][] + } + } + } + } + 'repos/get-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['commit-comment'] + } + } + 404: components['responses']['not_found'] + } + } + 'repos/delete-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + 'repos/update-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['commit-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment */ + body: string + } + } + } + } + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + 'reactions/list-for-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + 404: components['responses']['not_found'] + } + } + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + 'reactions/create-for-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 415: components['responses']['preview_header_missing'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + 'reactions/delete-for-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'repos/list-commits': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + sha?: string + /** Only commits containing this file path will be returned. */ + path?: string + /** GitHub login or email address by which to filter by commit author. */ + author?: string + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + until?: string + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['commit'][] + } + } + 400: components['responses']['bad_request'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] + } + } + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + 'repos/list-branches-for-head-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** commit_sha parameter */ + commit_sha: components['parameters']['commit-sha'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['branch-short'][] + } + } + 422: components['responses']['validation_failed'] + } + } + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + 'repos/list-comments-for-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** commit_sha parameter */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['commit-comment'][] + } + } + } + } + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-commit-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** commit_sha parameter */ + commit_sha: components['parameters']['commit-sha'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['commit-comment'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment. */ + body: string + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number + /** @description Relative path of the file to comment on. */ + path?: string + /** @description Line index in the diff to comment on. */ + position?: number + } + } + } + } + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + 'repos/list-pull-requests-associated-with-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** commit_sha parameter */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-simple'][] + } + } + } + } + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'repos/get-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['commit'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + 'checks/list-for-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ + filter?: 'latest' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + app_id?: number + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + check_runs: components['schemas']['check-run'][] + total_count: number + } + } + } + } + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + 'checks/list-suites-for-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + check_suites: components['schemas']['check-suite'][] + total_count: number + } + } + } + } + } + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + 'repos/get-combined-status-for-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-commit-status'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + 'repos/list-commit-statuses-for-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['status'][] + } + } + 301: components['responses']['moved_permanently'] + } + } + /** + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + 'repos/get-community-profile-metrics': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['community-profile'] + } + } + } + } + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'repos/compare-commits': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['commit-comparison'] + } + } + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Note**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * #### If the content is a directory + * The response will be an array of objects, one object for each item in the directory. + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value + * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). + * In the next major version of the API, the type will be returned as "submodule". + * + * #### If the content is a symlink + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the + * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object + * describing the symlink itself. + * + * #### If the content is a submodule + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific + * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out + * the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the + * github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + 'repos/get-content': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** path parameter */ + path: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/vnd.github.v3.object': components['schemas']['content-tree'] + 'application/json': + | components['schemas']['content-directory'] + | components['schemas']['content-file'] + | components['schemas']['content-symlink'] + | components['schemas']['content-submodule'] + } + } + 302: components['responses']['found'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Creates a new file or replaces an existing file in a repository. */ + 'repos/create-or-update-file-contents': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** path parameter */ + path: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['file-commit'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['file-commit'] + } + } + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + } + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + } + /** @description The new file content, using Base64 encoding. */ + content: string + /** @description The commit message. */ + message: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string + } + } + } + } + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + 'repos/delete-file': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** path parameter */ + path: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['file-commit'] + } + } + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description object containing information about the author. */ + author?: { + /** @description The email of the author (or committer) of the commit */ + email?: string + /** @description The name of the author (or committer) of the commit */ + name?: string + } + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description object containing information about the committer. */ + committer?: { + /** @description The email of the author (or committer) of the commit */ + email?: string + /** @description The name of the author (or committer) of the commit */ + name?: string + } + /** @description The commit message. */ + message: string + /** @description The blob SHA of the file being replaced. */ + sha: string + } + } + } + } + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + 'repos/list-contributors': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if repository contains content */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['contributor'][] + } + } + /** Response if repository is empty */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/list-repo-secrets': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['dependabot-secret'][] + total_count: number + } + } + } + } + } + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-secret'] + } + } + } + } + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'dependabot/create-or-update-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + } + } + } + } + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/delete-repo-secret': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-public-key': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-public-key'] + } + } + } + } + /** Simple filtering of deployments is available via query parameters: */ + 'repos/list-deployments': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The SHA recorded at creation time. */ + sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['deployment'][] + } + } + } + } + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. + * + * #### Merged branch response + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * #### Merge conflict response + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * #### Failed commit status checks + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + 'repos/create-deployment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['deployment'] + } + } + /** Merged branch response */ + 202: { + content: { + 'application/json': { + message?: string + } + } + } + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string + payload?: { [key: string]: unknown } | string + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string + /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ + required_contexts?: string[] + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean + } + } + } + } + 'repos/get-deployment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['deployment'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + 'repos/delete-deployment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Users with pull access can view deployment statuses for a deployment: */ + 'repos/list-deployment-statuses': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['deployment-status'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + 'repos/create-deployment-status': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['deployment-status'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string + /** + * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string + } + } + } + } + /** Users with pull access can view a deployment status for a deployment: */ + 'repos/get-deployment-status': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + status_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['deployment-status'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + 'repos/create-dispatch-event': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ + client_payload?: { [key: string]: unknown } + /** @description A custom webhook event name. */ + event_type: string + } + } + } + } + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'repos/get-all-environments': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + environments?: components['schemas']['environment'][] + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number + } + } + } + } + } + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + 'repos/get-environment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['environment'] + } + } + } + } + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + 'repos/create-or-update-environment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['environment'] + } + } + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + requestBody: { + content: { + 'application/json': { + deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number + type?: components['schemas']['deployment-reviewer-type'] + }[] + | null + wait_timer?: components['schemas']['wait-timer'] + } | null + } + } + } + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + 'repos/delete-an-environment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + } + } + responses: { + /** Default response */ + 204: never + } + } + 'activity/list-repo-events': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + 'repos/list-forks': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ + sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 400: components['responses']['bad_request'] + } + } + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + 'repos/create-fork': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': components['schemas']['full-repository'] + } + } + 400: components['responses']['bad_request'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string + } | null + } + } + } + 'git/create-blob': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['short-blob'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new blob's content. */ + content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string + } + } + } + } + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + 'git/get-blob': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + file_sha: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['blob'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'git/create-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-commit'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ + author?: { + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + /** @description The email of the author (or committer) of the commit */ + email: string + /** @description The name of the author (or committer) of the commit */ + name: string + } + /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ + committer?: { + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + /** @description The name of the author (or committer) of the commit */ + name?: string + } + /** @description The commit message */ + message: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[] + /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ + signature?: string + /** @description The SHA of the tree object this commit points to */ + tree: string + } + } + } + } + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'git/get-commit': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** commit_sha parameter */ + commit_sha: components['parameters']['commit-sha'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['git-commit'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + 'git/list-matching-refs': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['git-ref'][] + } + } + } + } + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + 'git/get-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['git-ref'] + } + } + 404: components['responses']['not_found'] + } + } + /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ + 'git/create-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-ref'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @example "refs/heads/newbranch" */ + key?: string + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string + /** @description The SHA1 value for this reference. */ + sha: string + } + } + } + } + 'git/delete-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + } + 'git/update-ref': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['git-ref'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean + /** @description The SHA1 value to set this reference to */ + sha: string + } + } + } + } + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'git/create-tag': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-tag'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The tag message. */ + message: string + /** @description The SHA of the git object this is tagging. */ + object: string + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + /** @description The email of the author of the tag */ + email: string + /** @description The name of the author of the tag */ + name: string + } + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: 'commit' | 'tree' | 'blob' + } + } + } + } + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'git/get-tag': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + tag_sha: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['git-tag'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + 'git/create-tree': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-tree'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** @description The file referenced in the tree. */ + path?: string + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: 'blob' | 'tree' | 'commit' + }[] + } + } + } + } + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + 'git/get-tree': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + tree_sha: string + } + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['git-tree'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'repos/list-webhooks': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['hook'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + 'repos/create-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['hook'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + content_type?: components['schemas']['webhook-config-content-type'] + /** @example "sha256" */ + digest?: string + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + /** @example "abc" */ + token?: string + url?: components['schemas']['webhook-config-url'] + } + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string + } | null + } + } + } + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + 'repos/get-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook'] + } + } + 404: components['responses']['not_found'] + } + } + 'repos/delete-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + 'repos/update-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[] + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + /** @example "bar@example.com" */ + address?: string + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + /** @example "The Serious Room" */ + room?: string + secret?: components['schemas']['webhook-config-secret'] + url: components['schemas']['webhook-config-url'] + } + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[] + } + } + } + } + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + 'repos/get-webhook-config-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + } + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + 'repos/update-webhook-config-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } + } + } + requestBody: { + content: { + 'application/json': { + content_type?: components['schemas']['webhook-config-content-type'] + insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] + secret?: components['schemas']['webhook-config-secret'] + url?: components['schemas']['webhook-config-url'] + } + } + } + } + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + 'repos/list-webhook-deliveries': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery-item'][] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Returns a delivery for a webhook configured in a repository. */ + 'repos/get-webhook-delivery': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery'] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + 'repos/redeliver-webhook-delivery': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + 'repos/ping-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + 'repos/test-push-webhook': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + 'migrations/get-import-status': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['import'] + } + } + 404: components['responses']['not_found'] + } + } + /** Start a source import to a GitHub repository using GitHub Importer. */ + 'migrations/start-import': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['import'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string + /** + * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + * @enum {string} + */ + vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string + /** @description The URL of the originating repository. */ + vcs_url: string + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string + } + } + } + } + /** Stop an import for a repository. */ + 'migrations/cancel-import': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API + * request. If no parameters are provided, the import will be restarted. + */ + 'migrations/update-import': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['import'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @example "project1" */ + tfvc_project?: string + /** @example "git" */ + vcs?: string + /** @description The password to provide to the originating repository. */ + vcs_password?: string + /** @description The username to provide to the originating repository. */ + vcs_username?: string + } | null + } + } + } + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + 'migrations/get-commit-authors': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components['parameters']['since-user'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['porter-author'][] + } + } + 404: components['responses']['not_found'] + } + } + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + 'migrations/map-commit-author': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + author_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['porter-author'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new Git author email. */ + email?: string + /** @description The new Git author name. */ + name?: string + } + } + } + } + /** List files larger than 100MB found during the import */ + 'migrations/get-large-files': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['porter-large-file'][] + } + } + } + } + /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ + 'migrations/set-lfs-preference': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['import'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + * @enum {string} + */ + use_lfs: 'opt_in' | 'opt_out' + } + } + } + } + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-repo-installation': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['installation'] + } + } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + } + } + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + 'interactions/get-restrictions-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } + } + } + } + } + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + 'interactions/set-restrictions-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] + } + } + /** Response */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['interaction-limit'] + } + } + } + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + 'interactions/remove-restrictions-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + /** Response */ + 409: unknown + } + } + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + 'repos/list-invitations': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['repository-invitation'][] + } + } + } + } + 'repos/delete-invitation': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'repos/update-invitation': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository-invitation'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' + } + } + } + } + /** + * List issues in a repository. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ + milestone?: string + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ + assignee?: string + /** The user that created the issue. */ + creator?: string + /** A user that's mentioned in the issue. */ + mentioned?: string + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: 'created' | 'updated' | 'comments' + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'issues/create': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['issue'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] + /** @description The contents of the issue. */ + body?: string + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + color?: string | null + description?: string | null + id?: number + name?: string + } + )[] + milestone?: (string | number) | null + /** @description The title of the issue. */ + title: string | number + } + } + } + } + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/get': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue'] + } + } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** Issue owners and users with push access can edit an issue. */ + 'issues/update': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue'] + } + } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] + /** @description The contents of the issue. */ + body?: string | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + color?: string | null + description?: string | null + id?: number + name?: string + } + )[] + milestone?: (string | number) | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The title of the issue. */ + title?: (string | number) | null + } + } + } + } + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + 'issues/add-assignees': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['issue'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] + } + } + } + } + /** Removes one or more assignees from an issue. */ + 'issues/remove-assignees': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] + } + } + } + } + /** Issue Comments are ordered by ascending ID. */ + 'issues/list-comments': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-comment'][] + } + } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'issues/create-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['issue-comment'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment. */ + body: string + } + } + } + } + 'issues/list-events': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-event-for-issue'][] + } + } + 410: components['responses']['gone'] + } + } + 'issues/list-labels-on-issue': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['label'][] + } + } + 410: components['responses']['gone'] + } + } + /** Removes any previous labels and sets the new labels for an issue. */ + 'issues/set-labels': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['label'][] + } + } + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string + } + } + } + 'issues/add-labels': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['label'][] + } + } + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string + } + } + } + 'issues/remove-all-labels': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 410: components['responses']['gone'] + } + } + /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ + 'issues/remove-label': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + name: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['label'][] + } + } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'issues/lock': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' + } | null + } + } + } + /** Users with push access can unlock an issue's conversation. */ + 'issues/unlock': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + 'reactions/list-for-issue': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + 'reactions/create-for-issue': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + 'reactions/delete-for-issue': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'issues/list-events-for-timeline': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** issue_number parameter */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['timeline-issue-events'][] + } + } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + /** By default, Issue Comments are ordered by ascending ID. */ + 'issues/list-comments-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: 'asc' | 'desc' + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-comment'][] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'issues/get-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue-comment'] + } + } + 404: components['responses']['not_found'] + } + } + 'issues/delete-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'issues/update-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue-comment'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment. */ + body: string + } + } + } + } + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + 'reactions/list-for-issue-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + 404: components['responses']['not_found'] + } + } + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + 'reactions/create-for-issue-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + 'reactions/delete-for-issue-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'issues/list-events-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-event'][] + } + } + 422: components['responses']['validation_failed'] + } + } + 'issues/get-event': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + event_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['issue-event'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + } + } + 'repos/list-deploy-keys': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['deploy-key'][] + } + } + } + } + /** You can create a read-only deploy key. */ + 'repos/create-deploy-key': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['deploy-key'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the key. */ + key: string + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean + /** @description A name for the key. */ + title?: string + } + } + } + } + 'repos/get-deploy-key': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** key_id parameter */ + key_id: components['parameters']['key-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['deploy-key'] + } + } + 404: components['responses']['not_found'] + } + } + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + 'repos/delete-deploy-key': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** key_id parameter */ + key_id: components['parameters']['key-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'issues/list-labels-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['label'][] + } + } + 404: components['responses']['not_found'] + } + } + 'issues/create-label': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['label'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string + } + } + } + } + 'issues/get-label': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + name: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['label'] + } + } + 404: components['responses']['not_found'] + } + } + 'issues/delete-label': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + name: string + } + } + responses: { + /** Response */ + 204: never + } + } + 'issues/update-label': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + name: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['label'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string + } + } + } + } + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + 'repos/list-languages': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['language'] + } + } + } + } + 'repos/enable-lfs-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown + } + } + 'repos/disable-lfs-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + 'licenses/get-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license-content'] + } + } + } + } + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + 'repos/merge-upstream': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + 'application/json': components['schemas']['merged-upstream'] + } + } + /** The branch could not be synced because of a merge conflict */ + 409: unknown + /** The branch could not be synced for some other reason */ + 422: unknown + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string + } + } + } + } + 'repos/merge': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + 'application/json': components['schemas']['commit'] + } + } + /** Response when already merged */ + 204: never + 403: components['responses']['forbidden'] + /** Not Found when the base or head does not exist */ + 404: unknown + /** Conflict when there is a merge conflict */ + 409: unknown + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the base branch that the head will be merged into. */ + base: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string + } + } + } + } + 'issues/list-milestones': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The state of the milestone. Either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** What to sort results by. Either `due_on` or `completeness`. */ + sort?: 'due_on' | 'completeness' + /** The direction of the sort. Either `asc` or `desc`. */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['milestone'][] + } + } + 404: components['responses']['not_found'] + } + } + 'issues/create-milestone': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['milestone'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The title of the milestone. */ + title: string + } + } + } + } + 'issues/get-milestone': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** milestone_number parameter */ + milestone_number: components['parameters']['milestone-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['milestone'] + } + } + 404: components['responses']['not_found'] + } + } + 'issues/delete-milestone': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** milestone_number parameter */ + milestone_number: components['parameters']['milestone-number'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + 'issues/update-milestone': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** milestone_number parameter */ + milestone_number: components['parameters']['milestone-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['milestone'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The title of the milestone. */ + title?: string + } + } + } + } + 'issues/list-labels-for-milestone': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** milestone_number parameter */ + milestone_number: components['parameters']['milestone-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['label'][] + } + } + } + } + /** List all notifications for the current user. */ + 'activity/list-repo-notifications-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** If `true`, show notifications marked as read. */ + all?: components['parameters']['all'] + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components['parameters']['participating'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components['parameters']['before'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['thread'][] + } + } + } + } + /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-repo-notifications-as-read': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + url?: string + } + } + } + /** Reset Content */ + 205: unknown + } + requestBody: { + content: { + 'application/json': { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string + } + } + } + } + 'repos/get-pages': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['page'] + } + } + 404: components['responses']['not_found'] + } + } + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + 'repos/update-information-about-pages-site': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean + source?: + | ('gh-pages' | 'master' | 'master /docs') + | { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: '/' | '/docs' + } + } + } + } + } + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + 'repos/create-pages-site': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['page'] + } + } + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The source branch and directory used to publish your Pages site. */ + source: { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: '/' | '/docs' + } + } | null + } + } + } + 'repos/delete-pages-site': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'repos/list-pages-builds': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['page-build'][] + } + } + } + } + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + 'repos/request-pages-build': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['page-build-status'] + } + } + } + } + 'repos/get-pages-build': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + build_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['page-build'] + } + } + } + } + 'repos/get-latest-pages-build': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['page-build'] + } + } + } + } + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + 'repos/get-pages-health-check': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pages-health-check'] + } + } + /** Empty response */ + 202: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Custom domains are not available for GitHub Pages */ + 400: unknown + 404: components['responses']['not_found'] + /** There isn't a CNAME for this page */ + 422: unknown + } + } + /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/list-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['project'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + 'projects/create-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The description of the project. */ + body?: string + /** @description The name of the project. */ + name: string + } + } + } + } + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'pulls/list': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Either `open`, `closed`, or `all` to filter by state. */ + state?: 'open' | 'closed' | 'all' + /** Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ + head?: string + /** Filter pulls by base branch name. Example: `gh-pages`. */ + base?: string + /** What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */ + sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-simple'][] + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + } + } + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + 'pulls/create': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['pull-request'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string + /** @example 1 */ + issue?: number + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** @description The title of the new pull request. */ + title?: string + } + } + } + } + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + 'pulls/get': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + 'application/json': components['schemas']['pull-request'] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + 'pulls/update': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The title of the pull request. */ + title?: string + } + } + } + } + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/create-with-pr-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number + /** @description Location for this codespace */ + location: string + /** @description Machine type to use for this codespace */ + machine?: string + /** @description Working directory for this codespace */ + working_directory?: string + } + } + } + } + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: 'asc' | 'desc' + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-review-comment'][] + } + } + } + } + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id?: string + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number + /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line?: number + /** @description The relative path to the file that necessitates a comment. */ + path?: string + /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ + position?: number + /** + * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: 'LEFT' | 'RIGHT' | 'side' + } + } + } + } + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-reply-for-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + } + } + } + } + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + 'pulls/list-commits': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['commit'][] + } + } + } + } + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + 'pulls/list-files': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['diff-entry'][] + } + } + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + } + } + 'pulls/check-if-merged': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response if pull request has been merged */ + 204: never + /** Not Found if pull request has not been merged */ + 404: unknown + } + } + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/merge': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** if merge was successful */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-merge-result'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string + /** @description Title for the automatic commit message. */ + commit_title?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: 'merge' | 'squash' | 'rebase' + /** @description SHA that pull request head must match to allow merge. */ + sha?: string + } | null + } + } + } + 'pulls/list-requested-reviewers': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-review-request'] + } + } + } + } + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/request-reviewers': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pull-request-simple'] + } + } + 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[] + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[] + } + } + } + } + 'pulls/remove-requested-reviewers': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-simple'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[] + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[] + } + } + } + } + /** The list of reviews returns in chronological order. */ + 'pulls/list-reviews': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-review'][] + } + } + } + } + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + 'pulls/create-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description Text of the review comment. */ + body: string + /** @example 28 */ + line?: number + /** @description The relative path to the file that necessitates a review comment. */ + path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number + /** @example RIGHT */ + side?: string + /** @example 26 */ + start_line?: number + /** @example LEFT */ + start_side?: string + }[] + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + } + } + } + } + 'pulls/get-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + } + } + /** Update the review summary comment with new text. */ + 'pulls/update-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review. */ + body: string + } + } + } + } + 'pulls/delete-pending-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** List comments for a specific pull request review. */ + 'pulls/list-comments-for-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['review-comment'][] + } + } + 404: components['responses']['not_found'] + } + } + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + 'pulls/dismiss-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @example "APPROVE" */ + event?: string + /** @description The message for the pull request review dismissal */ + message: string + } + } + } + } + 'pulls/submit-review': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + /** review_id parameter */ + review_id: components['parameters']['review-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + } + } + } + } + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + 'pulls/update-branch': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + pull_number: components['parameters']['pull-number'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + url?: string + } + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string + } | null + } + } + } + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + sort?: 'created' | 'updated' | 'created_at' + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: 'asc' | 'desc' + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-review-comment'][] + } + } + } + } + /** Provides details for a review comment. */ + 'pulls/get-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 404: components['responses']['not_found'] + } + } + /** Deletes a review comment. */ + 'pulls/delete-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** Enables you to edit a review comment. */ + 'pulls/update-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the reply to the review comment. */ + body: string + } + } + } + } + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + 'reactions/list-for-pull-request-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + 404: components['responses']['not_found'] + } + } + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + 'reactions/create-for-pull-request-review-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + 'reactions/delete-for-pull-request-comment': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** comment_id parameter */ + comment_id: components['parameters']['comment-id'] + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['content-file'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme-in-directory': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + dir: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['content-file'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + 'repos/list-releases': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['release'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['release'] + } + } + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Text describing the contents of the tag. */ + body?: string + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean + /** @description The name of the release. */ + name?: string + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean + /** @description The name of the tag. */ + tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + } + } + } + } + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 'repos/get-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + } + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + 'application/json': components['schemas']['release'] + } + } + 404: components['responses']['not_found'] + } + } + /** Users with push access to the repository can delete a release. */ + 'repos/delete-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Users with push access to the repository can edit a release. */ + 'repos/update-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release'] + } + } + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Text describing the contents of the tag. */ + body?: string + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean + /** @description The name of the release. */ + name?: string + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean + /** @description The name of the tag. */ + tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + } + } + } + } + 'repos/list-release-assets': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['release-asset'][] + } + } + } + } + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + 'repos/upload-release-asset': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + query: { + name: string + label?: string + } + } + responses: { + /** Response for successful upload */ + 201: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown + } + requestBody: { + content: { + '*/*': string + } + } + } + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + 'reactions/create-for-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** release_id parameter */ + release_id: components['parameters']['release-id'] + } + } + responses: { + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + 'repos/get-release-asset': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** asset_id parameter */ + asset_id: components['parameters']['asset-id'] + } + } + responses: { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + 302: components['responses']['found'] + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + } + } + 'repos/delete-release-asset': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** asset_id parameter */ + asset_id: components['parameters']['asset-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Users with push access to the repository can edit a release asset. */ + 'repos/update-release-asset': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** asset_id parameter */ + asset_id: components['parameters']['asset-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string + /** @description The file name of the asset. */ + name?: string + /** @example "uploaded" */ + state?: string + } + } + } + } + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + 'repos/generate-release-notes': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + 'application/json': components['schemas']['release-notes-content'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string + } + } + } + } + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + 'repos/get-latest-release': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release'] + } + } + } + } + /** Get a published release with the specified tag. */ + 'repos/get-release-by-tag': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** tag parameter */ + tag: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-alerts-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" + * for a complete list of secret types (API slug). + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'][] + } + } + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/get-alert': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'] + } + } + 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + 'secret-scanning/update-alert': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'] + } + } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + /** State does not match the resolution */ + 422: unknown + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + resolution?: components['schemas']['secret-scanning-alert-resolution'] + state: components['schemas']['secret-scanning-alert-state'] + } + } + } + } + /** + * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-locations-for-alert': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['secret-scanning-location'][] + } + } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + 'activity/list-stargazers-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] + } + } + 422: components['responses']['validation_failed'] + } + } + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 'repos/get-code-frequency-stats': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + 'application/json': components['schemas']['code-frequency-stat'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] + } + } + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + 'repos/get-commit-activity-stats': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['commit-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] + } + } + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + 'repos/get-contributors-stats': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + 200: { + content: { + 'application/json': components['schemas']['contributor-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] + } + } + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + 'repos/get-participation-stats': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + 'application/json': components['schemas']['participation-stats'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + 'repos/get-punch-card-stats': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. */ + 200: { + content: { + 'application/json': components['schemas']['code-frequency-stat'][] + } + } + 204: components['responses']['no_content'] + } + } + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + 'repos/create-commit-status': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + sha: string + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['status'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string + /** @description A short description of the status. */ + description?: string + /** + * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + * @enum {string} + */ + state: 'error' | 'failure' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string + } + } + } + } + /** Lists the people watching the specified repository. */ + 'activity/list-watchers-for-repo': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + 'activity/get-repo-subscription': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + 404: unknown + } + } + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + 'activity/set-repo-subscription': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean + } + } + } + } + /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + 'activity/delete-repo-subscription': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'repos/list-tags': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['tag'][] + } + } + } + } + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + 'repos/download-tarball-archive': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + 'repos/list-teams': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team'][] + } + } + } + } + 'repos/get-all-topics': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + } + } + 'repos/replace-all-topics': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[] + } + } + } + } + /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + 'repos/get-clones': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Must be one of: `day`, `week`. */ + per?: components['parameters']['per'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['clone-traffic'] + } + } + 403: components['responses']['forbidden'] + } + } + /** Get the top 10 popular contents over the last 14 days. */ + 'repos/get-top-paths': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['content-traffic'][] + } + } + 403: components['responses']['forbidden'] + } + } + /** Get the top 10 referrers over the last 14 days. */ + 'repos/get-top-referrers': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['referrer-traffic'][] + } + } + 403: components['responses']['forbidden'] + } + } + /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + 'repos/get-views': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + query: { + /** Must be one of: `day`, `week`. */ + per?: components['parameters']['per'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['view-traffic'] + } + } + 403: components['responses']['forbidden'] + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + 'repos/transfer': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': components['schemas']['minimal-repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[] + } + } + } + } + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + 'repos/check-vulnerability-alerts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown + } + } + /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + 'repos/enable-vulnerability-alerts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + 'repos/disable-vulnerability-alerts': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + 'repos/download-zipball-archive': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + 'repos/create-using-template': { + parameters: { + path: { + template_owner: string + template_repo: string + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description A short description of the new repository. */ + description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean + /** @description The name of the new repository. */ + name: string + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean + } + } + } + } + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + 'repos/list-public': { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components['parameters']['since-repo'] + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + } + } + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/list-environment-secrets': { + parameters: { + path: { + repository_id: components['parameters']['repository-id'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['actions-secret'][] + total_count: number + } + } + } + } + } + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/get-environment-secret': { + parameters: { + path: { + repository_id: components['parameters']['repository-id'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } + } + } + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'actions/create-or-update-environment-secret': { + parameters: { + path: { + repository_id: components['parameters']['repository-id'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string + } + } + } + } + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/delete-environment-secret': { + parameters: { + path: { + repository_id: components['parameters']['repository-id'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Default response */ + 204: never + } + } + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + 'actions/get-environment-public-key': { + parameters: { + path: { + repository_id: components['parameters']['repository-id'] + /** The name of the environment */ + environment_name: components['parameters']['environment-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-public-key'] + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + 'enterprise-admin/list-provisioned-groups-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + /** attributes to exclude */ + excludedAttributes?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-group-list-enterprise'] + } + } + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + 'enterprise-admin/provision-and-invite-enterprise-group': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] + /** @description The SCIM schema URIs. */ + schemas: string[] + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + 'enterprise-admin/get-provisioning-information-for-enterprise-group': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + query: { + /** Attributes to exclude. */ + excludedAttributes?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + 'enterprise-admin/set-information-for-provisioned-enterprise-group': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] + /** @description The SCIM schema URIs. */ + schemas: string[] + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + 'enterprise-admin/delete-scim-group-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + 'enterprise-admin/update-attribute-for-enterprise-group': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: unknown + }[] + /** @description The SCIM schema URIs. */ + schemas: string[] + } + } + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + 'enterprise-admin/list-provisioned-identities-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-user-list-enterprise'] + } + } + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + 'enterprise-admin/provision-and-invite-enterprise-user': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['scim-enterprise-user'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description List of user emails. */ + emails: { + /** @description Whether this email address is the primary address. */ + primary: boolean + /** @description The type of email address. */ + type: string + /** @description The email address. */ + value: string + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] + name: { + /** @description The last name of the user. */ + familyName: string + /** @description The first name of the user. */ + givenName: string + } + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + 'enterprise-admin/get-provisioning-information-for-enterprise-user': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-user'] + } + } + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + 'enterprise-admin/set-information-for-provisioned-enterprise-user': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-user'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description List of user emails. */ + emails: { + /** @description Whether this email address is the primary address. */ + primary: boolean + /** @description The type of email address. */ + type: string + /** @description The email address. */ + value: string + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] + name: { + /** @description The last name of the user. */ + familyName: string + /** @description The first name of the user. */ + givenName: string + } + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + 'enterprise-admin/delete-user-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + 'enterprise-admin/update-attribute-for-enterprise-user': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-user'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: unknown }[] + /** @description The SCIM schema URIs. */ + schemas: string[] + } + } + } + } + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + 'scim/list-provisioned-identities': { + parameters: { + path: { + org: components['parameters']['org'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: number + /** Used for pagination: the number of results to return. */ + count?: number + /** + * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: + * + * `?filter=userName%20eq%20\"Octocat\"`. + * + * To filter results for the identity with the email `octocat@github.com`, you would use this query: + * + * `?filter=emails%20eq%20\"octocat@github.com\"`. + */ + filter?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/scim+json': components['schemas']['scim-user-list'] + } + } + 304: components['responses']['not_modified'] + 400: components['responses']['scim_bad_request'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + } + } + /** Provision organization membership for a user, and send an activation email to the email address. */ + 'scim/provision-and-invite-user': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/scim+json': components['schemas']['scim-user'] + } + } + 304: components['responses']['not_modified'] + 400: components['responses']['scim_bad_request'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + 409: components['responses']['scim_conflict'] + 500: components['responses']['scim_internal_error'] + } + requestBody: { + content: { + 'application/json': { + active?: boolean + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + primary?: boolean + type?: string + value: string + }[] + externalId?: string + groups?: string[] + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + familyName: string + formatted?: string + givenName: string + } + schemas?: string[] + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string + } + } + } + } + 'scim/get-provisioning-information-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/scim+json': components['schemas']['scim-user'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + } + } + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + 'scim/set-information-for-provisioned-user': { + parameters: { + path: { + org: components['parameters']['org'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/scim+json': components['schemas']['scim-user'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + } + requestBody: { + content: { + 'application/json': { + active?: boolean + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + primary?: boolean + type?: string + value: string + }[] + externalId?: string + groups?: string[] + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + familyName: string + formatted?: string + givenName: string + } + schemas?: string[] + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string + } + } + } + } + 'scim/delete-user-from-org': { + parameters: { + path: { + org: components['parameters']['org'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + } + } + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + 'scim/update-attribute-for-user': { + parameters: { + path: { + org: components['parameters']['org'] + /** scim_user_id parameter */ + scim_user_id: components['parameters']['scim-user-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/scim+json': components['schemas']['scim-user'] + } + } + 304: components['responses']['not_modified'] + 400: components['responses']['scim_bad_request'] + 403: components['responses']['scim_forbidden'] + 404: components['responses']['scim_not_found'] + /** Response */ + 429: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + Operations: { + /** @enum {string} */ + op: 'add' | 'remove' | 'replace' + path?: string + value?: + | { + active?: boolean | null + externalId?: string | null + familyName?: string | null + givenName?: string | null + userName?: string | null + } + | { + primary?: boolean + value?: string + }[] + | string + }[] + schemas?: string[] + } + } + } + } + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + 'search/code': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: 'indexed' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['code-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + 'search/commits': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: 'author-date' | 'committer-date' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['commit-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + } + } + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + 'search/issues-and-pull-requests': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: + | 'comments' + | 'reactions' + | 'reactions-+1' + | 'reactions--1' + | 'reactions-smile' + | 'reactions-thinking_face' + | 'reactions-heart' + | 'reactions-tada' + | 'interactions' + | 'created' + | 'updated' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['issue-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + 'search/labels': { + parameters: { + query: { + /** The id of the repository. */ + repository_id: number + /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: 'created' | 'updated' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['label-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + 'search/repos': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['repo-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + } + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + 'search/topics': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['topic-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + } + } + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + 'search/users': { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: 'followers' | 'repositories' | 'joined' + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components['parameters']['order'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + incomplete_results: boolean + items: components['schemas']['user-search-result-item'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + 'teams/get-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + 'teams/delete-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + 'teams/update-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The description of the team. */ + description?: string + /** @description The name of the team. */ + name: string + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: 'secret' | 'closed' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussions-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-discussion'][] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'teams/create-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion post's body text. */ + body: string + /** + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false + */ + private?: boolean + /** @description The discussion post's title. */ + title: string + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion post's body text. */ + body?: string + /** @description The discussion post's title. */ + title?: string + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussion-comments-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-discussion-comment'][] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'teams/create-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/list-for-team-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + 'reactions/create-for-team-discussion-comment-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + comment_number: components['parameters']['comment-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/list-for-team-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['reaction'][] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + 'reactions/create-for-team-discussion-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + 'teams/list-pending-invitations-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-invitation'][] + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + 'teams/list-members-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: 'member' | 'maintainer' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/get-member-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** if user is a member */ + 204: never + /** if user is not a member */ + 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'teams/add-member-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown + } + } + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-member-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + /** Not Found if team synchronization is setup */ + 404: unknown + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + 'teams/get-membership-for-user-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + 'teams/add-or-update-membership-for-user-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown + 404: components['responses']['not_found'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown + } + requestBody: { + content: { + 'application/json': { + /** + * @description The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-membership-for-user-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + /** if team synchronization is set up */ + 403: unknown + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + 'teams/list-projects-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-project'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + 'teams/check-permissions-for-project-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + 'teams/add-or-update-project-permissions-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + 'application/json': { + documentation_url?: string + message?: string + } + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + 'teams/remove-project-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + 422: components['responses']['validation_failed'] + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + 'teams/list-repos-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + 'teams/check-permissions-for-repo-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + 'application/json': components['schemas']['team-repository'] + } + } + /** Response if repository is managed by this team */ + 204: never + /** Not Found if repository is not managed by this team */ + 404: unknown + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'teams/add-or-update-repo-permissions-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + } + } + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + 'teams/remove-repo-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + 'teams/list-idp-groups-for-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['group-mapping'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + 'teams/create-or-update-idp-group-connections-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['group-mapping'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups: { + /** @example "moar cheese pleese" */ + description?: string + /** @description Description of the IdP group. */ + group_description: string + /** @description ID of the IdP group. */ + group_id: string + /** @description Name of the IdP group. */ + group_name: string + /** @example "caceab43fc9ffa20081c" */ + id?: string + /** @example "external-team-6c13e7288ef7" */ + name?: string + }[] + /** @example "I am not a timestamp" */ + synced_at?: string + } + } + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + 'teams/list-child-legacy': { + parameters: { + path: { + team_id: components['parameters']['team-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team'][] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + 'users/get-authenticated': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ + 'users/update-authenticated': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['private-user'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new short biography of the user. */ + bio?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string + /** @description The new hiring availability of the user. */ + hireable?: boolean + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null + } + } + } + } + /** List the users you've blocked on your personal account. */ + 'users/list-blocked-by-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 415: components['responses']['preview_header_missing'] + } + } + 'users/check-blocked': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** If the user is blocked: */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + /** If the user is not blocked: */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + 'users/block': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + 'users/unblock': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/list-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** ID of the Repository to filter on */ + repository_id?: components['parameters']['repository-id-in-query'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + codespaces: components['schemas']['codespace'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/create-for-authenticated-user': { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number + /** @description Location for this codespace */ + location: string + /** @description Machine type to use for this codespace */ + machine?: string + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string + /** @description Repository id for this codespace */ + repository_id: number + /** @description Working directory for this codespace */ + working_directory?: string + } + | { + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number + /** @description Location for this codespace */ + location: string + /** @description Machine type to use for this codespace */ + machine?: string + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number + /** @description Repository id for this codespace */ + repository_id: number + } + /** @description Working directory for this codespace */ + working_directory?: string + } + } + } + } + /** + * Gets information about a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/get-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/delete-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + 202: components['responses']['accepted'] + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/update-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description A valid machine to transition this codespace to. */ + machine?: string + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[] + } + } + } + } + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/export-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 202: { + content: { + 'application/json': components['schemas']['codespace-export-details'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + } + } + /** + * Gets information about an export of a codespace. + * + * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/get-export-details-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components['parameters']['export-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespace-export-details'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * List the machine types a codespace can transition to use. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/codespace-machines-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + machines: components['schemas']['codespace-machine'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Starts a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/start-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 304: components['responses']['not_modified'] + 400: components['responses']['bad_request'] + 401: components['responses']['requires_authentication'] + /** Payment required */ + 402: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] + } + } + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + */ + 'codespaces/stop-for-authenticated-user': { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components['parameters']['codespace-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespace'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Lists all secrets available for a user's Codespaces without revealing their + * encrypted values. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/list-secrets-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + secrets: components['schemas']['codespaces-secret'][] + total_count: number + } + } + } + } + } + /** + * Gets a secret available to a user's codespaces without revealing its encrypted value. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/get-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespaces-secret'] + } + } + } + } + /** + * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'codespaces/create-or-update-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response after successfully creaing a secret */ + 201: { + content: { + 'application/json': { [key: string]: unknown } + } + } + /** Response after successfully updating a secret */ + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[] + } + } + } + } + /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ + 'codespaces/delete-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * List the repositories that have been granted the ability to use a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/list-repositories-for-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + repositories: components['schemas']['minimal-repository'][] + total_count: number + } + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Select the repositories that will use a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/set-repositories-for-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** No Content when repositories were added to the selected list */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[] + } + } + } + } + /** + * Adds a repository to the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/add-repository-for-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + */ + 'codespaces/remove-repository-for-secret-for-authenticated-user': { + parameters: { + path: { + /** secret_name parameter */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was removed from the selected list */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ + 'codespaces/get-public-key-for-authenticated-user': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['codespaces-user-public-key'] + } + } + } + } + /** Sets the visibility for your primary email addresses. */ + 'users/set-primary-email-visibility-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['email'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: 'public' | 'private' + } + } + } + } + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + 'users/list-emails-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['email'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** This endpoint is accessible with the `user` scope. */ + 'users/add-email-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['email'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** + * @description Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + * @example [] + */ + emails: string[] + } + | string[] + | string + } + } + } + /** This endpoint is accessible with the `user` scope. */ + 'users/delete-email-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[] + } + | string[] + | string + } + } + } + /** Lists the people following the authenticated user. */ + 'users/list-followers-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Lists the people who the authenticated user follows. */ + 'users/list-followed-by-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'users/check-person-is-followed-by-authenticated': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** if the person is followed by the authenticated user */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + /** if the person is not followed by the authenticated user */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + 'users/follow': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + 'users/unfollow': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/list-gpg-keys-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['gpg-key'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/create-gpg-key-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['gpg-key'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string + } + } + } + } + /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/get-gpg-key-for-authenticated-user': { + parameters: { + path: { + /** gpg_key_id parameter */ + gpg_key_id: components['parameters']['gpg-key-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gpg-key'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/delete-gpg-key-for-authenticated-user': { + parameters: { + path: { + /** gpg_key_id parameter */ + gpg_key_id: components['parameters']['gpg-key-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + 'apps/list-installations-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {} + content: { + 'application/json': { + installations: components['schemas']['installation'][] + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 415: components['responses']['preview_header_missing'] + } + } + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + 'apps/list-installation-repos-for-authenticated-user': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {} + content: { + 'application/json': { + repositories: components['schemas']['repository'][] + repository_selection?: string + total_count: number + } + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + 'apps/add-repo-to-installation-for-authenticated-user': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + 'apps/remove-repo-from-installation-for-authenticated-user': { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components['parameters']['installation-id'] + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + 'interactions/get-restrictions-for-authenticated-user': { + responses: { + /** Default response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } + } + } + /** Response when there are no restrictions */ + 204: never + } + } + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + 'interactions/set-restrictions-for-authenticated-user': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['interaction-limit-response'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': components['schemas']['interaction-limit'] + } + } + } + /** Removes any interaction restrictions from your public repositories. */ + 'interactions/remove-restrictions-for-authenticated-user': { + responses: { + /** Response */ + 204: never + } + } + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-authenticated-user': { + parameters: { + query: { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: 'created' | 'updated' | 'comments' + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + } + } + /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/list-public-ssh-keys-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['key'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/create-public-ssh-key-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['key'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The public SSH key to add to your GitHub account. */ + key: string + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string + } + } + } + } + /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/get-public-ssh-key-for-authenticated-user': { + parameters: { + path: { + /** key_id parameter */ + key_id: components['parameters']['key-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['key'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + 'users/delete-public-ssh-key-for-authenticated-user': { + parameters: { + path: { + /** key_id parameter */ + key_id: components['parameters']['key-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + 'apps/list-subscriptions-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['user-marketplace-purchase'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 404: components['responses']['not_found'] + } + } + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + 'apps/list-subscriptions-for-authenticated-user-stubbed': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['user-marketplace-purchase'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + } + } + 'orgs/list-memberships-for-authenticated-user': { + parameters: { + query: { + /** Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. */ + state?: 'active' | 'pending' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['org-membership'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + } + 'orgs/get-membership-for-authenticated-user': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-membership'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'orgs/update-membership-for-authenticated-user': { + parameters: { + path: { + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-membership'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: 'active' + } + } + } + } + /** Lists all migrations a user has started. */ + 'migrations/list-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['migration'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Initiates the generation of a user migration archive. */ + 'migrations/start-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['migration'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: 'repositories'[] + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean + repositories: string[] + } + } + } + } + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + 'migrations/get-status-for-authenticated-user': { + parameters: { + path: { + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + query: { + exclude?: string[] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['migration'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + 'migrations/get-archive-for-authenticated-user': { + parameters: { + path: { + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + } + responses: { + /** Response */ + 302: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + 'migrations/delete-archive-for-authenticated-user': { + parameters: { + path: { + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ + 'migrations/unlock-repo-for-authenticated-user': { + parameters: { + path: { + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + /** repo_name parameter */ + repo_name: components['parameters']['repo-name'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists all the repositories for this user migration. */ + 'migrations/list-repos-for-authenticated-user': { + parameters: { + path: { + /** migration_id parameter */ + migration_id: components['parameters']['migration-id'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 404: components['responses']['not_found'] + } + } + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + 'orgs/list-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/list-packages-for-authenticated-user': { + parameters: { + query: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components['parameters']['package-visibility'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'][] + } + } + } + } + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'] + } + } + } + } + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/delete-package-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/restore-package-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + } + query: { + /** package token */ + token?: string + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** The state of the package, either active or deleted. */ + state?: 'active' | 'deleted' + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-version-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'] + } + } + } + } + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/delete-package-version-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/restore-package-version-for-authenticated-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'projects/create-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 415: components['responses']['preview_header_missing'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string + } + } + } + } + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + 'users/list-public-emails-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['email'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + 'repos/list-for-authenticated-user': { + parameters: { + query: { + /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + visibility?: 'all' | 'public' | 'private' + /** + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: 'all' | 'owner' | 'public' | 'private' | 'member' + /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + sort?: 'created' | 'updated' | 'pushed' | 'full_name' + /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components['parameters']['before'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + } + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + 'repos/create-for-authenticated-user': { + parameters: {} + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['repository'] + } + } + 304: components['responses']['not_modified'] + 400: components['responses']['bad_request'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** @description A short description of the repository. */ + description?: string + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean + /** @description A URL with more information about the repository. */ + homepage?: string + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number + } + } + } + } + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + 'repos/list-invitations-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['repository-invitation'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'repos/decline-invitation-for-authenticated-user': { + parameters: { + path: { + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + } + } + 'repos/accept-invitation-for-authenticated-user': { + parameters: { + path: { + /** invitation_id parameter */ + invitation_id: components['parameters']['invitation-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + } + } + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + 'activity/list-repos-starred-by-authenticated-user': { + parameters: { + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['repository'][] + 'application/vnd.github.v3.star+json': components['schemas']['starred-repository'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'activity/check-repo-is-starred-by-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response if this repository is starred by you */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + /** Not Found if this repository is not starred by you */ + 404: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } + } + } + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'activity/star-repo-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'activity/unstar-repo-for-authenticated-user': { + parameters: { + path: { + owner: components['parameters']['owner'] + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** Lists repositories the authenticated user is watching. */ + 'activity/list-watched-repos-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + 'teams/list-for-authenticated-user': { + parameters: { + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['team-full'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + 'users/list': { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components['parameters']['since-user'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + 304: components['responses']['not_modified'] + } + } + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + 'users/get-by-username': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] + } + } + 404: components['responses']['not_found'] + } + } + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + 'activity/list-events-for-authenticated-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + 'activity/list-org-events-for-authenticated-user': { + parameters: { + path: { + username: components['parameters']['username'] + org: components['parameters']['org'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + 'activity/list-public-events-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + /** Lists the people following the specified user. */ + 'users/list-followers-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + /** Lists the people who the specified user follows. */ + 'users/list-following-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } + } + } + } + 'users/check-following-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + target_user: string + } + } + responses: { + /** if the user follows the target user */ + 204: never + /** if the user does not follow the target user */ + 404: unknown + } + } + /** Lists public gists for the specified user: */ + 'gists/list-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components['parameters']['since'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['base-gist'][] + } + } + 422: components['responses']['validation_failed'] + } + } + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + 'users/list-gpg-keys-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['gpg-key'][] + } + } + } + } + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + 'users/get-context-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */ + subject_type?: 'organization' | 'repository' | 'issue' | 'pull_request' + /** Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ + subject_id?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hovercard'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + } + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-user-installation': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['installation'] + } + } + } + } + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + 'users/list-public-keys-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['key-simple'][] + } + } + } + } + /** + * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + 'orgs/list-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + } + } + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/list-packages-for-user': { + parameters: { + query: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' + /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components['parameters']['package-visibility'] + } + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package'] + } + } + } + } + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + 'packages/delete-package-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 'packages/restore-package-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + } + query: { + /** package token */ + token?: string + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-all-package-versions-for-package-owned-by-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'][] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + 'packages/get-package-version-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['package-version'] + } + } + } + } + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + 'packages/delete-package-version-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + 'packages/restore-package-version-for-user': { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components['parameters']['package-type'] + /** The name of the package. */ + package_name: components['parameters']['package-name'] + username: components['parameters']['username'] + /** Unique identifier of the package version. */ + package_version_id: components['parameters']['package-version-id'] + } + } + responses: { + /** Response */ + 204: never + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'projects/list-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: 'open' | 'closed' | 'all' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['project'][] + } + } + 422: components['responses']['validation_failed'] + } + } + /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ + 'activity/list-received-events-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + 'activity/list-received-public-events-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['event'][] + } + } + } + } + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + 'repos/list-for-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Can be one of `all`, `owner`, `member`. */ + type?: 'all' | 'owner' | 'member' + /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + sort?: 'created' | 'updated' | 'pushed' | 'full_name' + /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + direction?: 'asc' | 'desc' + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + } + } + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + 'billing/get-github-actions-billing-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-billing-usage'] + } + } + } + } + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + 'billing/get-github-packages-billing-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['packages-billing-usage'] + } + } + } + } + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + 'billing/get-shared-storage-billing-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-billing-usage'] + } + } + } + } + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + 'activity/list-repos-starred-by-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort?: components['parameters']['sort'] + /** One of `asc` (ascending) or `desc` (descending). */ + direction?: components['parameters']['direction'] + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['starred-repository'][] | components['schemas']['repository'][] + } + } + } + } + /** Lists repositories a user is watching. */ + 'activity/list-repos-watched-by-user': { + parameters: { + path: { + username: components['parameters']['username'] + } + query: { + /** Results per page (max 100) */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['minimal-repository'][] + } + } + } + } + /** Get a random sentence from the Zen of GitHub */ + 'meta/get-zen': { + responses: { + /** Response */ + 200: { + content: { + 'text/plain': string + } + } + } + } +} + +export interface external {} diff --git a/test/v3/expected/jsdoc.alphabetized.ts b/test/v3/expected/jsdoc.alphabetized.ts new file mode 100644 index 000000000..a824b951e --- /dev/null +++ b/test/v3/expected/jsdoc.alphabetized.ts @@ -0,0 +1,151 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/contacts': { + get: operations['getContacts'] + } + '/contacts/{userUid}': { + get: operations['getContactInfo'] + } + '/contacts/{userUid}/icon': { + get: operations['getContactIcon'] + } + '/contacts/me': { + get: operations['getMyInfo'] + } + '/contacts/me/icon': { + get: operations['getMyIcon'] + delete: operations['deleteMyIcon'] + } +} + +export interface components { + schemas: { + /** Parent of most important objects */ + BaseEntity: { + /** + * Format: date-time + * @description It's date example + * @example 1999-03-31 15:00:00.000 + */ + created_at?: string + /** @example false */ + deleted?: boolean + /** + * Format: nanoid + * @deprecated + * @description Test description with deprecated + * @example njbusD52k6YoRG346tPgD + */ + uid?: string + /** + * Format: date-time + * @example 2020-07-10 10:10:00.000 + */ + updated_at?: string + } + /** Image for preview */ + Image: { + /** @example LEHV6nWB2yk8pyo0adR*.7kCMdnj */ + blurhash?: string + /** @example 128 */ + height: unknown + /** @example https://shantichat.com/data/V1StGXR8_Z5jdHi6B-myT/white-rabbit.png */ + url: string + /** @example 128 */ + width: unknown + } + /** User object */ + User: components['schemas']['BaseEntity'] & { + /** + * @default test + * @example The One + */ + description?: string + icon?: components['schemas']['Image'] + /** + * Format: date-time + * @example 2020-07-10 15:00:00.000 + */ + last_online_at?: string + /** @example Thomas A. Anderson */ + name?: string + /** @example America/Chicago */ + timezone?: string + } + } +} + +export interface operations { + getContacts: { + responses: { + /** OK */ + 200: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } + } + getContactInfo: { + parameters: { + path: { + userUid: string + } + } + responses: { + /** OK */ + 200: { + content: { + 'application/json': components['schemas']['User'] + } + } + } + } + getContactIcon: { + parameters: { + path: { + userUid: string + } + } + responses: { + /** OK */ + 200: { + content: { + 'application/json': components['schemas']['Image'] + } + } + } + } + getMyInfo: { + responses: { + /** OK */ + 200: { + content: { + 'application/json': components['schemas']['User'] + } + } + } + } + getMyIcon: { + responses: { + /** OK */ + 200: { + content: { + 'application/json': components['schemas']['Image'] + } + } + } + } + deleteMyIcon: { + responses: { + /** OK */ + 200: unknown + } + } +} + +export interface external {} diff --git a/test/v3/expected/jsdoc2.alphabetized.ts b/test/v3/expected/jsdoc2.alphabetized.ts new file mode 100644 index 000000000..862a5d448 --- /dev/null +++ b/test/v3/expected/jsdoc2.alphabetized.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/v1/getUser2': { + /** UserController.getUser2 */ + get: operations['UserController.getUser2.DjHhjSamaD'] + } +} + +export interface components { + schemas: { + IUser: { + id: number + name?: string + } + IUserWithId: components['schemas']['Partial>'] | string + IUserWithName: { + name: string + } + 'Partial>': { + id?: number + } + } +} + +export interface operations { + /** UserController.getUser2 */ + 'UserController.getUser2.DjHhjSamaD': { + parameters: { + query: { + param1?: number + param2?: string | components['schemas']['IUserWithId'] + param3?: string | components['schemas']['IUserWithName'] + } + } + responses: { + /** Successful response */ + 200: { + content: { + 'application/json': unknown + } + } + } + } +} + +export interface external {} diff --git a/test/v3/expected/manifold.alphabetized.ts b/test/v3/expected/manifold.alphabetized.ts new file mode 100644 index 000000000..4e0eaffdf --- /dev/null +++ b/test/v3/expected/manifold.alphabetized.ts @@ -0,0 +1,1214 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/internal/products': { + get: { + parameters: { + query: { + /** + * Base32 encoded 18 byte identifier of the provider that these + * products must belong to. + */ + provider_id?: string + /** Filter results to only include those that have this label. */ + label?: string + /** Return only products matching at least one of the tags. */ + tags?: string[] + /** Return product listings without plan information */ + include_plans?: boolean + } + } + responses: { + /** A product. */ + 200: { + content: { + 'application/json': components['schemas']['ExpandedProduct'][] + } + } + /** Invalid provider_id supplied */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + } + '/plans/': { + get: { + parameters: { + query: { + /** Return the plans that are associated with this product. */ + product_id: string[] + /** Filter results to only include those that have this label. */ + label?: string + } + } + responses: { + /** A list of plans for the given product. */ + 200: { + content: { + 'application/json': components['schemas']['ExpandedPlan'][] + } + } + /** Invalid Parameters Provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Could not find product */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + post: { + responses: { + /** Complete plan object */ + 201: { + content: { + 'application/json': components['schemas']['Plan'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Forbidden */ + 403: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Plan already exists with that label */ + 409: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Plan create request */ + requestBody: { + content: { + 'application/json': components['schemas']['CreatePlan'] + } + } + } + } + '/plans/{id}': { + get: { + parameters: { + path: { + /** + * ID of the plan to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** A plan. */ + 200: { + content: { + 'application/json': components['schemas']['ExpandedPlan'] + } + } + /** Invalid Plan ID Provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unknown plan error */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected error */ + default: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + patch: { + parameters: { + path: { + /** + * ID of the plan to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** Complete product plan */ + 200: { + content: { + 'application/json': components['schemas']['Plan'] + } + } + /** Invalid Plan ID */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Plan not found error */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Plan update request */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdatePlan'] + } + } + } + } + '/products/': { + get: { + parameters: { + query: { + /** + * Base32 encoded 18 byte identifier of the provider that these + * products must belong to. + */ + provider_id?: string + /** Filter results to only include those that have this label. */ + label?: string + /** Return only products matching at least one of the tags. */ + tags?: string[] + } + } + responses: { + /** A product. */ + 200: { + content: { + 'application/json': components['schemas']['Product'][] + } + } + /** Invalid provider_id supplied */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + post: { + responses: { + /** Complete product object */ + 201: { + content: { + 'application/json': components['schemas']['Product'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Forbidden */ + 403: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Product already exists with that label */ + 409: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Product create request */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateProduct'] + } + } + } + } + '/products/{id}': { + get: { + parameters: { + path: { + /** + * ID of the product to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** A product. */ + 200: { + content: { + 'application/json': components['schemas']['Product'] + } + } + /** Invalid Product ID */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Product not found error */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + patch: { + parameters: { + path: { + /** + * ID of the product to lookup, stored as a base32 encoded 18 byte + * identifier. + */ + id: string + } + } + responses: { + /** Complete product object */ + 200: { + content: { + 'application/json': components['schemas']['Product'] + } + } + /** Invalid Product ID */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Product not found error */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Product update request */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateProduct'] + } + } + } + } + '/providers/': { + get: { + parameters: { + query: { + /** Filter results to only include those that have this label. */ + label?: string + } + } + responses: { + /** A list of providers. */ + 200: { + content: { + 'application/json': components['schemas']['Provider'][] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + post: { + responses: { + /** Complete provider object */ + 201: { + content: { + 'application/json': components['schemas']['Provider'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Forbidden */ + 403: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Provider already exists with that label */ + 409: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Provider create request */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateProvider'] + } + } + } + } + '/providers/{id}': { + get: { + parameters: { + path: { + /** ID of the provider to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** A provider. */ + 200: { + content: { + 'application/json': components['schemas']['Provider'] + } + } + /** Unknown provider error */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + patch: { + parameters: { + path: { + /** ID of the provider to update, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** Complete provider object */ + 200: { + content: { + 'application/json': components['schemas']['Provider'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Forbidden */ + 403: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Provider not found */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Provider already exists with that label */ + 409: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Provider update request */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateProvider'] + } + } + } + } + '/regions/': { + get: { + parameters: { + query: { + /** Filter results to only include the regions that have this location. */ + location?: string + /** + * Filter results to only include the regions that are on this + * platform. + */ + platform?: string + } + } + responses: { + /** A list of regions. */ + 200: { + content: { + 'application/json': components['schemas']['Region'][] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + post: { + responses: { + /** Complete region object */ + 201: { + content: { + 'application/json': components['schemas']['Region'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Region already exists for that platform and location */ + 409: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Region create request */ + requestBody: { + content: { + 'application/json': components['schemas']['CreateRegion'] + } + } + } + } + '/regions/{id}': { + get: { + parameters: { + path: { + /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** A region. */ + 200: { + content: { + 'application/json': components['schemas']['Region'] + } + } + /** Provided Region ID is Invalid */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Region could not be found */ + 404: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + } + patch: { + parameters: { + path: { + /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ + id: string + } + } + responses: { + /** Complete region object */ + 200: { + content: { + 'application/json': components['schemas']['Region'] + } + } + /** Invalid request provided */ + 400: { + content: { + 'application/json': components['schemas']['Error'] + } + } + /** Unexpected Error */ + 500: { + content: { + 'application/json': components['schemas']['Error'] + } + } + } + /** Region update request */ + requestBody: { + content: { + 'application/json': components['schemas']['UpdateRegion'] + } + } + } + } +} + +export interface components { + schemas: { + CreatePlan: { + body: components['schemas']['PlanBody'] + } + CreateProduct: { + body: components['schemas']['ProductBody'] + } + CreateProvider: { + body: components['schemas']['ProviderBody'] + } + CreateRegion: { + body: components['schemas']['RegionBody'] + } + /** @description Unexpected error */ + Error: { + /** @description Explanation of the errors */ + message: string[] + /** @description The error type */ + type: string + } + ExpandedFeature: components['schemas']['FeatureType'] & { + value: components['schemas']['FeatureValueDetails'] + /** @description The string value set for the feature on the plan, this should only be used if the value property is null. */ + value_string: string + } + ExpandedPlan: { + body: components['schemas']['ExpandedPlanBody'] + id: components['schemas']['ID'] + /** @enum {string} */ + type: 'plan' + version: number + } + ExpandedPlanBody: components['schemas']['PlanBody'] & { + /** @description A boolean flag that indicates if a plan has customizable features. */ + customizable?: boolean + /** @description Plan cost using its default features plus base cost. */ + defaultCost?: number + /** @description An array of feature definitions for the plan, as defined on the Product. */ + expanded_features: components['schemas']['ExpandedFeature'][] + /** @description A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + free: boolean + } + ExpandedProduct: { + body: components['schemas']['ProductBody'] + id: components['schemas']['ID'] + plans?: components['schemas']['ExpandedPlan'][] + provider: components['schemas']['Provider'] + /** @enum {string} */ + type: 'product' + version: number + } + /** + * @description Optional container for additional details relating to numeric features. + * This is required if the feature is measurable and numeric. + */ + FeatureNumericDetails: { + cost_ranges?: components['schemas']['FeatureNumericRange'][] | null + /** + * @description Sets the increment at which numbers can be selected if customizable, by + * default this is 1; for example, setting this to 8 would only allow integers + * in increments of 8 ( 0, 8, 16, ... ). This property is not used if the + * feature is measurable; except if it is set to 0, setting the increment to 0 + * means this numeric details has no scale, and will not be or customizable. + * Some plans may not have a measureable or customizable feature. + */ + increment?: number + /** @description Maximum value that can be set by a user if customizable */ + max?: number | null + /** @description Minimum value that can be set by a user if customizable */ + min?: number + /** @description Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + suffix?: string | null + } | null + FeatureNumericRange: { + /** + * @description An integer in 10,000,000ths of cents, will be multiplied by the + * numeric value set in the feature to determine the cost. + */ + cost_multiple?: number + /** + * @description Defines the end of the range ( inclusive ), from the previous, or 0; + * where the cost_multiple starts taking effect. If set to -1 this defines the + * range to infinity, or the maximum integer the system can handle + * ( whichever comes first ). + */ + limit?: number + } + /** + * @description A feature type represents the different aspects of a product that are + * offered, these features can manifest differently depending on the plan. + */ + FeatureType: { + /** + * @description This sets whether or not the feature can be customized by a consumer. + * @default false + */ + customizable?: boolean + /** + * @description This sets whether or not the feature can be downgraded by the consumer after the + * resource has provisioned. Downgrading means setting a lower value or selecting a + * lower element in the list. + * + * @default false + */ + downgradable?: boolean + label: components['schemas']['Label'] + /** + * @description Sets if this feature’s value is trackable from the provider, + * this only really affects numeric constraints. + * + * @default false + */ + measurable?: boolean + name: components['schemas']['Name'] + /** @enum {string} */ + type: 'boolean' | 'string' | 'number' + /** + * @description This sets whether or not the feature can be upgraded by the consumer after the + * resource has provisioned. Upgrading means setting a higher value or selecting a + * higher element in the list. + * + * @default false + */ + upgradable?: boolean + values?: components['schemas']['FeatureValuesList'] + } + FeatureValue: { + feature: components['schemas']['Label'] + value: components['schemas']['FeatureValueLabel'] + } + FeatureValueDetails: { + /** + * @description The cost that will be added to the monthly plan cost when this value + * is selected or is default for the plan. + * Cost is deprecated in favor of the `price.cost` field. + */ + cost?: number + label: components['schemas']['FeatureValueLabel'] + name: components['schemas']['Name'] + numeric_details?: components['schemas']['FeatureNumericDetails'] + /** + * @description Price describes the cost of a feature. It should be preferred over + * the `cost` property. + */ + price?: { + /** + * @description Cost is the price in cents that will be added to plan's base cost + * when this value is selected or is default for the plan. + * Number features should use the cost range instead. + */ + cost?: number + /** @description Description explains how a feature is calculated to the user. */ + description?: string + formula?: components['schemas']['PriceFormula'] + /** + * @description When a feature is used to multiply the cost of the plan or of + * another feature, multiply factor is used for calculation. + * A feature cannot have both a cost and a multiply factor. + */ + multiply_factor?: number + } + } + /** @description A machine readable unique label, which is url safe. */ + FeatureValueLabel: string + /** + * @description A list of allowable values for the feature. + * To define values for a boolean feature type, only `true` is required, + * using the label `true`, name and numeric_details will be ignored. + * If the feature is set measurable it is expected that these all have a + * `numeric_details` definition, and the plan will determine which + * `numeric_details` set is used based on it's setting. + */ + FeatureValuesList: components['schemas']['FeatureValueDetails'][] | null + /** @description A flexible identifier for internal or external entities. */ + FlexID: string + /** + * Format: base32ID + * @description A base32 encoded 18 byte identifier. + */ + ID: string + /** @description A machine readable unique label, which is url safe. */ + Label: string + /** @description A location of where a potential resource can be provisioned. */ + Location: string + /** + * Format: url + * @description Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + LogoURL: string + /** @description A name of an entity which is displayed to a human. */ + Name: string + /** @description A flexible identifier for internal or external entities. */ + OptionalFlexID: string | null + /** + * Format: base32ID + * @description A base32 encoded 18 byte identifier. + */ + OptionalID: string | null + /** @description A machine readable unique label, which is url safe. */ + OptionalLabel: string | null + /** + * Format: url + * @description Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + OptionalLogoURL: string | null + /** @description A name of an entity which is displayed to a human. */ + OptionalName: string | null + Plan: { + body: components['schemas']['PlanBody'] + id: components['schemas']['ID'] + /** @enum {string} */ + type: 'plan' + version: number + } + PlanBody: { + /** @description Dollar value in cents. */ + cost: number + /** @description Array of Feature Values */ + features: components['schemas']['FeatureValue'][] + label: components['schemas']['Label'] + name: components['schemas']['Name'] + product_id: components['schemas']['ID'] + provider_id: components['schemas']['ID'] + /** @description Array of Region IDs */ + regions: components['schemas']['ID'][] + resizable_to?: components['schemas']['PlanResizeList'] + state: components['schemas']['PlanState'] + /** + * @description The number of days a user gets as a free trial when subscribing to + * this plan. Trials are valid only once per product; changing plans + * or adding an additional subscription will not start a new trial. + */ + trial_days?: number + } + /** @description Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ + PlanResizeList: components['schemas']['ID'][] | null + /** @enum {string} */ + PlanState: 'hidden' | 'available' | 'grandfathered' | 'unlisted' + /** @description A name of a platform which is used to provision resources. */ + Platform: string + /** + * @description Describes how a feature cost should be calculated. An empty + * string defaults to the normal price calculation using the value cost. + * Formula uses Reverse Polish notation for statements. It supports + * addition, subtraction and multiplication operations. Operations must be + * grouped with parenthesis. + * Number literals can be used for formulas. Eg: "(- feature-a#cost 500)" + * will remove 5 dollars from the cost of feature a. + * Multiplication operation supports either a cost multiplied by a + * factor or a number multiplied by a factor. + * In a plan formula the following keywords are available: + * - `plan#base_cost` is the base cost of a plan in cents + * - `plan#partial_cost` is the base cost plus its feature costs calculated + * so far. Feature formulas are calculated in the order they are defined, + * so features can refer to another feature values or the partial_cost of + * the plan. + * - `this-feature-label#multiply_factor` is the multiply_factor of this + * feature as a float number. + * - `another-feature-label#cost` is the cost of a feature matching the label + * in cents. + * - `another-feature-label#number` is the numeric value of a number feature + * In a feature formula, plan base cost and total cost cannot be used + */ + PriceFormula: string + Product: { + body: components['schemas']['ProductBody'] + id: components['schemas']['ID'] + /** @enum {string} */ + type: 'product' + version: number + } + ProductBody: { + billing: { + /** @enum {string} */ + currency: 'usd' + /** @enum {string} */ + type: 'monthly-prorated' | 'monthly-anniversary' | 'annual-anniversary' + } + /** Format: url */ + documentation_url: string + feature_types: components['schemas']['FeatureType'][] + images: components['schemas']['ProductImageURL'][] + integration: { + /** Format: url */ + base_url: string + features: components['schemas']['ProductIntegrationFeatures'] + provisioning: components['schemas']['ProductProvisioning'] + /** Format: url */ + sso_url?: string | null + /** @enum {string} */ + version: 'v1' + } + label: components['schemas']['Label'] + listing: components['schemas']['ProductListing'] + logo_url: components['schemas']['LogoURL'] + name: components['schemas']['Name'] + provider_id: components['schemas']['ID'] + /** @description A list of getting started steps for the product */ + setup_steps?: string[] | null + state: components['schemas']['ProductState'] + /** Format: email */ + support_email: string + /** @description 140 character sentence positioning the product. */ + tagline: string + tags?: components['schemas']['ProductTags'] + /** + * @description URL to this Product's Terms of Service. If provided is true, then + * a url must be set. Otherwise, provided is false. + */ + terms: { + provided: boolean + /** Format: url */ + url?: string | null + } + /** @description A list of value propositions of the product. */ + value_props: components['schemas']['ValueProp'][] + } + /** + * Format: url + * @description Image URL used for Product listings. + * + * Minimum 660px wide, 400px high. + */ + ProductImageURL: string + ProductIntegrationFeatures: { + /** + * @description Indicates whether or not this product supports resource transitions to + * manifold by access_code. + */ + access_code?: boolean + /** + * @description Describes the credential type that is supported by this product. + * + * * `none`: The product does not support providing any credentials + * * `single`: Only one credential is supported at the same time. + * * `multiple`: Multiple credentials are supported at the same time. + * * `unknown`: The credential type is unknown. + * + * @default multiple + * @enum {string} + */ + credential?: 'none' | 'single' | 'multiple' | 'unknown' + /** + * @description Represents whether or not this product supports changing + * the plan of a resource. + */ + plan_change?: boolean + /** + * @description Describes how the region for a resource is specified, if + * unspecified, then regions have no impact on this + * resource. + * + * @enum {string} + */ + region?: 'user-specified' | 'unspecified' + /** + * @description Represents whether or not this product supports Single + * Sign On + */ + sso?: boolean + } + ProductListing: { + /** + * @description When true, the product will be displayed in product listings alongside + * other products. When false the product will be excluded from listings, + * but can still be provisioned directly if it's label is known. + * Any pages that display information about the product when not listed, + * should indicate to webcrawlers that the content should not be indexed. + * + * @default false + */ + listed?: boolean + /** + * @description Object to hold various flags for marketing purposes only. These are values + * that need to be stored, but should not affect decision making in code. If + * we find ourselves in a position where we think they should, we should + * consider refactoring our listing definition. + */ + marketing?: { + /** + * @description Indicates whether or not the product is in `Beta` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + beta?: boolean + /** + * @description Indicates whether or not the product is in `New` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + featured?: boolean + /** + * @description Indicates whether or not the product is in `New` and should be + * advertised as such. This does not have any impact on who can access the + * product, it is just used to inform consumers through our clients. + * + * @default false + */ + new?: boolean + } + /** + * @description When true, everyone can see the product when requested. When false it will + * not be visible to anyone except those on the provider team. + * + * @default false + */ + public?: boolean + } + /** + * @description Provider Only, implies that the product should only be provisionable by the + * provider; so members of the provider team, no one else should be allowed. + * Pre-Order, should not be used yet. But in the future it should allow people to + * pre-provision a resource for when it does go live. + * Public, means the resource is live and everyone should be able to provision it. + * + * @enum {string} + */ + ProductProvisioning: 'provider-only' | 'pre-order' | 'public' + /** @enum {string} */ + ProductState: 'available' | 'hidden' | 'grandfathered' | 'new' | 'upcoming' + /** @description List of tags for product categorization and search */ + ProductTags: components['schemas']['Label'][] + Provider: { + body: components['schemas']['ProviderBody'] + id: components['schemas']['ID'] + /** @enum {string} */ + type: 'provider' + version: number + } + ProviderBody: { + /** Format: url */ + documentation_url?: string + label: components['schemas']['Label'] + logo_url?: components['schemas']['LogoURL'] + name: components['schemas']['Name'] + owner_id?: components['schemas']['OptionalFlexID'] + /** Format: email */ + support_email?: string + team_id?: components['schemas']['OptionalID'] + } + Region: { + body: components['schemas']['RegionBody'] + id: components['schemas']['ID'] + /** @enum {string} */ + type: 'region' + version: number + } + RegionBody: { + location: components['schemas']['Location'] + name: string + platform: components['schemas']['Platform'] + priority: number + } + UpdatePlan: { + body: components['schemas']['UpdatePlanBody'] + id: components['schemas']['ID'] + } + UpdatePlanBody: { + /** @description Dollar value in cents */ + cost?: number | null + /** @description Array of Feature Values */ + features?: components['schemas']['FeatureValue'][] | null + /** @description Used in conjuction with resizable_to to set or unset the list */ + has_resize_constraints?: boolean | null + label?: components['schemas']['Label'] + name?: components['schemas']['Name'] + /** @description Array of Region IDs */ + regions?: components['schemas']['ID'][] | null + resizable_to?: components['schemas']['PlanResizeList'] + state?: components['schemas']['PlanState'] + /** + * @description The number of days a user gets as a free trial when subscribing to + * this plan. Trials are valid only once per product; changing plans + * or adding an additional subscription will not start a new trial. + */ + trial_days?: number | null + } + UpdateProduct: { + body: components['schemas']['UpdateProductBody'] + id: components['schemas']['ID'] + } + UpdateProductBody: { + /** Format: url */ + documentation_url?: string | null + feature_types?: components['schemas']['FeatureType'][] | null + images?: components['schemas']['ProductImageURL'][] | null + integration?: { + /** Format: url */ + base_url?: string | null + features?: { + access_code?: boolean | null + /** + * @default multiple + * @enum {string|null} + */ + credential?: ('none' | 'single' | 'multiple' | 'unknown') | null + plan_change?: boolean | null + sso?: boolean | null + } + provisioning?: components['schemas']['ProductProvisioning'] + /** Format: url */ + sso_url?: string | null + /** @enum {string|null} */ + version?: 'v1' | null + } | null + label?: components['schemas']['Label'] + listing?: components['schemas']['ProductListing'] + logo_url?: components['schemas']['LogoURL'] + name?: components['schemas']['Name'] + /** @description An array of platform ids to restrict this product for. */ + platform_ids?: components['schemas']['ID'][] | null + /** @description A list of getting started steps for the product */ + setup_steps?: string[] | null + /** Format: email */ + support_email?: string | null + /** @description 140 character sentence positioning the product. */ + tagline?: string | null + tags?: components['schemas']['ProductTags'] + /** + * @description URL to this Product's Terms of Service. If provided is true, then + * a url must be set. Otherwise, provided is false. + */ + terms_url?: string | null + /** @description A list of value propositions of the product. */ + value_props?: components['schemas']['ValueProp'][] | null + } + UpdateProvider: { + body: components['schemas']['UpdateProviderBody'] + id: components['schemas']['ID'] + } + UpdateProviderBody: { + /** Format: url */ + documentation_url?: string | null + label?: components['schemas']['OptionalLabel'] + logo_url?: components['schemas']['OptionalLogoURL'] + name?: components['schemas']['OptionalName'] + owner_id?: components['schemas']['OptionalFlexID'] + /** Format: email */ + support_email?: string | null + team_id?: components['schemas']['OptionalID'] + } + UpdateRegion: { + name: string + } + ValueProp: { + /** @description Body of a value proposition. */ + body: string + /** @description Heading of a value proposition. */ + header: string + } + } + parameters: { + /** @description Filter results to only include those that have this label. */ + LabelFilter: string + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/null-in-enum.alphabetized.ts b/test/v3/expected/null-in-enum.alphabetized.ts new file mode 100644 index 000000000..6a1cdb5b5 --- /dev/null +++ b/test/v3/expected/null-in-enum.alphabetized.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + responses: { + /** A list of types. */ + 200: unknown + } + } + } +} + +export interface components { + schemas: { + /** @description Enum with null and nullable */ + MyType: { + /** @enum {string|null} */ + myField?: ('foo' | 'bar' | null) | null + } + /** @description Enum with null */ + MyTypeMixed: { + /** @enum {string} */ + myField?: 'foo' | 2 | false | null + } + /** @description Enum with null */ + MyTypeNotNullable: { + /** @enum {string} */ + myField?: 'foo' | 'bar' | null + } + /** @description Enum with null */ + MyTypeNotNullableNotNull: { + /** @enum {string} */ + myField?: 'foo' | 'bar' + } + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/one-of-empty.alphabetized.ts b/test/v3/expected/one-of-empty.alphabetized.ts new file mode 100644 index 000000000..b826b3fd8 --- /dev/null +++ b/test/v3/expected/one-of-empty.alphabetized.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/test': { + get: { + responses: { + /** A list of types. */ + 200: unknown + } + } + } +} + +export interface components { + schemas: { + /** @description Enum with null and nullable */ + Example: { + emptyAllOf?: undefined + emptyAnyOf?: undefined + emptyOneOf?: undefined + } + } +} + +export interface operations {} + +export interface external {} diff --git a/test/v3/expected/petstore-openapitools.alphabetized.ts b/test/v3/expected/petstore-openapitools.alphabetized.ts new file mode 100644 index 000000000..d462ac676 --- /dev/null +++ b/test/v3/expected/petstore-openapitools.alphabetized.ts @@ -0,0 +1,521 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/pet': { + put: operations['updatePet'] + post: operations['addPet'] + } + '/pet/{petId}': { + /** Returns a single pet */ + get: operations['getPetById'] + post: operations['updatePetWithForm'] + delete: operations['deletePet'] + } + '/pet/{petId}/uploadImage': { + post: operations['uploadFile'] + } + '/pet/findByStatus': { + /** Multiple status values can be provided with comma separated strings */ + get: operations['findPetsByStatus'] + } + '/pet/findByTags': { + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + get: operations['findPetsByTags'] + } + '/store/inventory': { + /** Returns a map of status codes to quantities */ + get: operations['getInventory'] + } + '/store/order': { + post: operations['placeOrder'] + } + '/store/order/{orderId}': { + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions */ + get: operations['getOrderById'] + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ + delete: operations['deleteOrder'] + } + '/user': { + /** This can only be done by the logged in user. */ + post: operations['createUser'] + } + '/user/{username}': { + get: operations['getUserByName'] + /** This can only be done by the logged in user. */ + put: operations['updateUser'] + /** This can only be done by the logged in user. */ + delete: operations['deleteUser'] + } + '/user/createWithArray': { + post: operations['createUsersWithArrayInput'] + } + '/user/createWithList': { + post: operations['createUsersWithListInput'] + } + '/user/login': { + get: operations['loginUser'] + } + '/user/logout': { + get: operations['logoutUser'] + } +} + +export interface components { + schemas: { + /** + * An uploaded response + * @description Describes the result of uploading an image resource + */ + ApiResponse: { + /** Format: int32 */ + code?: number + message?: string + type?: string + } + /** + * Pet category + * @description A category for a pet + */ + Category: { + /** Format: int64 */ + id?: number + name?: string + } + /** + * Pet Order + * @description An order for a pets from the pet store + */ + Order: { + /** @default false */ + complete?: boolean + /** Format: int64 */ + id?: number + /** Format: int64 */ + petId?: number + /** Format: int32 */ + quantity?: number + /** Format: date-time */ + shipDate?: string + /** + * @description Order Status + * @enum {string} + */ + status?: 'placed' | 'approved' | 'delivered' + } + /** + * a Pet + * @description A pet for sale in the pet store + */ + Pet: { + category?: components['schemas']['Category'] + /** Format: int64 */ + id?: number + /** @example doggie */ + name: string + photoUrls: string[] + /** + * @description pet status in the store + * @enum {string} + */ + status?: 'available' | 'pending' | 'sold' + tags?: components['schemas']['Tag'][] + } + /** + * Pet Tag + * @description A tag for a pet + */ + Tag: { + /** Format: int64 */ + id?: number + name?: string + } + /** + * a User + * @description A User who is purchasing from the pet store + */ + User: { + email?: string + firstName?: string + /** Format: int64 */ + id?: number + lastName?: string + password?: string + phone?: string + username?: string + /** + * Format: int32 + * @description User Status + */ + userStatus?: number + } + } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } +} + +export interface operations { + updatePet: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'] + 'application/json': components['schemas']['Pet'] + } + } + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + /** Validation exception */ + 405: unknown + } + requestBody: components['requestBodies']['Pet'] + } + addPet: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'] + 'application/json': components['schemas']['Pet'] + } + } + /** Invalid input */ + 405: unknown + } + requestBody: components['requestBodies']['Pet'] + } + /** Returns a single pet */ + getPetById: { + parameters: { + path: { + /** ID of pet to return */ + petId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'] + 'application/json': components['schemas']['Pet'] + } + } + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + } + } + updatePetWithForm: { + parameters: { + path: { + /** ID of pet that needs to be updated */ + petId: number + } + } + responses: { + /** Invalid input */ + 405: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Updated name of the pet */ + name?: string + /** @description Updated status of the pet */ + status?: string + } + } + } + } + deletePet: { + parameters: { + header: { + api_key?: string + } + path: { + /** Pet id to delete */ + petId: number + } + } + responses: { + /** Invalid pet value */ + 400: unknown + } + } + uploadFile: { + parameters: { + path: { + /** ID of pet to update */ + petId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/json': components['schemas']['ApiResponse'] + } + } + } + requestBody: { + content: { + 'multipart/form-data': { + /** @description Additional data to pass to server */ + additionalMetadata?: string + /** + * Format: binary + * @description file to upload + */ + file?: string + } + } + } + } + /** Multiple status values can be provided with comma separated strings */ + findPetsByStatus: { + parameters: { + query: { + /** Status values that need to be considered for filter */ + status: ('available' | 'pending' | 'sold')[] + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'][] + 'application/json': components['schemas']['Pet'][] + } + } + /** Invalid status value */ + 400: unknown + } + } + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + findPetsByTags: { + parameters: { + query: { + /** Tags to filter by */ + tags: string[] + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'][] + 'application/json': components['schemas']['Pet'][] + } + } + /** Invalid tag value */ + 400: unknown + } + } + /** Returns a map of status codes to quantities */ + getInventory: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/json': { [key: string]: number } + } + } + } + } + placeOrder: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + } + } + /** Invalid Order */ + 400: unknown + } + /** order placed for purchasing the pet */ + requestBody: { + content: { + 'application/json': components['schemas']['Order'] + } + } + } + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions */ + getOrderById: { + parameters: { + path: { + /** ID of pet that needs to be fetched */ + orderId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + } + } + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ + deleteOrder: { + parameters: { + path: { + /** ID of the order that needs to be deleted */ + orderId: string + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + createUser: { + responses: { + /** successful operation */ + default: unknown + } + /** Created user object */ + requestBody: { + content: { + 'application/json': components['schemas']['User'] + } + } + } + getUserByName: { + parameters: { + path: { + /** The name that needs to be fetched. Use user1 for testing. */ + username: string + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['User'] + 'application/json': components['schemas']['User'] + } + } + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + updateUser: { + parameters: { + path: { + /** name that need to be deleted */ + username: string + } + } + responses: { + /** Invalid user supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + /** Updated user object */ + requestBody: { + content: { + 'application/json': components['schemas']['User'] + } + } + } + /** This can only be done by the logged in user. */ + deleteUser: { + parameters: { + path: { + /** The name that needs to be deleted */ + username: string + } + } + responses: { + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + createUsersWithArrayInput: { + responses: { + /** successful operation */ + default: unknown + } + requestBody: components['requestBodies']['UserArray'] + } + createUsersWithListInput: { + responses: { + /** successful operation */ + default: unknown + } + requestBody: components['requestBodies']['UserArray'] + } + loginUser: { + parameters: { + query: { + /** The user name for login */ + username: string + /** The password for login in clear text */ + password: string + } + } + responses: { + /** successful operation */ + 200: { + headers: { + /** Cookie authentication key for use with the `api_key` apiKey authentication. */ + 'Set-Cookie'?: string + /** date in UTC when toekn expires */ + 'X-Expires-After'?: string + /** calls per hour allowed by the user */ + 'X-Rate-Limit'?: number + } + content: { + 'application/xml': string + 'application/json': string + } + } + /** Invalid username/password supplied */ + 400: unknown + } + } + logoutUser: { + responses: { + /** successful operation */ + default: unknown + } + } +} + +export interface external {} diff --git a/test/v3/expected/petstore.alphabetized.ts b/test/v3/expected/petstore.alphabetized.ts new file mode 100644 index 000000000..fb917a1e8 --- /dev/null +++ b/test/v3/expected/petstore.alphabetized.ts @@ -0,0 +1,490 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/pet': { + put: operations['updatePet'] + post: operations['addPet'] + } + '/pet/{petId}': { + /** Returns a single pet */ + get: operations['getPetById'] + post: operations['updatePetWithForm'] + delete: operations['deletePet'] + } + '/pet/{petId}/uploadImage': { + post: operations['uploadFile'] + } + '/pet/findByStatus': { + /** Multiple status values can be provided with comma separated strings */ + get: operations['findPetsByStatus'] + } + '/pet/findByTags': { + /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + get: operations['findPetsByTags'] + } + '/store/inventory': { + /** Returns a map of status codes to quantities */ + get: operations['getInventory'] + } + '/store/order': { + post: operations['placeOrder'] + } + '/store/order/{orderId}': { + /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + get: operations['getOrderById'] + /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + delete: operations['deleteOrder'] + } + '/user': { + /** This can only be done by the logged in user. */ + post: operations['createUser'] + } + '/user/{username}': { + get: operations['getUserByName'] + /** This can only be done by the logged in user. */ + put: operations['updateUser'] + /** This can only be done by the logged in user. */ + delete: operations['deleteUser'] + } + '/user/createWithArray': { + post: operations['createUsersWithArrayInput'] + } + '/user/createWithList': { + post: operations['createUsersWithListInput'] + } + '/user/login': { + get: operations['loginUser'] + } + '/user/logout': { + get: operations['logoutUser'] + } +} + +export interface components { + schemas: { + ApiResponse: { + /** Format: int32 */ + code?: number + message?: string + type?: string + } + Category: { + /** Format: int64 */ + id?: number + name?: string + } + Order: { + /** @default false */ + complete?: boolean + /** Format: int64 */ + id?: number + /** Format: int64 */ + petId?: number + /** Format: int32 */ + quantity?: number + /** Format: date-time */ + shipDate?: string + /** + * @description Order Status + * @enum {string} + */ + status?: 'placed' | 'approved' | 'delivered' + } + Pet: { + category?: components['schemas']['Category'] + /** Format: int64 */ + id?: number + /** @example doggie */ + name: string + photoUrls: string[] + /** + * @description pet status in the store + * @enum {string} + */ + status?: 'available' | 'pending' | 'sold' + tags?: components['schemas']['Tag'][] + } + Tag: { + /** Format: int64 */ + id?: number + name?: string + } + User: { + email?: string + firstName?: string + /** Format: int64 */ + id?: number + lastName?: string + password?: string + phone?: string + username?: string + /** + * Format: int32 + * @description User Status + */ + userStatus?: number + } + } +} + +export interface operations { + updatePet: { + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + /** Validation exception */ + 405: unknown + } + /** Pet object that needs to be added to the store */ + requestBody: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + } + addPet: { + responses: { + /** Invalid input */ + 405: unknown + } + /** Pet object that needs to be added to the store */ + requestBody: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + } + /** Returns a single pet */ + getPetById: { + parameters: { + path: { + /** ID of pet to return */ + petId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'] + 'application/json': components['schemas']['Pet'] + } + } + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + } + } + updatePetWithForm: { + parameters: { + path: { + /** ID of pet that needs to be updated */ + petId: number + } + } + responses: { + /** Invalid input */ + 405: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Updated name of the pet */ + name?: string + /** @description Updated status of the pet */ + status?: string + } + } + } + } + deletePet: { + parameters: { + header: { + api_key?: string + } + path: { + /** Pet id to delete */ + petId: number + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Pet not found */ + 404: unknown + } + } + uploadFile: { + parameters: { + path: { + /** ID of pet to update */ + petId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/json': components['schemas']['ApiResponse'] + } + } + } + requestBody: { + content: { + 'multipart/form-data': { + /** @description Additional data to pass to server */ + additionalMetadata?: string + /** + * Format: binary + * @description file to upload + */ + file?: string + } + } + } + } + /** Multiple status values can be provided with comma separated strings */ + findPetsByStatus: { + parameters: { + query: { + /** Status values that need to be considered for filter */ + status: ('available' | 'pending' | 'sold')[] + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'][] + 'application/json': components['schemas']['Pet'][] + } + } + /** Invalid status value */ + 400: unknown + } + } + /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + findPetsByTags: { + parameters: { + query: { + /** Tags to filter by */ + tags: string[] + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Pet'][] + 'application/json': components['schemas']['Pet'][] + } + } + /** Invalid tag value */ + 400: unknown + } + } + /** Returns a map of status codes to quantities */ + getInventory: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/json': { [key: string]: number } + } + } + } + } + placeOrder: { + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + } + } + /** Invalid Order */ + 400: unknown + } + /** order placed for purchasing the pet */ + requestBody: { + content: { + '*/*': components['schemas']['Order'] + } + } + } + /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + getOrderById: { + parameters: { + path: { + /** ID of pet that needs to be fetched */ + orderId: number + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + } + } + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + deleteOrder: { + parameters: { + path: { + /** ID of the order that needs to be deleted */ + orderId: number + } + } + responses: { + /** Invalid ID supplied */ + 400: unknown + /** Order not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + createUser: { + responses: { + /** successful operation */ + default: unknown + } + /** Created user object */ + requestBody: { + content: { + '*/*': components['schemas']['User'] + } + } + } + getUserByName: { + parameters: { + path: { + /** The name that needs to be fetched. Use user1 for testing. */ + username: string + } + } + responses: { + /** successful operation */ + 200: { + content: { + 'application/xml': components['schemas']['User'] + 'application/json': components['schemas']['User'] + } + } + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + /** This can only be done by the logged in user. */ + updateUser: { + parameters: { + path: { + /** name that need to be updated */ + username: string + } + } + responses: { + /** Invalid user supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + /** Updated user object */ + requestBody: { + content: { + '*/*': components['schemas']['User'] + } + } + } + /** This can only be done by the logged in user. */ + deleteUser: { + parameters: { + path: { + /** The name that needs to be deleted */ + username: string + } + } + responses: { + /** Invalid username supplied */ + 400: unknown + /** User not found */ + 404: unknown + } + } + createUsersWithArrayInput: { + responses: { + /** successful operation */ + default: unknown + } + /** List of user object */ + requestBody: { + content: { + '*/*': components['schemas']['User'][] + } + } + } + createUsersWithListInput: { + responses: { + /** successful operation */ + default: unknown + } + /** List of user object */ + requestBody: { + content: { + '*/*': components['schemas']['User'][] + } + } + } + loginUser: { + parameters: { + query: { + /** The user name for login */ + username: string + /** The password for login in clear text */ + password: string + } + } + responses: { + /** successful operation */ + 200: { + headers: { + /** date in UTC when token expires */ + 'X-Expires-After'?: string + /** calls per hour allowed by the user */ + 'X-Rate-Limit'?: number + } + content: { + 'application/xml': string + 'application/json': string + } + } + /** Invalid username/password supplied */ + 400: unknown + } + } + logoutUser: { + responses: { + /** successful operation */ + default: unknown + } + } +} + +export interface external {} diff --git a/test/v3/expected/reference-to-properties.alphabetized.ts b/test/v3/expected/reference-to-properties.alphabetized.ts new file mode 100644 index 000000000..48b4e4ceb --- /dev/null +++ b/test/v3/expected/reference-to-properties.alphabetized.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/pet': { + put: operations['updatePet'] + } +} + +export interface components { + schemas: { + Pet: { + name: string + } + } +} + +export interface operations { + updatePet: { + responses: { + 200: unknown + } + requestBody: { + content: { + 'application/json': { + name?: components['schemas']['Pet']['name'] + } + } + } + } +} + +export interface external {} diff --git a/test/v3/expected/stripe.alphabetized.ts b/test/v3/expected/stripe.alphabetized.ts new file mode 100644 index 000000000..62519621e --- /dev/null +++ b/test/v3/expected/stripe.alphabetized.ts @@ -0,0 +1,44038 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/v1/3d_secure': { + /**

Initiate 3D Secure authentication.

*/ + post: operations['Post3dSecure'] + } + '/v1/3d_secure/{three_d_secure}': { + /**

Retrieves a 3D Secure object.

*/ + get: operations['Get3dSecureThreeDSecure'] + } + '/v1/account': { + /**

Retrieves the details of an account.

*/ + get: operations['GetAccount'] + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + post: operations['PostAccount'] + /** + *

With Connect, you can delete accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + delete: operations['DeleteAccount'] + } + '/v1/account_links': { + /**

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

*/ + post: operations['PostAccountLinks'] + } + '/v1/account/bank_accounts': { + /**

Create an external account for a given account.

*/ + post: operations['PostAccountBankAccounts'] + } + '/v1/account/bank_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountBankAccountsId'] + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountBankAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountBankAccountsId'] + } + '/v1/account/capabilities': { + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + get: operations['GetAccountCapabilities'] + } + '/v1/account/capabilities/{capability}': { + /**

Retrieves information about the specified Account Capability.

*/ + get: operations['GetAccountCapabilitiesCapability'] + /**

Updates an existing Account Capability.

*/ + post: operations['PostAccountCapabilitiesCapability'] + } + '/v1/account/external_accounts': { + /**

List external accounts for an account.

*/ + get: operations['GetAccountExternalAccounts'] + /**

Create an external account for a given account.

*/ + post: operations['PostAccountExternalAccounts'] + } + '/v1/account/external_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountExternalAccountsId'] + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountExternalAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountExternalAccountsId'] + } + '/v1/account/login_links': { + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + post: operations['PostAccountLoginLinks'] + } + '/v1/account/people': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountPeople'] + /**

Creates a new person.

*/ + post: operations['PostAccountPeople'] + } + '/v1/account/people/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountPeoplePerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountPeoplePerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountPeoplePerson'] + } + '/v1/account/persons': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountPersons'] + /**

Creates a new person.

*/ + post: operations['PostAccountPersons'] + } + '/v1/account/persons/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountPersonsPerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountPersonsPerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountPersonsPerson'] + } + '/v1/accounts': { + /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ + get: operations['GetAccounts'] + /** + *

With Connect, you can create Stripe accounts for your users. + * To do this, you’ll first need to register your platform.

+ */ + post: operations['PostAccounts'] + } + '/v1/accounts/{account}': { + /**

Retrieves the details of an account.

*/ + get: operations['GetAccountsAccount'] + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + post: operations['PostAccountsAccount'] + /** + *

With Connect, you can delete accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + delete: operations['DeleteAccountsAccount'] + } + '/v1/accounts/{account}/bank_accounts': { + /**

Create an external account for a given account.

*/ + post: operations['PostAccountsAccountBankAccounts'] + } + '/v1/accounts/{account}/bank_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountsAccountBankAccountsId'] + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountsAccountBankAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountsAccountBankAccountsId'] + } + '/v1/accounts/{account}/capabilities': { + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + get: operations['GetAccountsAccountCapabilities'] + } + '/v1/accounts/{account}/capabilities/{capability}': { + /**

Retrieves information about the specified Account Capability.

*/ + get: operations['GetAccountsAccountCapabilitiesCapability'] + /**

Updates an existing Account Capability.

*/ + post: operations['PostAccountsAccountCapabilitiesCapability'] + } + '/v1/accounts/{account}/external_accounts': { + /**

List external accounts for an account.

*/ + get: operations['GetAccountsAccountExternalAccounts'] + /**

Create an external account for a given account.

*/ + post: operations['PostAccountsAccountExternalAccounts'] + } + '/v1/accounts/{account}/external_accounts/{id}': { + /**

Retrieve a specified external account for a given account.

*/ + get: operations['GetAccountsAccountExternalAccountsId'] + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + post: operations['PostAccountsAccountExternalAccountsId'] + /**

Delete a specified external account for a given account.

*/ + delete: operations['DeleteAccountsAccountExternalAccountsId'] + } + '/v1/accounts/{account}/login_links': { + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + post: operations['PostAccountsAccountLoginLinks'] + } + '/v1/accounts/{account}/people': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountsAccountPeople'] + /**

Creates a new person.

*/ + post: operations['PostAccountsAccountPeople'] + } + '/v1/accounts/{account}/people/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountsAccountPeoplePerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountsAccountPeoplePerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountsAccountPeoplePerson'] + } + '/v1/accounts/{account}/persons': { + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + get: operations['GetAccountsAccountPersons'] + /**

Creates a new person.

*/ + post: operations['PostAccountsAccountPersons'] + } + '/v1/accounts/{account}/persons/{person}': { + /**

Retrieves an existing person.

*/ + get: operations['GetAccountsAccountPersonsPerson'] + /**

Updates an existing person.

*/ + post: operations['PostAccountsAccountPersonsPerson'] + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + delete: operations['DeleteAccountsAccountPersonsPerson'] + } + '/v1/accounts/{account}/reject': { + /** + *

With Connect, you may flag accounts as suspicious.

+ * + *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

+ */ + post: operations['PostAccountsAccountReject'] + } + '/v1/apple_pay/domains': { + /**

List apple pay domains.

*/ + get: operations['GetApplePayDomains'] + /**

Create an apple pay domain.

*/ + post: operations['PostApplePayDomains'] + } + '/v1/apple_pay/domains/{domain}': { + /**

Retrieve an apple pay domain.

*/ + get: operations['GetApplePayDomainsDomain'] + /**

Delete an apple pay domain.

*/ + delete: operations['DeleteApplePayDomainsDomain'] + } + '/v1/application_fees': { + /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ + get: operations['GetApplicationFees'] + } + '/v1/application_fees/{fee}/refunds/{id}': { + /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ + get: operations['GetApplicationFeesFeeRefundsId'] + /** + *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + post: operations['PostApplicationFeesFeeRefundsId'] + } + '/v1/application_fees/{id}': { + /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ + get: operations['GetApplicationFeesId'] + } + '/v1/application_fees/{id}/refund': { + post: operations['PostApplicationFeesIdRefund'] + } + '/v1/application_fees/{id}/refunds': { + /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + get: operations['GetApplicationFeesIdRefunds'] + /** + *

Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected.

+ * + *

You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded.

+ * + *

Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee.

+ */ + post: operations['PostApplicationFeesIdRefunds'] + } + '/v1/balance': { + /** + *

Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see Accounting for negative balances.

+ */ + get: operations['GetBalance'] + } + '/v1/balance_transactions': { + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + get: operations['GetBalanceTransactions'] + } + '/v1/balance_transactions/{id}': { + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + get: operations['GetBalanceTransactionsId'] + } + '/v1/balance/history': { + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + get: operations['GetBalanceHistory'] + } + '/v1/balance/history/{id}': { + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + get: operations['GetBalanceHistoryId'] + } + '/v1/billing_portal/configurations': { + /**

Returns a list of configurations that describe the functionality of the customer portal.

*/ + get: operations['GetBillingPortalConfigurations'] + /**

Creates a configuration that describes the functionality and behavior of a PortalSession

*/ + post: operations['PostBillingPortalConfigurations'] + } + '/v1/billing_portal/configurations/{configuration}': { + /**

Retrieves a configuration that describes the functionality of the customer portal.

*/ + get: operations['GetBillingPortalConfigurationsConfiguration'] + /**

Updates a configuration that describes the functionality of the customer portal.

*/ + post: operations['PostBillingPortalConfigurationsConfiguration'] + } + '/v1/billing_portal/sessions': { + /**

Creates a session of the customer portal.

*/ + post: operations['PostBillingPortalSessions'] + } + '/v1/bitcoin/receivers': { + /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ + get: operations['GetBitcoinReceivers'] + } + '/v1/bitcoin/receivers/{id}': { + /**

Retrieves the Bitcoin receiver with the given ID.

*/ + get: operations['GetBitcoinReceiversId'] + } + '/v1/bitcoin/receivers/{receiver}/transactions': { + /**

List bitcoin transacitons for a given receiver.

*/ + get: operations['GetBitcoinReceiversReceiverTransactions'] + } + '/v1/bitcoin/transactions': { + /**

List bitcoin transacitons for a given receiver.

*/ + get: operations['GetBitcoinTransactions'] + } + '/v1/charges': { + /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ + get: operations['GetCharges'] + /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ + post: operations['PostCharges'] + } + '/v1/charges/{charge}': { + /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ + get: operations['GetChargesCharge'] + /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostChargesCharge'] + } + '/v1/charges/{charge}/capture': { + /** + *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

+ * + *

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

+ */ + post: operations['PostChargesChargeCapture'] + } + '/v1/charges/{charge}/dispute': { + /**

Retrieve a dispute for a specified charge.

*/ + get: operations['GetChargesChargeDispute'] + post: operations['PostChargesChargeDispute'] + } + '/v1/charges/{charge}/dispute/close': { + post: operations['PostChargesChargeDisputeClose'] + } + '/v1/charges/{charge}/refund': { + /** + *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

+ * + *

Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged.

+ * + *

You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded.

+ * + *

Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge.

+ */ + post: operations['PostChargesChargeRefund'] + } + '/v1/charges/{charge}/refunds': { + /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + get: operations['GetChargesChargeRefunds'] + /**

Create a refund.

*/ + post: operations['PostChargesChargeRefunds'] + } + '/v1/charges/{charge}/refunds/{refund}': { + /**

Retrieves the details of an existing refund.

*/ + get: operations['GetChargesChargeRefundsRefund'] + /**

Update a specified refund.

*/ + post: operations['PostChargesChargeRefundsRefund'] + } + '/v1/checkout/sessions': { + /**

Returns a list of Checkout Sessions.

*/ + get: operations['GetCheckoutSessions'] + /**

Creates a Session object.

*/ + post: operations['PostCheckoutSessions'] + } + '/v1/checkout/sessions/{session}': { + /**

Retrieves a Session object.

*/ + get: operations['GetCheckoutSessionsSession'] + } + '/v1/checkout/sessions/{session}/expire': { + /** + *

A Session can be expired when it is in one of these statuses: open

+ * + *

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

+ */ + post: operations['PostCheckoutSessionsSessionExpire'] + } + '/v1/checkout/sessions/{session}/line_items': { + /**

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetCheckoutSessionsSessionLineItems'] + } + '/v1/country_specs': { + /**

Lists all Country Spec objects available in the API.

*/ + get: operations['GetCountrySpecs'] + } + '/v1/country_specs/{country}': { + /**

Returns a Country Spec for a given Country code.

*/ + get: operations['GetCountrySpecsCountry'] + } + '/v1/coupons': { + /**

Returns a list of your coupons.

*/ + get: operations['GetCoupons'] + /** + *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

+ * + *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

+ */ + post: operations['PostCoupons'] + } + '/v1/coupons/{coupon}': { + /**

Retrieves the coupon with the given ID.

*/ + get: operations['GetCouponsCoupon'] + /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ + post: operations['PostCouponsCoupon'] + /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ + delete: operations['DeleteCouponsCoupon'] + } + '/v1/credit_notes': { + /**

Returns a list of credit notes.

*/ + get: operations['GetCreditNotes'] + /** + *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + * in any combination of the following:

+ * + *
    + *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • + *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • + *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • + *
+ * + *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ * + *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount + * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

+ */ + post: operations['PostCreditNotes'] + } + '/v1/credit_notes/{credit_note}/lines': { + /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetCreditNotesCreditNoteLines'] + } + '/v1/credit_notes/{id}': { + /**

Retrieves the credit note object with the given identifier.

*/ + get: operations['GetCreditNotesId'] + /**

Updates an existing credit note.

*/ + post: operations['PostCreditNotesId'] + } + '/v1/credit_notes/{id}/void': { + /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ + post: operations['PostCreditNotesIdVoid'] + } + '/v1/credit_notes/preview': { + /**

Get a preview of a credit note without creating it.

*/ + get: operations['GetCreditNotesPreview'] + } + '/v1/credit_notes/preview/lines': { + /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetCreditNotesPreviewLines'] + } + '/v1/customers': { + /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ + get: operations['GetCustomers'] + /**

Creates a new customer object.

*/ + post: operations['PostCustomers'] + } + '/v1/customers/{customer}': { + /**

Retrieves a Customer object.

*/ + get: operations['GetCustomersCustomer'] + /** + *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

+ * + *

This request accepts mostly the same arguments as the customer creation call.

+ */ + post: operations['PostCustomersCustomer'] + /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ + delete: operations['DeleteCustomersCustomer'] + } + '/v1/customers/{customer}/balance_transactions': { + /**

Returns a list of transactions that updated the customer’s balances.

*/ + get: operations['GetCustomersCustomerBalanceTransactions'] + /**

Creates an immutable transaction that updates the customer’s credit balance.

*/ + post: operations['PostCustomersCustomerBalanceTransactions'] + } + '/v1/customers/{customer}/balance_transactions/{transaction}': { + /**

Retrieves a specific customer balance transaction that updated the customer’s balances.

*/ + get: operations['GetCustomersCustomerBalanceTransactionsTransaction'] + /**

Most credit balance transaction fields are immutable, but you may update its description and metadata.

*/ + post: operations['PostCustomersCustomerBalanceTransactionsTransaction'] + } + '/v1/customers/{customer}/bank_accounts': { + /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ + get: operations['GetCustomersCustomerBankAccounts'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerBankAccounts'] + } + '/v1/customers/{customer}/bank_accounts/{id}': { + /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ + get: operations['GetCustomersCustomerBankAccountsId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerBankAccountsId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerBankAccountsId'] + } + '/v1/customers/{customer}/bank_accounts/{id}/verify': { + /**

Verify a specified bank account for a given customer.

*/ + post: operations['PostCustomersCustomerBankAccountsIdVerify'] + } + '/v1/customers/{customer}/cards': { + /** + *

You can see a list of the cards belonging to a customer. + * Note that the 10 most recent sources are always available on the Customer object. + * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

+ */ + get: operations['GetCustomersCustomerCards'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerCards'] + } + '/v1/customers/{customer}/cards/{id}': { + /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ + get: operations['GetCustomersCustomerCardsId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerCardsId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerCardsId'] + } + '/v1/customers/{customer}/discount': { + get: operations['GetCustomersCustomerDiscount'] + /**

Removes the currently applied discount on a customer.

*/ + delete: operations['DeleteCustomersCustomerDiscount'] + } + '/v1/customers/{customer}/payment_methods': { + /**

Returns a list of PaymentMethods for a given Customer

*/ + get: operations['GetCustomersCustomerPaymentMethods'] + } + '/v1/customers/{customer}/sources': { + /**

List sources for a specified customer.

*/ + get: operations['GetCustomersCustomerSources'] + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + post: operations['PostCustomersCustomerSources'] + } + '/v1/customers/{customer}/sources/{id}': { + /**

Retrieve a specified source for a given customer.

*/ + get: operations['GetCustomersCustomerSourcesId'] + /**

Update a specified source for a given customer.

*/ + post: operations['PostCustomersCustomerSourcesId'] + /**

Delete a specified source for a given customer.

*/ + delete: operations['DeleteCustomersCustomerSourcesId'] + } + '/v1/customers/{customer}/sources/{id}/verify': { + /**

Verify a specified bank account for a given customer.

*/ + post: operations['PostCustomersCustomerSourcesIdVerify'] + } + '/v1/customers/{customer}/subscriptions': { + /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ + get: operations['GetCustomersCustomerSubscriptions'] + /**

Creates a new subscription on an existing customer.

*/ + post: operations['PostCustomersCustomerSubscriptions'] + } + '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}': { + /**

Retrieves the subscription with the given ID.

*/ + get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedId'] + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + post: operations['PostCustomersCustomerSubscriptionsSubscriptionExposedId'] + /** + *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedId'] + } + '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount': { + get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] + /**

Removes the currently applied discount on a customer.

*/ + delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] + } + '/v1/customers/{customer}/tax_ids': { + /**

Returns a list of tax IDs for a customer.

*/ + get: operations['GetCustomersCustomerTaxIds'] + /**

Creates a new TaxID object for a customer.

*/ + post: operations['PostCustomersCustomerTaxIds'] + } + '/v1/customers/{customer}/tax_ids/{id}': { + /**

Retrieves the TaxID object with the given identifier.

*/ + get: operations['GetCustomersCustomerTaxIdsId'] + /**

Deletes an existing TaxID object.

*/ + delete: operations['DeleteCustomersCustomerTaxIdsId'] + } + '/v1/disputes': { + /**

Returns a list of your disputes.

*/ + get: operations['GetDisputes'] + } + '/v1/disputes/{dispute}': { + /**

Retrieves the dispute with the given ID.

*/ + get: operations['GetDisputesDispute'] + /** + *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

+ * + *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

+ */ + post: operations['PostDisputesDispute'] + } + '/v1/disputes/{dispute}/close': { + /** + *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

+ * + *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

+ */ + post: operations['PostDisputesDisputeClose'] + } + '/v1/ephemeral_keys': { + /**

Creates a short-lived API key for a given resource.

*/ + post: operations['PostEphemeralKeys'] + } + '/v1/ephemeral_keys/{key}': { + /**

Invalidates a short-lived API key for a given resource.

*/ + delete: operations['DeleteEphemeralKeysKey'] + } + '/v1/events': { + /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ + get: operations['GetEvents'] + } + '/v1/events/{id}': { + /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ + get: operations['GetEventsId'] + } + '/v1/exchange_rates': { + /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ + get: operations['GetExchangeRates'] + } + '/v1/exchange_rates/{rate_id}': { + /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ + get: operations['GetExchangeRatesRateId'] + } + '/v1/file_links': { + /**

Returns a list of file links.

*/ + get: operations['GetFileLinks'] + /**

Creates a new file link object.

*/ + post: operations['PostFileLinks'] + } + '/v1/file_links/{link}': { + /**

Retrieves the file link with the given ID.

*/ + get: operations['GetFileLinksLink'] + /**

Updates an existing file link object. Expired links can no longer be updated.

*/ + post: operations['PostFileLinksLink'] + } + '/v1/files': { + /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ + get: operations['GetFiles'] + /** + *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

+ * + *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

+ */ + post: operations['PostFiles'] + } + '/v1/files/{file}': { + /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ + get: operations['GetFilesFile'] + } + '/v1/identity/verification_reports': { + /**

List all verification reports.

*/ + get: operations['GetIdentityVerificationReports'] + } + '/v1/identity/verification_reports/{report}': { + /**

Retrieves an existing VerificationReport

*/ + get: operations['GetIdentityVerificationReportsReport'] + } + '/v1/identity/verification_sessions': { + /**

Returns a list of VerificationSessions

*/ + get: operations['GetIdentityVerificationSessions'] + /** + *

Creates a VerificationSession object.

+ * + *

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

+ * + *

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

+ * + *

Related guide: Verify your users’ identity documents.

+ */ + post: operations['PostIdentityVerificationSessions'] + } + '/v1/identity/verification_sessions/{session}': { + /** + *

Retrieves the details of a VerificationSession that was previously created.

+ * + *

When the session status is requires_input, you can use this method to retrieve a valid + * client_secret or url to allow re-submission.

+ */ + get: operations['GetIdentityVerificationSessionsSession'] + /** + *

Updates a VerificationSession object.

+ * + *

When the session status is requires_input, you can use this method to update the + * verification check and options.

+ */ + post: operations['PostIdentityVerificationSessionsSession'] + } + '/v1/identity/verification_sessions/{session}/cancel': { + /** + *

A VerificationSession object can be canceled when it is in requires_input status.

+ * + *

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

+ */ + post: operations['PostIdentityVerificationSessionsSessionCancel'] + } + '/v1/identity/verification_sessions/{session}/redact': { + /** + *

Redact a VerificationSession to remove all collected information from Stripe. This will redact + * the VerificationSession and all objects related to it, including VerificationReports, Events, + * request logs, etc.

+ * + *

A VerificationSession object can be redacted when it is in requires_input or verified + * status. Redacting a VerificationSession in requires_action + * state will automatically cancel it.

+ * + *

The redaction process may take up to four days. When the redaction process is in progress, the + * VerificationSession’s redaction.status field will be set to processing; when the process is + * finished, it will change to redacted and an identity.verification_session.redacted event + * will be emitted.

+ * + *

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + * fields that contain personal data will be replaced by the string [redacted] or a similar + * placeholder. The metadata field will also be erased. Redacted objects cannot be updated or + * used for any purpose.

+ * + *

Learn more.

+ */ + post: operations['PostIdentityVerificationSessionsSessionRedact'] + } + '/v1/invoiceitems': { + /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ + get: operations['GetInvoiceitems'] + /**

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ + post: operations['PostInvoiceitems'] + } + '/v1/invoiceitems/{invoiceitem}': { + /**

Retrieves the invoice item with the given ID.

*/ + get: operations['GetInvoiceitemsInvoiceitem'] + /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ + post: operations['PostInvoiceitemsInvoiceitem'] + /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ + delete: operations['DeleteInvoiceitemsInvoiceitem'] + } + '/v1/invoices': { + /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ + get: operations['GetInvoices'] + /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + post: operations['PostInvoices'] + } + '/v1/invoices/{invoice}': { + /**

Retrieves the invoice with the given ID.

*/ + get: operations['GetInvoicesInvoice'] + /** + *

Draft invoices are fully editable. Once an invoice is finalized, + * monetary values, as well as collection_method, become uneditable.

+ * + *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or automatically reconciling invoices, pass + * auto_advance=false.

+ */ + post: operations['PostInvoicesInvoice'] + /**

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

*/ + delete: operations['DeleteInvoicesInvoice'] + } + '/v1/invoices/{invoice}/finalize': { + /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ + post: operations['PostInvoicesInvoiceFinalize'] + } + '/v1/invoices/{invoice}/lines': { + /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetInvoicesInvoiceLines'] + } + '/v1/invoices/{invoice}/mark_uncollectible': { + /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ + post: operations['PostInvoicesInvoiceMarkUncollectible'] + } + '/v1/invoices/{invoice}/pay': { + /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ + post: operations['PostInvoicesInvoicePay'] + } + '/v1/invoices/{invoice}/send': { + /** + *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

+ * + *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

+ */ + post: operations['PostInvoicesInvoiceSend'] + } + '/v1/invoices/{invoice}/void': { + /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ + post: operations['PostInvoicesInvoiceVoid'] + } + '/v1/invoices/upcoming': { + /** + *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

+ * + *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

+ * + *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

+ */ + get: operations['GetInvoicesUpcoming'] + } + '/v1/invoices/upcoming/lines': { + /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetInvoicesUpcomingLines'] + } + '/v1/issuer_fraud_records': { + /**

Returns a list of issuer fraud records.

*/ + get: operations['GetIssuerFraudRecords'] + } + '/v1/issuer_fraud_records/{issuer_fraud_record}': { + /** + *

Retrieves the details of an issuer fraud record that has previously been created.

+ * + *

Please refer to the issuer fraud record object reference for more details.

+ */ + get: operations['GetIssuerFraudRecordsIssuerFraudRecord'] + } + '/v1/issuing/authorizations': { + /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingAuthorizations'] + } + '/v1/issuing/authorizations/{authorization}': { + /**

Retrieves an Issuing Authorization object.

*/ + get: operations['GetIssuingAuthorizationsAuthorization'] + /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingAuthorizationsAuthorization'] + } + '/v1/issuing/authorizations/{authorization}/approve': { + /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ + post: operations['PostIssuingAuthorizationsAuthorizationApprove'] + } + '/v1/issuing/authorizations/{authorization}/decline': { + /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ + post: operations['PostIssuingAuthorizationsAuthorizationDecline'] + } + '/v1/issuing/cardholders': { + /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingCardholders'] + /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ + post: operations['PostIssuingCardholders'] + } + '/v1/issuing/cardholders/{cardholder}': { + /**

Retrieves an Issuing Cardholder object.

*/ + get: operations['GetIssuingCardholdersCardholder'] + /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingCardholdersCardholder'] + } + '/v1/issuing/cards': { + /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingCards'] + /**

Creates an Issuing Card object.

*/ + post: operations['PostIssuingCards'] + } + '/v1/issuing/cards/{card}': { + /**

Retrieves an Issuing Card object.

*/ + get: operations['GetIssuingCardsCard'] + /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingCardsCard'] + } + '/v1/issuing/disputes': { + /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingDisputes'] + /**

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

*/ + post: operations['PostIssuingDisputes'] + } + '/v1/issuing/disputes/{dispute}': { + /**

Retrieves an Issuing Dispute object.

*/ + get: operations['GetIssuingDisputesDispute'] + /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

*/ + post: operations['PostIssuingDisputesDispute'] + } + '/v1/issuing/disputes/{dispute}/submit': { + /**

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

*/ + post: operations['PostIssuingDisputesDisputeSubmit'] + } + '/v1/issuing/settlements': { + /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingSettlements'] + } + '/v1/issuing/settlements/{settlement}': { + /**

Retrieves an Issuing Settlement object.

*/ + get: operations['GetIssuingSettlementsSettlement'] + /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingSettlementsSettlement'] + } + '/v1/issuing/transactions': { + /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetIssuingTransactions'] + } + '/v1/issuing/transactions/{transaction}': { + /**

Retrieves an Issuing Transaction object.

*/ + get: operations['GetIssuingTransactionsTransaction'] + /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostIssuingTransactionsTransaction'] + } + '/v1/mandates/{mandate}': { + /**

Retrieves a Mandate object.

*/ + get: operations['GetMandatesMandate'] + } + '/v1/order_returns': { + /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ + get: operations['GetOrderReturns'] + } + '/v1/order_returns/{id}': { + /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ + get: operations['GetOrderReturnsId'] + } + '/v1/orders': { + /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ + get: operations['GetOrders'] + /**

Creates a new order object.

*/ + post: operations['PostOrders'] + } + '/v1/orders/{id}': { + /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ + get: operations['GetOrdersId'] + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostOrdersId'] + } + '/v1/orders/{id}/pay': { + /**

Pay an order by providing a source to create a payment.

*/ + post: operations['PostOrdersIdPay'] + } + '/v1/orders/{id}/returns': { + /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ + post: operations['PostOrdersIdReturns'] + } + '/v1/payment_intents': { + /**

Returns a list of PaymentIntents.

*/ + get: operations['GetPaymentIntents'] + /** + *

Creates a PaymentIntent object.

+ * + *

After the PaymentIntent is created, attach a payment method and confirm + * to continue the payment. You can read more about the different payment flows + * available via the Payment Intents API here.

+ * + *

When confirm=true is used during creation, it is equivalent to creating + * and confirming the PaymentIntent in the same call. You may use any parameters + * available in the confirm API when confirm=true + * is supplied.

+ */ + post: operations['PostPaymentIntents'] + } + '/v1/payment_intents/{intent}': { + /** + *

Retrieves the details of a PaymentIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

+ */ + get: operations['GetPaymentIntentsIntent'] + /** + *

Updates properties on a PaymentIntent object without confirming.

+ * + *

Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the payment_method will + * always require you to confirm the PaymentIntent again. If you prefer to + * update and confirm at the same time, we recommend updating properties via + * the confirm API instead.

+ */ + post: operations['PostPaymentIntentsIntent'] + } + '/v1/payment_intents/{intent}/cancel': { + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ */ + post: operations['PostPaymentIntentsIntentCancel'] + } + '/v1/payment_intents/{intent}/capture': { + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

+ */ + post: operations['PostPaymentIntentsIntentCapture'] + } + '/v1/payment_intents/{intent}/confirm': { + /** + *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

+ * + *

If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the requires_action status and + * suggest additional actions via next_action. If payment fails, + * the PaymentIntent will transition to the requires_payment_method status. If + * payment succeeds, the PaymentIntent will transition to the succeeded + * status (or requires_capture, if capture_method is set to manual).

+ * + *

If the confirmation_method is automatic, payment may be attempted + * using our client SDKs + * and the PaymentIntent’s client_secret. + * After next_actions are handled by the client, no additional + * confirmation is required to complete the payment.

+ * + *

If the confirmation_method is manual, all payment attempts must be + * initiated using a secret key. + * If any actions are required for the payment, the PaymentIntent will + * return to the requires_confirmation state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. Read the expanded documentation + * to learn more about manual confirmation.

+ */ + post: operations['PostPaymentIntentsIntentConfirm'] + } + '/v1/payment_intents/{intent}/verify_microdeposits': { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] + } + '/v1/payment_links': { + /**

Returns a list of your payment links.

*/ + get: operations['GetPaymentLinks'] + /**

Creates a payment link.

*/ + post: operations['PostPaymentLinks'] + } + '/v1/payment_links/{payment_link}': { + /**

Retrieve a payment link.

*/ + get: operations['GetPaymentLinksPaymentLink'] + /**

Updates a payment link.

*/ + post: operations['PostPaymentLinksPaymentLink'] + } + '/v1/payment_links/{payment_link}/line_items': { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetPaymentLinksPaymentLinkLineItems'] + } + '/v1/payment_methods': { + /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + get: operations['GetPaymentMethods'] + /** + *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + post: operations['PostPaymentMethods'] + } + '/v1/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object.

*/ + get: operations['GetPaymentMethodsPaymentMethod'] + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + post: operations['PostPaymentMethodsPaymentMethod'] + } + '/v1/payment_methods/{payment_method}/attach': { + /** + *

Attaches a PaymentMethod object to a Customer.

+ * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent + * or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the + * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. + * See Optimizing cards for future payments for more information about setting up future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + post: operations['PostPaymentMethodsPaymentMethodAttach'] + } + '/v1/payment_methods/{payment_method}/detach': { + /**

Detaches a PaymentMethod object from a Customer.

*/ + post: operations['PostPaymentMethodsPaymentMethodDetach'] + } + '/v1/payouts': { + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + get: operations['GetPayouts'] + /** + *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

+ * + *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

+ * + *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

+ */ + post: operations['PostPayouts'] + } + '/v1/payouts/{payout}': { + /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ + get: operations['GetPayoutsPayout'] + /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ + post: operations['PostPayoutsPayout'] + } + '/v1/payouts/{payout}/cancel': { + /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ + post: operations['PostPayoutsPayoutCancel'] + } + '/v1/payouts/{payout}/reverse': { + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + post: operations['PostPayoutsPayoutReverse'] + } + '/v1/plans': { + /**

Returns a list of your plans.

*/ + get: operations['GetPlans'] + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + post: operations['PostPlans'] + } + '/v1/plans/{plan}': { + /**

Retrieves the plan with the given ID.

*/ + get: operations['GetPlansPlan'] + /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ + post: operations['PostPlansPlan'] + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + delete: operations['DeletePlansPlan'] + } + '/v1/prices': { + /**

Returns a list of your prices.

*/ + get: operations['GetPrices'] + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + post: operations['PostPrices'] + } + '/v1/prices/{price}': { + /**

Retrieves the price with the given ID.

*/ + get: operations['GetPricesPrice'] + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + post: operations['PostPricesPrice'] + } + '/v1/products': { + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + get: operations['GetProducts'] + /**

Creates a new product object.

*/ + post: operations['PostProducts'] + } + '/v1/products/{id}': { + /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ + get: operations['GetProductsId'] + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostProductsId'] + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + delete: operations['DeleteProductsId'] + } + '/v1/promotion_codes': { + /**

Returns a list of your promotion codes.

*/ + get: operations['GetPromotionCodes'] + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + post: operations['PostPromotionCodes'] + } + '/v1/promotion_codes/{promotion_code}': { + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + get: operations['GetPromotionCodesPromotionCode'] + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + post: operations['PostPromotionCodesPromotionCode'] + } + '/v1/quotes': { + /**

Returns a list of your quotes.

*/ + get: operations['GetQuotes'] + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + post: operations['PostQuotes'] + } + '/v1/quotes/{quote}': { + /**

Retrieves the quote with the given ID.

*/ + get: operations['GetQuotesQuote'] + /**

A quote models prices and services for a customer.

*/ + post: operations['PostQuotesQuote'] + } + '/v1/quotes/{quote}/accept': { + /**

Accepts the specified quote.

*/ + post: operations['PostQuotesQuoteAccept'] + } + '/v1/quotes/{quote}/cancel': { + /**

Cancels the quote.

*/ + post: operations['PostQuotesQuoteCancel'] + } + '/v1/quotes/{quote}/computed_upfront_line_items': { + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ + get: operations['GetQuotesQuoteComputedUpfrontLineItems'] + } + '/v1/quotes/{quote}/finalize': { + /**

Finalizes the quote.

*/ + post: operations['PostQuotesQuoteFinalize'] + } + '/v1/quotes/{quote}/line_items': { + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetQuotesQuoteLineItems'] + } + '/v1/quotes/{quote}/pdf': { + /**

Download the PDF for a finalized quote

*/ + get: operations['GetQuotesQuotePdf'] + } + '/v1/radar/early_fraud_warnings': { + /**

Returns a list of early fraud warnings.

*/ + get: operations['GetRadarEarlyFraudWarnings'] + } + '/v1/radar/early_fraud_warnings/{early_fraud_warning}': { + /** + *

Retrieves the details of an early fraud warning that has previously been created.

+ * + *

Please refer to the early fraud warning object reference for more details.

+ */ + get: operations['GetRadarEarlyFraudWarningsEarlyFraudWarning'] + } + '/v1/radar/value_list_items': { + /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetRadarValueListItems'] + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + post: operations['PostRadarValueListItems'] + } + '/v1/radar/value_list_items/{item}': { + /**

Retrieves a ValueListItem object.

*/ + get: operations['GetRadarValueListItemsItem'] + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + delete: operations['DeleteRadarValueListItemsItem'] + } + '/v1/radar/value_lists': { + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetRadarValueLists'] + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + post: operations['PostRadarValueLists'] + } + '/v1/radar/value_lists/{value_list}': { + /**

Retrieves a ValueList object.

*/ + get: operations['GetRadarValueListsValueList'] + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + post: operations['PostRadarValueListsValueList'] + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + delete: operations['DeleteRadarValueListsValueList'] + } + '/v1/recipients': { + /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ + get: operations['GetRecipients'] + /** + *

Creates a new Recipient object and verifies the recipient’s identity. + * Also verifies the recipient’s bank account information or debit card, if either is provided.

+ */ + post: operations['PostRecipients'] + } + '/v1/recipients/{id}': { + /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ + get: operations['GetRecipientsId'] + /** + *

Updates the specified recipient by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged.

+ * + *

If you update the name or tax ID, the identity verification will automatically be rerun. + * If you update the bank account, the bank account validation will automatically be rerun.

+ */ + post: operations['PostRecipientsId'] + /**

Permanently deletes a recipient. It cannot be undone.

*/ + delete: operations['DeleteRecipientsId'] + } + '/v1/refunds': { + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + get: operations['GetRefunds'] + /**

Create a refund.

*/ + post: operations['PostRefunds'] + } + '/v1/refunds/{refund}': { + /**

Retrieves the details of an existing refund.

*/ + get: operations['GetRefundsRefund'] + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + post: operations['PostRefundsRefund'] + } + '/v1/reporting/report_runs': { + /**

Returns a list of Report Runs, with the most recent appearing first.

*/ + get: operations['GetReportingReportRuns'] + /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ + post: operations['PostReportingReportRuns'] + } + '/v1/reporting/report_runs/{report_run}': { + /**

Retrieves the details of an existing Report Run.

*/ + get: operations['GetReportingReportRunsReportRun'] + } + '/v1/reporting/report_types': { + /**

Returns a full list of Report Types.

*/ + get: operations['GetReportingReportTypes'] + } + '/v1/reporting/report_types/{report_type}': { + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + get: operations['GetReportingReportTypesReportType'] + } + '/v1/reviews': { + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + get: operations['GetReviews'] + } + '/v1/reviews/{review}': { + /**

Retrieves a Review object.

*/ + get: operations['GetReviewsReview'] + } + '/v1/reviews/{review}/approve': { + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + post: operations['PostReviewsReviewApprove'] + } + '/v1/setup_attempts': { + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + get: operations['GetSetupAttempts'] + } + '/v1/setup_intents': { + /**

Returns a list of SetupIntents.

*/ + get: operations['GetSetupIntents'] + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + post: operations['PostSetupIntents'] + } + '/v1/setup_intents/{intent}': { + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + get: operations['GetSetupIntentsIntent'] + /**

Updates a SetupIntent object.

*/ + post: operations['PostSetupIntentsIntent'] + } + '/v1/setup_intents/{intent}/cancel': { + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + post: operations['PostSetupIntentsIntentCancel'] + } + '/v1/setup_intents/{intent}/confirm': { + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + post: operations['PostSetupIntentsIntentConfirm'] + } + '/v1/setup_intents/{intent}/verify_microdeposits': { + /**

Verifies microdeposits on a SetupIntent object.

*/ + post: operations['PostSetupIntentsIntentVerifyMicrodeposits'] + } + '/v1/shipping_rates': { + /**

Returns a list of your shipping rates.

*/ + get: operations['GetShippingRates'] + /**

Creates a new shipping rate object.

*/ + post: operations['PostShippingRates'] + } + '/v1/shipping_rates/{shipping_rate_token}': { + /**

Returns the shipping rate object with the given ID.

*/ + get: operations['GetShippingRatesShippingRateToken'] + /**

Updates an existing shipping rate object.

*/ + post: operations['PostShippingRatesShippingRateToken'] + } + '/v1/sigma/scheduled_query_runs': { + /**

Returns a list of scheduled query runs.

*/ + get: operations['GetSigmaScheduledQueryRuns'] + } + '/v1/sigma/scheduled_query_runs/{scheduled_query_run}': { + /**

Retrieves the details of an scheduled query run.

*/ + get: operations['GetSigmaScheduledQueryRunsScheduledQueryRun'] + } + '/v1/skus': { + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + get: operations['GetSkus'] + /**

Creates a new SKU associated with a product.

*/ + post: operations['PostSkus'] + } + '/v1/skus/{id}': { + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + get: operations['GetSkusId'] + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + post: operations['PostSkusId'] + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + delete: operations['DeleteSkusId'] + } + '/v1/sources': { + /**

Creates a new source object.

*/ + post: operations['PostSources'] + } + '/v1/sources/{source}': { + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + get: operations['GetSourcesSource'] + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + post: operations['PostSourcesSource'] + } + '/v1/sources/{source}/mandate_notifications/{mandate_notification}': { + /**

Retrieves a new Source MandateNotification.

*/ + get: operations['GetSourcesSourceMandateNotificationsMandateNotification'] + } + '/v1/sources/{source}/source_transactions': { + /**

List source transactions for a given source.

*/ + get: operations['GetSourcesSourceSourceTransactions'] + } + '/v1/sources/{source}/source_transactions/{source_transaction}': { + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + get: operations['GetSourcesSourceSourceTransactionsSourceTransaction'] + } + '/v1/sources/{source}/verify': { + /**

Verify a given source.

*/ + post: operations['PostSourcesSourceVerify'] + } + '/v1/subscription_items': { + /**

Returns a list of your subscription items for a given subscription.

*/ + get: operations['GetSubscriptionItems'] + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + post: operations['PostSubscriptionItems'] + } + '/v1/subscription_items/{item}': { + /**

Retrieves the subscription item with the given ID.

*/ + get: operations['GetSubscriptionItemsItem'] + /**

Updates the plan or quantity of an item on a current subscription.

*/ + post: operations['PostSubscriptionItemsItem'] + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + delete: operations['DeleteSubscriptionItemsItem'] + } + '/v1/subscription_items/{subscription_item}/usage_record_summaries': { + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + get: operations['GetSubscriptionItemsSubscriptionItemUsageRecordSummaries'] + } + '/v1/subscription_items/{subscription_item}/usage_records': { + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + post: operations['PostSubscriptionItemsSubscriptionItemUsageRecords'] + } + '/v1/subscription_schedules': { + /**

Retrieves the list of your subscription schedules.

*/ + get: operations['GetSubscriptionSchedules'] + /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ + post: operations['PostSubscriptionSchedules'] + } + '/v1/subscription_schedules/{schedule}': { + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + get: operations['GetSubscriptionSchedulesSchedule'] + /**

Updates an existing subscription schedule.

*/ + post: operations['PostSubscriptionSchedulesSchedule'] + } + '/v1/subscription_schedules/{schedule}/cancel': { + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + post: operations['PostSubscriptionSchedulesScheduleCancel'] + } + '/v1/subscription_schedules/{schedule}/release': { + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + post: operations['PostSubscriptionSchedulesScheduleRelease'] + } + '/v1/subscriptions': { + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + get: operations['GetSubscriptions'] + /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ + post: operations['PostSubscriptions'] + } + '/v1/subscriptions/{subscription_exposed_id}': { + /**

Retrieves the subscription with the given ID.

*/ + get: operations['GetSubscriptionsSubscriptionExposedId'] + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + post: operations['PostSubscriptionsSubscriptionExposedId'] + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + delete: operations['DeleteSubscriptionsSubscriptionExposedId'] + } + '/v1/subscriptions/{subscription_exposed_id}/discount': { + /**

Removes the currently applied discount on a subscription.

*/ + delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] + } + '/v1/tax_codes': { + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + get: operations['GetTaxCodes'] + } + '/v1/tax_codes/{id}': { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + get: operations['GetTaxCodesId'] + } + '/v1/tax_rates': { + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + get: operations['GetTaxRates'] + /**

Creates a new tax rate.

*/ + post: operations['PostTaxRates'] + } + '/v1/tax_rates/{tax_rate}': { + /**

Retrieves a tax rate with the given ID

*/ + get: operations['GetTaxRatesTaxRate'] + /**

Updates an existing tax rate.

*/ + post: operations['PostTaxRatesTaxRate'] + } + '/v1/terminal/connection_tokens': { + /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ + post: operations['PostTerminalConnectionTokens'] + } + '/v1/terminal/locations': { + /**

Returns a list of Location objects.

*/ + get: operations['GetTerminalLocations'] + /** + *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

+ */ + post: operations['PostTerminalLocations'] + } + '/v1/terminal/locations/{location}': { + /**

Retrieves a Location object.

*/ + get: operations['GetTerminalLocationsLocation'] + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostTerminalLocationsLocation'] + /**

Deletes a Location object.

*/ + delete: operations['DeleteTerminalLocationsLocation'] + } + '/v1/terminal/readers': { + /**

Returns a list of Reader objects.

*/ + get: operations['GetTerminalReaders'] + /**

Creates a new Reader object.

*/ + post: operations['PostTerminalReaders'] + } + '/v1/terminal/readers/{reader}': { + /**

Retrieves a Reader object.

*/ + get: operations['GetTerminalReadersReader'] + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + post: operations['PostTerminalReadersReader'] + /**

Deletes a Reader object.

*/ + delete: operations['DeleteTerminalReadersReader'] + } + '/v1/tokens': { + /** + *

Creates a single-use token that represents a bank account’s details. + * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

+ */ + post: operations['PostTokens'] + } + '/v1/tokens/{token}': { + /**

Retrieves the token with the given ID.

*/ + get: operations['GetTokensToken'] + } + '/v1/topups': { + /**

Returns a list of top-ups.

*/ + get: operations['GetTopups'] + /**

Top up the balance of an account

*/ + post: operations['PostTopups'] + } + '/v1/topups/{topup}': { + /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ + get: operations['GetTopupsTopup'] + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + post: operations['PostTopupsTopup'] + } + '/v1/topups/{topup}/cancel': { + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + post: operations['PostTopupsTopupCancel'] + } + '/v1/transfers': { + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + get: operations['GetTransfers'] + /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ + post: operations['PostTransfers'] + } + '/v1/transfers/{id}/reversals': { + /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ + get: operations['GetTransfersIdReversals'] + /** + *

When you create a new reversal, you must specify a transfer to create it on.

+ * + *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

+ * + *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

+ */ + post: operations['PostTransfersIdReversals'] + } + '/v1/transfers/{transfer}': { + /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ + get: operations['GetTransfersTransfer'] + /** + *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts only metadata as an argument.

+ */ + post: operations['PostTransfersTransfer'] + } + '/v1/transfers/{transfer}/reversals/{id}': { + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + get: operations['GetTransfersTransferReversalsId'] + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + post: operations['PostTransfersTransferReversalsId'] + } + '/v1/webhook_endpoints': { + /**

Returns a list of your webhook endpoints.

*/ + get: operations['GetWebhookEndpoints'] + /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ + post: operations['PostWebhookEndpoints'] + } + '/v1/webhook_endpoints/{webhook_endpoint}': { + /**

Retrieves the webhook endpoint with the given ID.

*/ + get: operations['GetWebhookEndpointsWebhookEndpoint'] + /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ + post: operations['PostWebhookEndpointsWebhookEndpoint'] + /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ + delete: operations['DeleteWebhookEndpointsWebhookEndpoint'] + } +} + +export interface components { + schemas: { + /** + * Account + * @description This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current e-mail address or if the account is + * enabled yet to make live charges. + * + * Some properties, marked below, are available only to platforms that want to + * [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts). + */ + account: { + /** @description Business information about the account. */ + business_profile?: components['schemas']['account_business_profile'] | null + /** + * @description The business type. + * @enum {string|null} + */ + business_type?: ('company' | 'government_entity' | 'individual' | 'non_profit') | null + capabilities?: components['schemas']['account_capabilities'] + /** @description Whether the account can create live charges. */ + charges_enabled?: boolean + company?: components['schemas']['legal_entity_company'] + controller?: components['schemas']['account_unification_account_controller'] + /** @description The account's country. */ + country?: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created?: number + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** @description Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. */ + details_submitted?: boolean + /** @description An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. */ + email?: string | null + /** + * ExternalAccountList + * @description External accounts (bank accounts and debit cards) currently attached to this account + */ + external_accounts?: { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'])[] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + future_requirements?: components['schemas']['account_future_requirements'] + /** @description Unique identifier for the object. */ + id: string + individual?: components['schemas']['person'] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account' + /** @description Whether Stripe can send payouts to this account. */ + payouts_enabled?: boolean + requirements?: components['schemas']['account_requirements'] + /** @description Options for customizing how the account functions within Stripe. */ + settings?: components['schemas']['account_settings'] | null + tos_acceptance?: components['schemas']['account_tos_acceptance'] + /** + * @description The Stripe account type. Can be `standard`, `express`, or `custom`. + * @enum {string} + */ + type?: 'custom' | 'express' | 'standard' + } + /** AccountBacsDebitPaymentsSettings */ + account_bacs_debit_payments_settings: { + /** @description The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor. */ + display_name?: string + } + /** AccountBrandingSettings */ + account_branding_settings: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. */ + icon?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. */ + logo?: (string | components['schemas']['file']) | null + /** @description A CSS hex color value representing the primary branding color for this account */ + primary_color?: string | null + /** @description A CSS hex color value representing the secondary branding color for this account */ + secondary_color?: string | null + } + /** AccountBusinessProfile */ + account_business_profile: { + /** @description [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. */ + mcc?: string | null + /** @description The customer-facing business name. */ + name?: string | null + /** @description Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ + product_description?: string | null + /** @description A publicly available mailing address for sending support issues to. */ + support_address?: components['schemas']['address'] | null + /** @description A publicly available email address for sending support issues to. */ + support_email?: string | null + /** @description A publicly available phone number to call with support issues. */ + support_phone?: string | null + /** @description A publicly available website for handling support issues. */ + support_url?: string | null + /** @description The business's publicly available website. */ + url?: string | null + } + /** AccountCapabilities */ + account_capabilities: { + /** + * @description The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + * @enum {string} + */ + acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + * @enum {string} + */ + afterpay_clearpay_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + * @enum {string} + */ + au_becs_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + * @enum {string} + */ + bacs_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + * @enum {string} + */ + bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + * @enum {string} + */ + boleto_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + * @enum {string} + */ + card_issuing?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + * @enum {string} + */ + card_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + * @enum {string} + */ + cartes_bancaires_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + * @enum {string} + */ + eps_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + * @enum {string} + */ + fpx_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + * @enum {string} + */ + giropay_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + * @enum {string} + */ + grabpay_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + * @enum {string} + */ + ideal_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + * @enum {string} + */ + jcb_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + * @enum {string} + */ + klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the legacy payments capability of the account. + * @enum {string} + */ + legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + * @enum {string} + */ + oxxo_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + * @enum {string} + */ + p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + * @enum {string} + */ + sepa_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + * @enum {string} + */ + sofort_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the tax reporting 1099-K (US) capability of the account. + * @enum {string} + */ + tax_reporting_us_1099_k?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the tax reporting 1099-MISC (US) capability of the account. + * @enum {string} + */ + tax_reporting_us_1099_misc?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + * @enum {string} + */ + transfers?: 'active' | 'inactive' | 'pending' + } + /** AccountCapabilityFutureRequirements */ + account_capability_future_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** + * Format: unix-time + * @description Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + */ + current_deadline?: number | null + /** @description Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. */ + currently_due: string[] + /** @description This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. */ + disabled_reason?: string | null + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: components['schemas']['account_requirements_error'][] + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. */ + eventually_due: string[] + /** @description Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ + pending_verification: string[] + } + /** AccountCapabilityRequirements */ + account_capability_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** + * Format: unix-time + * @description Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. + */ + current_deadline?: number | null + /** @description Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. */ + currently_due: string[] + /** + * @description If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. + * + * `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service: + * + * - [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses) + * + * If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance. + */ + disabled_reason?: string | null + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: components['schemas']['account_requirements_error'][] + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. */ + eventually_due: string[] + /** @description Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ + pending_verification: string[] + } + /** AccountCardIssuingSettings */ + account_card_issuing_settings: { + tos_acceptance?: components['schemas']['card_issuing_account_terms_of_service'] + } + /** AccountCardPaymentsSettings */ + account_card_payments_settings: { + decline_on?: components['schemas']['account_decline_charge_on'] + /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix?: string | null + } + /** AccountDashboardSettings */ + account_dashboard_settings: { + /** @description The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ + display_name?: string | null + /** @description The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). */ + timezone?: string | null + } + /** AccountDeclineChargeOn */ + account_decline_charge_on: { + /** @description Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. */ + avs_failure: boolean + /** @description Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. */ + cvc_failure: boolean + } + /** AccountFutureRequirements */ + account_future_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** + * Format: unix-time + * @description Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + */ + current_deadline?: number | null + /** @description Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. */ + currently_due?: string[] | null + /** @description This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. */ + disabled_reason?: string | null + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors?: components['schemas']['account_requirements_error'][] | null + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. */ + eventually_due?: string[] | null + /** @description Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ + past_due?: string[] | null + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ + pending_verification?: string[] | null + } + /** + * AccountLink + * @description Account Links are the means by which a Connect platform grants a connected account permission to access + * Stripe-hosted applications, such as Connect Onboarding. + * + * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding). + */ + account_link: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Format: unix-time + * @description The timestamp at which this account link will expire. + */ + expires_at: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account_link' + /** @description The URL for the account link. */ + url: string + } + /** AccountPaymentsSettings */ + account_payments_settings: { + /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. */ + statement_descriptor?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) */ + statement_descriptor_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ + statement_descriptor_kanji?: string | null + } + /** AccountPayoutSettings */ + account_payout_settings: { + /** @description A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`. */ + debit_negative_balances: boolean + schedule: components['schemas']['transfer_schedule'] + /** @description The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. */ + statement_descriptor?: string | null + } + /** AccountRequirements */ + account_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** + * Format: unix-time + * @description Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + */ + current_deadline?: number | null + /** @description Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ + currently_due?: string[] | null + /** @description If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. */ + disabled_reason?: string | null + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors?: components['schemas']['account_requirements_error'][] | null + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. */ + eventually_due?: string[] | null + /** @description Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. */ + past_due?: string[] | null + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ + pending_verification?: string[] | null + } + /** AccountRequirementsAlternative */ + account_requirements_alternative: { + /** @description Fields that can be provided to satisfy all fields in `original_fields_due`. */ + alternative_fields_due: string[] + /** @description Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. */ + original_fields_due: string[] + } + /** AccountRequirementsError */ + account_requirements_error: { + /** + * @description The code for the type of error. + * @enum {string} + */ + code: + | 'invalid_address_city_state_postal_code' + | 'invalid_street_address' + | 'invalid_value_other' + | 'verification_document_address_mismatch' + | 'verification_document_address_missing' + | 'verification_document_corrupt' + | 'verification_document_country_not_supported' + | 'verification_document_dob_mismatch' + | 'verification_document_duplicate_type' + | 'verification_document_expired' + | 'verification_document_failed_copy' + | 'verification_document_failed_greyscale' + | 'verification_document_failed_other' + | 'verification_document_failed_test_mode' + | 'verification_document_fraudulent' + | 'verification_document_id_number_mismatch' + | 'verification_document_id_number_missing' + | 'verification_document_incomplete' + | 'verification_document_invalid' + | 'verification_document_issue_or_expiry_date_missing' + | 'verification_document_manipulated' + | 'verification_document_missing_back' + | 'verification_document_missing_front' + | 'verification_document_name_mismatch' + | 'verification_document_name_missing' + | 'verification_document_nationality_mismatch' + | 'verification_document_not_readable' + | 'verification_document_not_signed' + | 'verification_document_not_uploaded' + | 'verification_document_photo_mismatch' + | 'verification_document_too_large' + | 'verification_document_type_not_supported' + | 'verification_failed_address_match' + | 'verification_failed_business_iec_number' + | 'verification_failed_document_match' + | 'verification_failed_id_number_match' + | 'verification_failed_keyed_identity' + | 'verification_failed_keyed_match' + | 'verification_failed_name_match' + | 'verification_failed_other' + | 'verification_failed_tax_id_match' + | 'verification_failed_tax_id_not_issued' + | 'verification_missing_executives' + | 'verification_missing_owners' + | 'verification_requires_additional_memorandum_of_associations' + /** @description An informative message that indicates the error type and provides additional details about the error. */ + reason: string + /** @description The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ + requirement: string + } + /** AccountSepaDebitPaymentsSettings */ + account_sepa_debit_payments_settings: { + /** @description SEPA creditor identifier that identifies the company making the payment. */ + creditor_id?: string + } + /** AccountSettings */ + account_settings: { + bacs_debit_payments?: components['schemas']['account_bacs_debit_payments_settings'] + branding: components['schemas']['account_branding_settings'] + card_issuing?: components['schemas']['account_card_issuing_settings'] + card_payments: components['schemas']['account_card_payments_settings'] + dashboard: components['schemas']['account_dashboard_settings'] + payments: components['schemas']['account_payments_settings'] + payouts?: components['schemas']['account_payout_settings'] + sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + } + /** AccountTOSAcceptance */ + account_tos_acceptance: { + /** + * Format: unix-time + * @description The Unix timestamp marking when the account representative accepted their service agreement + */ + date?: number | null + /** @description The IP address from which the account representative accepted their service agreement */ + ip?: string | null + /** @description The user's service agreement type */ + service_agreement?: string + /** @description The user agent of the browser from which the account representative accepted their service agreement */ + user_agent?: string | null + } + /** AccountUnificationAccountController */ + account_unification_account_controller: { + /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ + is_controller?: boolean + /** + * @description The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + * @enum {string} + */ + type: 'account' | 'application' + } + /** Address */ + address: { + /** @description City, district, suburb, town, or village. */ + city?: string | null + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string | null + /** @description Address line 1 (e.g., street, PO Box, or company name). */ + line1?: string | null + /** @description Address line 2 (e.g., apartment, suite, unit, or building). */ + line2?: string | null + /** @description ZIP or postal code. */ + postal_code?: string | null + /** @description State, county, province, or region. */ + state?: string | null + } + /** AlipayAccount */ + alipay_account: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The ID of the customer associated with this Alipay Account. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ + fingerprint: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'alipay_account' + /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ + payment_amount?: number | null + /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ + payment_currency?: string | null + /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ + reusable: boolean + /** @description Whether this Alipay account object has ever been used for a payment. */ + used: boolean + /** @description The username for the Alipay account. */ + username: string + } + /** APIErrors */ + api_errors: { + /** @description For card errors, the ID of the failed charge. */ + charge?: string + /** @description For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ + code?: string + /** @description For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. */ + decline_code?: string + /** @description A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ + doc_url?: string + /** @description A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ + message?: string + /** @description If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */ + param?: string + payment_intent?: components['schemas']['payment_intent'] + payment_method?: components['schemas']['payment_method'] + /** @description If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. */ + payment_method_type?: string + setup_intent?: components['schemas']['setup_intent'] + /** @description The source object for errors returned on a request involving a source. */ + source?: components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'] + /** + * @description The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + * @enum {string} + */ + type: 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error' + } + /** ApplePayDomain */ + apple_pay_domain: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + domain_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apple_pay_domain' + } + /** Application */ + application: { + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the application. */ + name?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'application' + } + /** PlatformFee */ + application_fee: { + /** @description ID of the Stripe account this fee was taken from. */ + account: string | components['schemas']['account'] + /** @description Amount earned, in %s. */ + amount: number + /** @description Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ + amount_refunded: number + /** @description ID of the Connect application that earned the fee. */ + application: string | components['schemas']['application'] + /** @description Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** @description ID of the charge that the application fee was taken from. */ + charge: string | components['schemas']['charge'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'application_fee' + /** @description ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ + originating_transaction?: (string | components['schemas']['charge']) | null + /** @description Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ + refunded: boolean + /** + * FeeRefundList + * @description A list of refunds that have been applied to the fee. + */ + refunds: { + /** @description Details about each object. */ + data: components['schemas']['fee_refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** AutomaticTax */ + automatic_tax: { + /** @description Whether Stripe automatically computes tax on this invoice. */ + enabled: boolean + /** + * @description The status of the most recent automated tax calculation for this invoice. + * @enum {string|null} + */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** + * Balance + * @description This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. + * + * You can also retrieve the balance history, which contains a list of + * [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance + * (charges, payouts, and so forth). + * + * The available and pending amounts for each currency are broken down further by + * payment source types. + * + * Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + */ + balance: { + /** @description Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property. */ + available: components['schemas']['balance_amount'][] + /** @description Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property. */ + connect_reserved?: components['schemas']['balance_amount'][] + /** @description Funds that can be paid out using Instant Payouts. */ + instant_available?: components['schemas']['balance_amount'][] + issuing?: components['schemas']['balance_detail'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'balance' + /** @description Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. */ + pending: components['schemas']['balance_amount'][] + } + /** BalanceAmount */ + balance_amount: { + /** @description Balance amount. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + source_types?: components['schemas']['balance_amount_by_source_type'] + } + /** BalanceAmountBySourceType */ + balance_amount_by_source_type: { + /** @description Amount for bank account. */ + bank_account?: number + /** @description Amount for card. */ + card?: number + /** @description Amount for FPX. */ + fpx?: number + } + /** BalanceDetail */ + balance_detail: { + /** @description Funds that are available for use. */ + available: components['schemas']['balance_amount'][] + } + /** + * BalanceTransaction + * @description Balance transactions represent funds moving through your Stripe account. + * They're created for every type of transaction that comes into or flows out of your Stripe account balance. + * + * Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types). + */ + balance_transaction: { + /** @description Gross amount of the transaction, in %s. */ + amount: number + /** + * Format: unix-time + * @description The date the transaction's net funds will become available in the Stripe balance. + */ + available_on: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. */ + exchange_rate?: number | null + /** @description Fees (in %s) paid for this transaction. */ + fee: number + /** @description Detailed breakdown of fees (in %s) paid for this transaction. */ + fee_details: components['schemas']['fee'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Net amount of the transaction, in %s. */ + net: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'balance_transaction' + /** @description [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. */ + reporting_category: string + /** @description The Stripe object to which this transaction is related. */ + source?: + | ( + | string + | components['schemas']['application_fee'] + | components['schemas']['charge'] + | components['schemas']['connect_collection_transfer'] + | components['schemas']['dispute'] + | components['schemas']['fee_refund'] + | components['schemas']['issuing.authorization'] + | components['schemas']['issuing.dispute'] + | components['schemas']['issuing.transaction'] + | components['schemas']['payout'] + | components['schemas']['platform_tax_fee'] + | components['schemas']['refund'] + | components['schemas']['reserve_transaction'] + | components['schemas']['tax_deducted_at_source'] + | components['schemas']['topup'] + | components['schemas']['transfer'] + | components['schemas']['transfer_reversal'] + ) + | null + /** @description If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ + status: string + /** + * @description Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + * @enum {string} + */ + type: + | 'adjustment' + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'application_fee' + | 'application_fee_refund' + | 'charge' + | 'connect_collection_transfer' + | 'contribution' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'payment' + | 'payment_failure_refund' + | 'payment_refund' + | 'payout' + | 'payout_cancel' + | 'payout_failure' + | 'refund' + | 'refund_failure' + | 'reserve_transaction' + | 'reserved_funds' + | 'stripe_fee' + | 'stripe_fx_fee' + | 'tax_fee' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_cancel' + | 'transfer_failure' + | 'transfer_refund' + } + /** + * BankAccount + * @description These bank accounts are payment methods on `Customer` objects. + * + * On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer + * destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). + * They can be bank accounts or debit cards as well, and are documented in the links above. + * + * Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers). + */ + bank_account: { + /** @description The ID of the account that the bank account is associated with. */ + account?: (string | components['schemas']['account']) | null + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string | null + /** @description The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: string | null + /** @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null + /** @description A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. */ + available_payout_methods?: ('instant' | 'standard')[] | null + /** @description Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ + bank_name?: string | null + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country: string + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: string + /** @description The ID of the customer that the bank account is associated with. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description Whether this bank account is the default external account for its currency. */ + default_for_currency?: boolean | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The last four digits of the bank account number. */ + last4: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + /** @description The routing transit number for the bank account. */ + routing_number?: string | null + /** + * @description For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. + * + * For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + */ + status: string + } + /** billing_details */ + billing_details: { + /** @description Billing address. */ + address?: components['schemas']['address'] | null + /** @description Email address. */ + email?: string | null + /** @description Full name. */ + name?: string | null + /** @description Billing phone number (including extension). */ + phone?: string | null + } + /** + * PortalConfiguration + * @description A portal configuration describes the functionality and behavior of a portal session. + */ + 'billing_portal.configuration': { + /** @description Whether the configuration is active and can be used to create portal sessions. */ + active: boolean + /** @description ID of the Connect Application that created the configuration. */ + application?: string | null + business_profile: components['schemas']['portal_business_profile'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ + default_return_url?: string | null + features: components['schemas']['portal_features'] + /** @description Unique identifier for the object. */ + id: string + /** @description Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. */ + is_default: boolean + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'billing_portal.configuration' + /** + * Format: unix-time + * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number + } + /** + * PortalSession + * @description The Billing customer portal is a Stripe-hosted UI for subscription and + * billing management. + * + * A portal configuration describes the functionality and features that you + * want to provide to your customers through the portal. + * + * A portal session describes the instantiation of the customer portal for + * a particular customer. By visiting the session's URL, the customer + * can manage their subscriptions and billing details. For security reasons, + * sessions are short-lived and will expire if the customer does not visit the URL. + * Create sessions on-demand when customers intend to manage their subscriptions + * and billing details. + * + * Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal). + */ + 'billing_portal.session': { + /** @description The configuration used by this session, describing the features available. */ + configuration: string | components['schemas']['billing_portal.configuration'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The ID of the customer for this session. */ + customer: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + * @enum {string|null} + */ + locale?: + | ( + | 'auto' + | 'bg' + | 'cs' + | 'da' + | 'de' + | 'el' + | 'en' + | 'en-AU' + | 'en-CA' + | 'en-GB' + | 'en-IE' + | 'en-IN' + | 'en-NZ' + | 'en-SG' + | 'es' + | 'es-419' + | 'et' + | 'fi' + | 'fil' + | 'fr' + | 'fr-CA' + | 'hr' + | 'hu' + | 'id' + | 'it' + | 'ja' + | 'ko' + | 'lt' + | 'lv' + | 'ms' + | 'mt' + | 'nb' + | 'nl' + | 'pl' + | 'pt' + | 'pt-BR' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sv' + | 'th' + | 'tr' + | 'vi' + | 'zh' + | 'zh-HK' + | 'zh-TW' + ) + | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'billing_portal.session' + /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ + on_behalf_of?: string | null + /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ + return_url: string + /** @description The short-lived URL of the session that gives customers access to the customer portal. */ + url: string + } + /** BitcoinReceiver */ + bitcoin_receiver: { + /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ + active: boolean + /** @description The amount of `currency` that you are collecting as payment. */ + amount: number + /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ + amount_received: number + /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ + bitcoin_amount: number + /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ + bitcoin_amount_received: number + /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ + bitcoin_uri: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ + currency: string + /** @description The customer ID of the bitcoin receiver. */ + customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The customer's email address, set by the API call that creates the receiver. */ + email?: string | null + /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ + filled: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ + inbound_address: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_receiver' + /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ + payment?: string | null + /** @description The refund address of this bitcoin receiver. */ + refund_address?: string | null + /** + * BitcoinTransactionList + * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. + */ + transactions?: { + /** @description Details about each object. */ + data: components['schemas']['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ + uncaptured_funds: boolean + /** @description Indicate if this source is used for payment. */ + used_for_payment?: boolean | null + } + /** BitcoinTransaction */ + bitcoin_transaction: { + /** @description The amount of `currency` that the transaction was converted to in real-time. */ + amount: number + /** @description The amount of bitcoin contained in the transaction. */ + bitcoin_amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_transaction' + /** @description The receiver to which this transaction was sent. */ + receiver: string + } + /** + * AccountCapability + * @description This is an object representing a capability for a Stripe account. + * + * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities). + */ + capability: { + /** @description The account for which the capability enables functionality. */ + account: string | components['schemas']['account'] + future_requirements?: components['schemas']['account_capability_future_requirements'] + /** @description The identifier for the capability. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'capability' + /** @description Whether the capability has been requested. */ + requested: boolean + /** + * Format: unix-time + * @description Time at which the capability was requested. Measured in seconds since the Unix epoch. + */ + requested_at?: number | null + requirements?: components['schemas']['account_capability_requirements'] + /** + * @description The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. + * @enum {string} + */ + status: 'active' | 'disabled' | 'inactive' | 'pending' | 'unrequested' + } + /** + * Card + * @description You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. + * + * Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards). + */ + card: { + /** @description The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. */ + account?: (string | components['schemas']['account']) | null + /** @description City/District/Suburb/Town/Village. */ + address_city?: string | null + /** @description Billing address country, if provided when creating card. */ + address_country?: string | null + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string | null + /** @description If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string | null + /** @description State/County/Province/Region. */ + address_state?: string | null + /** @description ZIP or postal code. */ + address_zip?: string | null + /** @description If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_zip_check?: string | null + /** @description A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. */ + available_payout_methods?: ('instant' | 'standard')[] | null + /** @description Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ + brand: string + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. */ + currency?: string | null + /** @description The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). */ + cvc_check?: string | null + /** @description Whether this card is the default external account for its currency. */ + default_for_currency?: boolean | null + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string + /** @description Unique identifier for the object. */ + id: string + /** @description The last four digits of the card. */ + last4: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description Cardholder name. */ + name?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'card' + /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ + recipient?: (string | components['schemas']['recipient']) | null + /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ + tokenization_method?: string | null + } + /** card_generated_from_payment_method_details */ + card_generated_from_payment_method_details: { + card_present?: components['schemas']['payment_method_details_card_present'] + /** @description The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. */ + type: string + } + /** CardIssuingAccountTermsOfService */ + card_issuing_account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string + } + /** card_mandate_payment_method_details */ + card_mandate_payment_method_details: { [key: string]: unknown } + /** + * Charge + * @description To charge a credit or a debit card, you create a `Charge` object. You can + * retrieve and refund individual charges as well as list all charges. Charges + * are identified by a unique, random ID. + * + * Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). + */ + charge: { + /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). */ + amount_captured: number + /** @description Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ + amount_refunded: number + /** @description ID of the Connect application that created the charge. */ + application?: (string | components['schemas']['application']) | null + /** @description The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ + application_fee?: (string | components['schemas']['application_fee']) | null + /** @description The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ + application_fee_amount?: number | null + /** @description ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + billing_details: components['schemas']['billing_details'] + /** @description The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. */ + calculated_statement_descriptor?: string | null + /** @description If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ + captured: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the customer this charge is for if one exists. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Whether the charge has been disputed. */ + disputed: boolean + /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ + failure_code?: string | null + /** @description Message to user further explaining reason for charge failure if available. */ + failure_message?: string | null + /** @description Information on fraud assessments for the charge. */ + fraud_details?: components['schemas']['charge_fraud_details'] | null + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice this charge is for if one exists. */ + invoice?: (string | components['schemas']['invoice']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'charge' + /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description ID of the order this charge is for if one exists. */ + order?: (string | components['schemas']['order']) | null + /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ + outcome?: components['schemas']['charge_outcome'] | null + /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ + paid: boolean + /** @description ID of the PaymentIntent associated with this charge, if one exists. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description ID of the payment method used in this charge. */ + payment_method?: string | null + /** @description Details about the payment method at the time of the transaction. */ + payment_method_details?: components['schemas']['payment_method_details'] | null + /** @description This is the email address that the receipt for this charge was sent to. */ + receipt_email?: string | null + /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ + receipt_number?: string | null + /** @description This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. */ + receipt_url?: string | null + /** @description Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ + refunded: boolean + /** + * RefundList + * @description A list of refunds that have been applied to the charge. + */ + refunds: { + /** @description Details about each object. */ + data: components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description ID of the review associated with this charge if one exists. */ + review?: (string | components['schemas']['review']) | null + /** @description Shipping information for the charge. */ + shipping?: components['schemas']['shipping'] | null + /** @description The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ + source_transfer?: (string | components['schemas']['transfer']) | null + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** + * @description The status of the payment is either `succeeded`, `pending`, or `failed`. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + /** @description ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ + transfer?: string | components['schemas']['transfer'] + /** @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ + transfer_data?: components['schemas']['charge_transfer_data'] | null + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string | null + } + /** ChargeFraudDetails */ + charge_fraud_details: { + /** @description Assessments from Stripe. If set, the value is `fraudulent`. */ + stripe_report?: string + /** @description Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ + user_report?: string + } + /** ChargeOutcome */ + charge_outcome: { + /** @description Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. */ + network_status?: string | null + /** @description An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. */ + reason?: string | null + /** @description Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. */ + risk_level?: string + /** @description Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. */ + risk_score?: number + /** @description The ID of the Radar rule that matched the payment, if applicable. */ + rule?: string | components['schemas']['rule'] + /** @description A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ + seller_message?: string | null + /** @description Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. */ + type: string + } + /** ChargeTransferData */ + charge_transfer_data: { + /** @description The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ + amount?: number | null + /** @description ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ + destination: string | components['schemas']['account'] + } + /** CheckoutAcssDebitMandateOptions */ + checkout_acss_debit_mandate_options: { + /** @description A URL for custom mandate text */ + custom_mandate_url?: string + /** @description List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. */ + default_for?: ('invoice' | 'subscription')[] + /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description?: string | null + /** + * @description Payment schedule for the mandate. + * @enum {string|null} + */ + payment_schedule?: ('combined' | 'interval' | 'sporadic') | null + /** + * @description Transaction type of the mandate. + * @enum {string|null} + */ + transaction_type?: ('business' | 'personal') | null + } + /** CheckoutAcssDebitPaymentMethodOptions */ + checkout_acss_debit_payment_method_options: { + /** + * @description Currency supported by the bank account. Returned when the Session is in `setup` mode. + * @enum {string} + */ + currency?: 'cad' | 'usd' + mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** CheckoutBoletoPaymentMethodOptions */ + checkout_boleto_payment_method_options: { + /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ + expires_after_days: number + } + /** CheckoutOxxoPaymentMethodOptions */ + checkout_oxxo_payment_method_options: { + /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ + expires_after_days: number + } + /** CheckoutSessionPaymentMethodOptions */ + checkout_session_payment_method_options: { + acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + boleto?: components['schemas']['checkout_boleto_payment_method_options'] + oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + } + /** + * Session + * @description A Checkout Session represents your customer's session as they pay for + * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + * new Session each time your customer attempts to pay. + * + * Once payment is successful, the Checkout Session will contain a reference + * to the [Customer](https://stripe.com/docs/api/customers), and either the successful + * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + * [Subscription](https://stripe.com/docs/api/subscriptions). + * + * You can create a Checkout Session on your server and pass its ID to the + * client to begin Checkout. + * + * Related guide: [Checkout Server Quickstart](https://stripe.com/docs/payments/checkout/api). + */ + 'checkout.session': { + /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ + after_expiration?: components['schemas']['payment_pages_checkout_session_after_expiration'] | null + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean | null + /** @description Total of all items before discounts or taxes are applied. */ + amount_subtotal?: number | null + /** @description Total of all items after discounts and taxes are applied. */ + amount_total?: number | null + automatic_tax: components['schemas']['payment_pages_checkout_session_automatic_tax'] + /** + * @description Describes whether Checkout should collect the customer's billing address. + * @enum {string|null} + */ + billing_address_collection?: ('auto' | 'required') | null + /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string + /** + * @description A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * Session with your internal systems. + */ + client_reference_id?: string | null + /** @description Results of `consent_collection` for this session. */ + consent?: components['schemas']['payment_pages_checkout_session_consent'] | null + /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ + consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** + * @description The ID of the customer for this Session. + * For Checkout Sessions in `payment` or `subscription` mode, Checkout + * will create a new customer object based on information provided + * during the payment flow unless an existing customer was provided when + * the Session was created. + */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + * @enum {string|null} + */ + customer_creation?: ('always' | 'if_required') | null + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null + /** + * @description If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once the payment flow is + * complete, use the `customer` attribute. + */ + customer_email?: string | null + /** + * Format: unix-time + * @description The timestamp at which the Checkout Session will expire. + */ + expires_at: number + /** + * @description Unique identifier for the object. Used to pass to `redirectToCheckout` + * in Stripe.js. + */ + id: string + /** + * PaymentPagesCheckoutSessionListLineItems + * @description The line items purchased by the customer. + */ + line_items?: { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + * @enum {string|null} + */ + locale?: + | ( + | 'auto' + | 'bg' + | 'cs' + | 'da' + | 'de' + | 'el' + | 'en' + | 'en-GB' + | 'es' + | 'es-419' + | 'et' + | 'fi' + | 'fil' + | 'fr' + | 'fr-CA' + | 'hr' + | 'hu' + | 'id' + | 'it' + | 'ja' + | 'ko' + | 'lt' + | 'lv' + | 'ms' + | 'mt' + | 'nb' + | 'nl' + | 'pl' + | 'pt' + | 'pt-BR' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sv' + | 'th' + | 'tr' + | 'vi' + | 'zh' + | 'zh-HK' + | 'zh-TW' + ) + | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description The mode of the Checkout Session. + * @enum {string} + */ + mode: 'payment' | 'setup' | 'subscription' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'checkout.session' + /** @description The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description The ID of the Payment Link that created this Session. */ + payment_link?: (string | components['schemas']['payment_link']) | null + /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ + payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null + /** + * @description A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ + payment_method_types: string[] + /** + * @description The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + * You can use this value to decide when to fulfill your customer's order. + * @enum {string} + */ + payment_status: 'no_payment_required' | 'paid' | 'unpaid' + phone_number_collection?: components['schemas']['payment_pages_checkout_session_phone_number_collection'] + /** @description The ID of the original expired Checkout Session that triggered the recovery flow. */ + recovered_from?: string | null + /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ + setup_intent?: (string | components['schemas']['setup_intent']) | null + /** @description Shipping information for this Checkout Session. */ + shipping?: components['schemas']['shipping'] | null + /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ + shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null + /** @description The shipping rate options applied to this Session. */ + shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] + /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** + * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. + * @enum {string|null} + */ + status?: ('complete' | 'expired' | 'open') | null + /** + * @description Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + * @enum {string|null} + */ + submit_type?: ('auto' | 'book' | 'donate' | 'pay') | null + /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ + subscription?: (string | components['schemas']['subscription']) | null + /** + * @description The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ + success_url: string + tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] + /** @description Tax and discount details for the computed total amount. */ + total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null + /** @description The URL to the Checkout Session. */ + url?: string | null + } + /** ConnectCollectionTransfer */ + connect_collection_transfer: { + /** @description Amount transferred, in %s. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the account that funds are being collected for. */ + destination: string | components['schemas']['account'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'connect_collection_transfer' + } + /** + * CountrySpec + * @description Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. + * + * You can also view the information from this API call as [an online + * guide](/docs/connect/required-verification-information). + */ + country_spec: { + /** @description The default currency for this country. This applies to both payment methods and bank accounts. */ + default_currency: string + /** @description Unique identifier for the object. Represented as the ISO country code for this country. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'country_spec' + /** @description Currencies that can be accepted in the specific country (for transfers). */ + supported_bank_account_currencies: { [key: string]: string[] } + /** @description Currencies that can be accepted in the specified country (for payments). */ + supported_payment_currencies: string[] + /** @description Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). */ + supported_payment_methods: string[] + /** @description Countries that can accept transfers from the specified country. */ + supported_transfer_countries: string[] + verification_fields: components['schemas']['country_spec_verification_fields'] + } + /** CountrySpecVerificationFieldDetails */ + country_spec_verification_field_details: { + /** @description Additional fields which are only required for some users. */ + additional: string[] + /** @description Fields which every account must eventually provide. */ + minimum: string[] + } + /** CountrySpecVerificationFields */ + country_spec_verification_fields: { + company: components['schemas']['country_spec_verification_field_details'] + individual: components['schemas']['country_spec_verification_field_details'] + } + /** + * Coupon + * @description A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or + * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + */ + coupon: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off?: number | null + applies_to?: components['schemas']['coupon_applies_to'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ + currency?: string | null + /** + * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + * @enum {string} + */ + duration: 'forever' | 'once' | 'repeating' + /** @description If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ + duration_in_months?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ + max_redemptions?: number | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description Name of the coupon displayed to customers on for instance invoices or receipts. */ + name?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'coupon' + /** @description Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. */ + percent_off?: number | null + /** + * Format: unix-time + * @description Date after which the coupon can no longer be redeemed. + */ + redeem_by?: number | null + /** @description Number of times this coupon has been applied to a customer. */ + times_redeemed: number + /** @description Taking account of the above properties, whether this coupon can still be applied to a customer. */ + valid: boolean + } + /** CouponAppliesTo */ + coupon_applies_to: { + /** @description A list of product IDs this coupon applies to */ + products: string[] + } + /** + * CreditNote + * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. + * + * Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes). + */ + credit_note: { + /** @description The integer amount in %s representing the total amount of the credit note, including tax. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the customer. */ + customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] + /** @description Customer balance transaction related to this credit note. */ + customer_balance_transaction?: (string | components['schemas']['customer_balance_transaction']) | null + /** @description The integer amount in %s representing the total amount of discount that was credited. */ + discount_amount: number + /** @description The aggregate amounts calculated per discount for all line items. */ + discount_amounts: components['schemas']['discounts_resource_discount_amount'][] + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice. */ + invoice: string | components['schemas']['invoice'] + /** + * CreditNoteLinesList + * @description Line items that make up the credit note + */ + lines: { + /** @description Details about each object. */ + data: components['schemas']['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Customer-facing text that appears on the credit note PDF. */ + memo?: string | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ + number: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'credit_note' + /** @description Amount that was credited outside of Stripe. */ + out_of_band_amount?: number | null + /** @description The link to download the PDF of the credit note. */ + pdf: string + /** + * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + * @enum {string|null} + */ + reason?: ('duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory') | null + /** @description Refund related to this credit note. */ + refund?: (string | components['schemas']['refund']) | null + /** + * @description Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + * @enum {string} + */ + status: 'issued' | 'void' + /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + subtotal: number + /** @description The aggregate amounts calculated per tax rate for all line items. */ + tax_amounts: components['schemas']['credit_note_tax_amount'][] + /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ + total: number + /** + * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + * @enum {string} + */ + type: 'post_payment' | 'pre_payment' + /** + * Format: unix-time + * @description The time that the credit note was voided. + */ + voided_at?: number | null + } + /** CreditNoteLineItem */ + credit_note_line_item: { + /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ + amount: number + /** @description Description of the item being credited. */ + description?: string | null + /** @description The integer amount in %s representing the discount being credited for this line item. */ + discount_amount: number + /** @description The amount of discount calculated per discount for this line item */ + discount_amounts: components['schemas']['discounts_resource_discount_amount'][] + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice line item being credited */ + invoice_line_item?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'credit_note_line_item' + /** @description The number of units of product being credited. */ + quantity?: number | null + /** @description The amount of tax calculated per tax rate for this line item */ + tax_amounts: components['schemas']['credit_note_tax_amount'][] + /** @description The tax rates which apply to the line item. */ + tax_rates: components['schemas']['tax_rate'][] + /** + * @description The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + * @enum {string} + */ + type: 'custom_line_item' | 'invoice_line_item' + /** @description The cost of each unit of product being credited. */ + unit_amount?: number | null + /** + * Format: decimal + * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ + unit_amount_decimal?: string | null + } + /** CreditNoteTaxAmount */ + credit_note_tax_amount: { + /** @description The amount, in %s, of the tax. */ + amount: number + /** @description Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean + /** @description The tax rate that was applied to get this tax amount. */ + tax_rate: string | components['schemas']['tax_rate'] + } + /** + * Customer + * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. + * + * Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment). + */ + customer: { + /** @description The customer's address. */ + address?: components['schemas']['address'] | null + /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ + balance?: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. */ + currency?: string | null + /** + * @description ID of the default payment source for the customer. + * + * If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + */ + default_source?: + | ( + | string + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + ) + | null + /** + * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. + * + * If an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`. + */ + delinquent?: boolean | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Describes the current discount active on the customer, if there is one. */ + discount?: components['schemas']['discount'] | null + /** @description The customer's email address. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The prefix for the customer used to generate unique invoice numbers. */ + invoice_prefix?: string | null + invoice_settings?: components['schemas']['invoice_setting_customer_setting'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } + /** @description The customer's full name or business name. */ + name?: string | null + /** @description The suffix of the customer's next invoice number, e.g., 0001. */ + next_invoice_sequence?: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer' + /** @description The customer's phone number. */ + phone?: string | null + /** @description The customer's preferred locales (languages), ordered by preference. */ + preferred_locales?: string[] | null + /** @description Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ + shipping?: components['schemas']['shipping'] | null + /** + * ApmsSourcesSourceList + * @description The customer's payment sources, if any. + */ + sources?: { + /** @description Details about each object. */ + data: ( + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + )[] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * SubscriptionList + * @description The customer's current subscriptions, if any. + */ + subscriptions?: { + /** @description Details about each object. */ + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + tax?: components['schemas']['customer_tax'] + /** + * @description Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. + * @enum {string|null} + */ + tax_exempt?: ('exempt' | 'none' | 'reverse') | null + /** + * TaxIDsList + * @description The customer's tax IDs. + */ + tax_ids?: { + /** @description Details about each object. */ + data: components['schemas']['tax_id'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** customer_acceptance */ + customer_acceptance: { + /** + * Format: unix-time + * @description The time at which the customer accepted the Mandate. + */ + accepted_at?: number | null + offline?: components['schemas']['offline_acceptance'] + online?: components['schemas']['online_acceptance'] + /** + * @description The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + * @enum {string} + */ + type: 'offline' | 'online' + } + /** + * CustomerBalanceTransaction + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + * + * Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. + */ + customer_balance_transaction: { + /** @description The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The ID of the credit note (if any) related to the transaction. */ + credit_note?: (string | components['schemas']['credit_note']) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of the customer the transaction belongs to. */ + customer: string | components['schemas']['customer'] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. */ + ending_balance: number + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the invoice (if any) related to the transaction. */ + invoice?: (string | components['schemas']['invoice']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_balance_transaction' + /** + * @description Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + * @enum {string} + */ + type: + | 'adjustment' + | 'applied_to_invoice' + | 'credit_note' + | 'initial' + | 'invoice_too_large' + | 'invoice_too_small' + | 'migration' + | 'unapplied_from_invoice' + | 'unspent_receiver_credit' + } + /** CustomerTax */ + customer_tax: { + /** + * @description Surfaces if automatic tax computation is possible given the current customer location information. + * @enum {string} + */ + automatic_tax: 'failed' | 'not_collecting' | 'supported' | 'unrecognized_location' + /** @description A recent IP address of the customer used for tax reporting and tax location inference. */ + ip_address?: string | null + /** @description The customer's location as identified by Stripe Tax. */ + location?: components['schemas']['customer_tax_location'] | null + } + /** CustomerTaxLocation */ + customer_tax_location: { + /** @description The customer's country as identified by Stripe Tax. */ + country: string + /** + * @description The data source used to infer the customer's location. + * @enum {string} + */ + source: 'billing_address' | 'ip_address' | 'payment_method' | 'shipping_destination' + /** @description The customer's state, county, province, or region as identified by Stripe Tax. */ + state?: string | null + } + /** DeletedAccount */ + deleted_account: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'account' + } + /** AlipayDeletedAccount */ + deleted_alipay_account: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'alipay_account' + } + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apple_pay_domain' + } + /** DeletedBankAccount */ + deleted_bank_account: { + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string | null + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bank_account' + } + /** BitcoinDeletedReceiver */ + deleted_bitcoin_receiver: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'bitcoin_receiver' + } + /** DeletedCard */ + deleted_card: { + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string | null + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'card' + } + /** DeletedCoupon */ + deleted_coupon: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'coupon' + } + /** DeletedCustomer */ + deleted_customer: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer' + } + /** DeletedDiscount */ + deleted_discount: { + /** @description The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. */ + checkout_session?: string | null + coupon: components['schemas']['coupon'] + /** @description The ID of the customer associated with this discount. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. */ + id: string + /** @description The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ + invoice?: string | null + /** @description The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. */ + invoice_item?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'discount' + /** @description The promotion code applied to create this discount. */ + promotion_code?: (string | components['schemas']['promotion_code']) | null + /** + * Format: unix-time + * @description Date that the coupon was applied. + */ + start: number + /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription?: string | null + } + /** Polymorphic */ + deleted_external_account: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] + /** DeletedInvoice */ + deleted_invoice: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoice' + } + /** DeletedInvoiceItem */ + deleted_invoiceitem: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoiceitem' + } + /** Polymorphic */ + deleted_payment_source: + | components['schemas']['deleted_alipay_account'] + | components['schemas']['deleted_bank_account'] + | components['schemas']['deleted_bitcoin_receiver'] + | components['schemas']['deleted_card'] + /** DeletedPerson */ + deleted_person: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'person' + } + /** DeletedPlan */ + deleted_plan: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'plan' + } + /** DeletedPrice */ + deleted_price: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'price' + } + /** DeletedProduct */ + deleted_product: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'product' + } + /** RadarListDeletedList */ + 'deleted_radar.value_list': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list' + } + /** RadarListDeletedListItem */ + 'deleted_radar.value_list_item': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list_item' + } + /** DeletedTransferRecipient */ + deleted_recipient: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'recipient' + } + /** DeletedSku */ + deleted_sku: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'sku' + } + /** DeletedSubscriptionItem */ + deleted_subscription_item: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_item' + } + /** deleted_tax_id */ + deleted_tax_id: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_id' + } + /** TerminalLocationDeletedLocation */ + 'deleted_terminal.location': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.location' + } + /** TerminalReaderDeletedReader */ + 'deleted_terminal.reader': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.reader' + } + /** NotificationWebhookEndpointDeleted */ + deleted_webhook_endpoint: { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'webhook_endpoint' + } + /** DeliveryEstimate */ + delivery_estimate: { + /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ + date?: string + /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ + earliest?: string + /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ + latest?: string + /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ + type: string + } + /** + * Discount + * @description A discount represents the actual application of a coupon to a particular + * customer. It contains information about when the discount began and when it + * will end. + * + * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). + */ + discount: { + /** @description The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. */ + checkout_session?: string | null + coupon: components['schemas']['coupon'] + /** @description The ID of the customer associated with this discount. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * Format: unix-time + * @description If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + */ + end?: number | null + /** @description The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. */ + id: string + /** @description The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ + invoice?: string | null + /** @description The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. */ + invoice_item?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'discount' + /** @description The promotion code applied to create this discount. */ + promotion_code?: (string | components['schemas']['promotion_code']) | null + /** + * Format: unix-time + * @description Date that the coupon was applied. + */ + start: number + /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription?: string | null + } + /** DiscountsResourceDiscountAmount */ + discounts_resource_discount_amount: { + /** @description The amount, in %s, of the discount. */ + amount: number + /** @description The discount that was applied to get this discount amount. */ + discount: string | components['schemas']['discount'] | components['schemas']['deleted_discount'] + } + /** + * Dispute + * @description A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you're given the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. You can find more + * information about the dispute process in our [Disputes and + * Fraud](/docs/disputes) documentation. + * + * Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). + */ + dispute: { + /** @description Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). */ + amount: number + /** @description List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ + balance_transactions: components['schemas']['balance_transaction'][] + /** @description ID of the charge that was disputed. */ + charge: string | components['schemas']['charge'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + evidence: components['schemas']['dispute_evidence'] + evidence_details: components['schemas']['dispute_evidence_details'] + /** @description Unique identifier for the object. */ + id: string + /** @description If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. */ + is_charge_refundable: boolean + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'dispute' + /** @description ID of the PaymentIntent that was disputed. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ + reason: string + /** + * @description Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. + * @enum {string} + */ + status: + | 'charge_refunded' + | 'lost' + | 'needs_response' + | 'under_review' + | 'warning_closed' + | 'warning_needs_response' + | 'warning_under_review' + | 'won' + } + /** DisputeEvidence */ + dispute_evidence: { + /** @description Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. */ + access_activity_log?: string | null + /** @description The billing address provided by the customer. */ + billing_address?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ + cancellation_policy?: (string | components['schemas']['file']) | null + /** @description An explanation of how and when the customer was shown your refund policy prior to purchase. */ + cancellation_policy_disclosure?: string | null + /** @description A justification for why the customer's subscription was not canceled. */ + cancellation_rebuttal?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. */ + customer_communication?: (string | components['schemas']['file']) | null + /** @description The email address of the customer. */ + customer_email_address?: string | null + /** @description The name of the customer. */ + customer_name?: string | null + /** @description The IP address that the customer used when making the purchase. */ + customer_purchase_ip?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ + customer_signature?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. */ + duplicate_charge_documentation?: (string | components['schemas']['file']) | null + /** @description An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ + duplicate_charge_explanation?: string | null + /** @description The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ + duplicate_charge_id?: string | null + /** @description A description of the product or service that was sold. */ + product_description?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. */ + receipt?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ + refund_policy?: (string | components['schemas']['file']) | null + /** @description Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ + refund_policy_disclosure?: string | null + /** @description A justification for why the customer is not entitled to a refund. */ + refund_refusal_explanation?: string | null + /** @description The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ + service_date?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. */ + service_documentation?: (string | components['schemas']['file']) | null + /** @description The address to which a physical product was shipped. You should try to include as complete address information as possible. */ + shipping_address?: string | null + /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. */ + shipping_carrier?: string | null + /** @description The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ + shipping_date?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. */ + shipping_documentation?: (string | components['schemas']['file']) | null + /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ + shipping_tracking_number?: string | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ + uncategorized_file?: (string | components['schemas']['file']) | null + /** @description Any additional evidence or statements. */ + uncategorized_text?: string | null + } + /** DisputeEvidenceDetails */ + dispute_evidence_details: { + /** + * Format: unix-time + * @description Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute. + */ + due_by?: number | null + /** @description Whether evidence has been staged for this dispute. */ + has_evidence: boolean + /** @description Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. */ + past_due: boolean + /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ + submission_count: number + } + /** EphemeralKey */ + ephemeral_key: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Format: unix-time + * @description Time at which the key will expire. Measured in seconds since the Unix epoch. + */ + expires: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'ephemeral_key' + /** @description The key's secret. You can use this value to make authorized requests to the Stripe API. */ + secret?: string + } + /** @description An error response from the Stripe API */ + error: { + error: components['schemas']['api_errors'] + } + /** + * NotificationEvent + * @description Events are our way of letting you know when something interesting happens in + * your account. When an interesting event occurs, we create a new `Event` + * object. For example, when a charge succeeds, we create a `charge.succeeded` + * event; and when an invoice payment attempt fails, we create an + * `invoice.payment_failed` event. Note that many API requests may cause multiple + * events to be created. For example, if you create a new subscription for a + * customer, you will receive both a `customer.subscription.created` event and a + * `charge.succeeded` event. + * + * Events occur when the state of another API resource changes. The state of that + * resource at the time of the change is embedded in the event's data field. For + * example, a `charge.succeeded` event will contain a charge, and an + * `invoice.payment_failed` event will contain an invoice. + * + * As with other API resources, you can use endpoints to retrieve an + * [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) + * from the API. We also have a separate + * [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the + * `Event` objects directly to an endpoint on your server. Webhooks are managed + * in your + * [account settings](https://dashboard.stripe.com/account/webhooks), + * and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up. + * + * When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of + * events that occur in connected accounts. For these events, there will be an + * additional `account` attribute in the received `Event` object. + * + * **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is + * guaranteed only for 30 days. + */ + event: { + /** @description The connected account that originated the event. */ + account?: string + /** @description The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*. */ + api_version?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + data: components['schemas']['notification_event_data'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'event' + /** @description Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ + pending_webhooks: number + /** @description Information on the API request that instigated the event. */ + request?: components['schemas']['notification_event_request'] | null + /** @description Description of the event (e.g., `invoice.created` or `charge.refunded`). */ + type: string + } + /** + * ExchangeRate + * @description `Exchange Rate` objects allow you to determine the rates that Stripe is + * currently using to convert from one currency to another. Since this number is + * variable throughout the day, there are various reasons why you might want to + * know the current rate (for example, to dynamically price an item for a user + * with a default payment in a foreign currency). + * + * If you want a guarantee that the charge is made with a certain exchange rate + * you expect is current, you can pass in `exchange_rate` to charges endpoints. + * If the value is no longer up to date, the charge won't go through. Please + * refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more + * details. + */ + exchange_rate: { + /** @description Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'exchange_rate' + /** @description Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. */ + rates: { [key: string]: number } + } + /** Polymorphic */ + external_account: components['schemas']['bank_account'] | components['schemas']['card'] + /** Fee */ + fee: { + /** @description Amount of the fee, in cents. */ + amount: number + /** @description ID of the Connect application that earned the fee. */ + application?: string | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ + type: string + } + /** + * FeeRefund + * @description `Application Fee Refund` objects allow you to refund an application fee that + * has previously been created but not yet refunded. Funds will be refunded to + * the Stripe account from which the fee was originally collected. + * + * Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). + */ + fee_refund: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the application fee that was refunded. */ + fee: string | components['schemas']['application_fee'] + /** @description Unique identifier for the object. */ + id: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'fee_refund' + } + /** + * File + * @description This is an object representing a file hosted on Stripe's servers. The + * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) + * request (for example, when uploading dispute evidence) or it may have + * been created by Stripe (for example, the results of a [Sigma scheduled + * query](#scheduled_queries)). + * + * Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). + */ + file: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Format: unix-time + * @description The time at which the file expires and is no longer available in epoch seconds. + */ + expires_at?: number | null + /** @description A filename for the file, suitable for saving to a filesystem. */ + filename?: string | null + /** @description Unique identifier for the object. */ + id: string + /** + * FileFileLinkList + * @description A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + */ + links?: { + /** @description Details about each object. */ + data: components['schemas']['file_link'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'file' + /** + * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + * @enum {string} + */ + purpose: + | 'account_requirement' + | 'additional_verification' + | 'business_icon' + | 'business_logo' + | 'customer_signature' + | 'dispute_evidence' + | 'document_provider_identity_document' + | 'finance_report_run' + | 'identity_document' + | 'identity_document_downloadable' + | 'pci_document' + | 'selfie' + | 'sigma_scheduled_query' + | 'tax_document_user_upload' + /** @description The size in bytes of the file object. */ + size: number + /** @description A user friendly title for the document. */ + title?: string | null + /** @description The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). */ + type?: string | null + /** @description The URL from which the file can be downloaded using your live secret API key. */ + url?: string | null + } + /** + * FileLink + * @description To share the contents of a `File` object with non-Stripe users, you can + * create a `FileLink`. `FileLink`s contain a URL that can be used to + * retrieve the contents of the file without authentication. + */ + file_link: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Whether this link is already expired. */ + expired: boolean + /** + * Format: unix-time + * @description Time at which the link expires. + */ + expires_at?: number | null + /** @description The file object this link points to. */ + file: string | components['schemas']['file'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'file_link' + /** @description The publicly accessible URL to download the file. */ + url?: string | null + } + /** FinancialReportingFinanceReportRunRunParameters */ + financial_reporting_finance_report_run_run_parameters: { + /** @description The set of output columns requested for inclusion in the report run. */ + columns?: string[] + /** @description Connected account ID by which to filter the report run. */ + connected_account?: string + /** @description Currency of objects to be included in the report run. */ + currency?: string + /** + * Format: unix-time + * @description Ending timestamp of data to be included in the report run (exclusive). + */ + interval_end?: number + /** + * Format: unix-time + * @description Starting timestamp of data to be included in the report run. + */ + interval_start?: number + /** @description Payout ID by which to filter the report run. */ + payout?: string + /** @description Category of balance transactions to be included in the report run. */ + reporting_category?: string + /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ + timezone?: string + } + /** + * GelatoDataDocumentReportDateOfBirth + * @description Point in Time + */ + gelato_data_document_report_date_of_birth: { + /** @description Numerical day between 1 and 31. */ + day?: number | null + /** @description Numerical month between 1 and 12. */ + month?: number | null + /** @description The four-digit year. */ + year?: number | null + } + /** + * GelatoDataDocumentReportExpirationDate + * @description Point in Time + */ + gelato_data_document_report_expiration_date: { + /** @description Numerical day between 1 and 31. */ + day?: number | null + /** @description Numerical month between 1 and 12. */ + month?: number | null + /** @description The four-digit year. */ + year?: number | null + } + /** + * GelatoDataDocumentReportIssuedDate + * @description Point in Time + */ + gelato_data_document_report_issued_date: { + /** @description Numerical day between 1 and 31. */ + day?: number | null + /** @description Numerical month between 1 and 12. */ + month?: number | null + /** @description The four-digit year. */ + year?: number | null + } + /** + * GelatoDataIdNumberReportDate + * @description Point in Time + */ + gelato_data_id_number_report_date: { + /** @description Numerical day between 1 and 31. */ + day?: number | null + /** @description Numerical month between 1 and 12. */ + month?: number | null + /** @description The four-digit year. */ + year?: number | null + } + /** + * GelatoDataVerifiedOutputsDate + * @description Point in Time + */ + gelato_data_verified_outputs_date: { + /** @description Numerical day between 1 and 31. */ + day?: number | null + /** @description Numerical month between 1 and 12. */ + month?: number | null + /** @description The four-digit year. */ + year?: number | null + } + /** + * GelatoDocumentReport + * @description Result from a document check + */ + gelato_document_report: { + /** @description Address as it appears in the document. */ + address?: components['schemas']['address'] | null + /** @description Date of birth as it appears in the document. */ + dob?: components['schemas']['gelato_data_document_report_date_of_birth'] | null + /** @description Details on the verification error. Present when status is `unverified`. */ + error?: components['schemas']['gelato_document_report_error'] | null + /** @description Expiration date of the document. */ + expiration_date?: components['schemas']['gelato_data_document_report_expiration_date'] | null + /** @description Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. */ + files?: string[] | null + /** @description First name as it appears in the document. */ + first_name?: string | null + /** @description Issued date of the document. */ + issued_date?: components['schemas']['gelato_data_document_report_issued_date'] | null + /** @description Issuing country of the document. */ + issuing_country?: string | null + /** @description Last name as it appears in the document. */ + last_name?: string | null + /** @description Document ID number. */ + number?: string | null + /** + * @description Status of this `document` check. + * @enum {string} + */ + status: 'unverified' | 'verified' + /** + * @description Type of the document. + * @enum {string|null} + */ + type?: ('driving_license' | 'id_card' | 'passport') | null + } + /** GelatoDocumentReportError */ + gelato_document_report_error: { + /** + * @description A short machine-readable string giving the reason for the verification failure. + * @enum {string|null} + */ + code?: ('document_expired' | 'document_type_not_supported' | 'document_unverified_other') | null + /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason?: string | null + } + /** + * GelatoIdNumberReport + * @description Result from an id_number check + */ + gelato_id_number_report: { + /** @description Date of birth. */ + dob?: components['schemas']['gelato_data_id_number_report_date'] | null + /** @description Details on the verification error. Present when status is `unverified`. */ + error?: components['schemas']['gelato_id_number_report_error'] | null + /** @description First name. */ + first_name?: string | null + /** @description ID number. */ + id_number?: string | null + /** + * @description Type of ID number. + * @enum {string|null} + */ + id_number_type?: ('br_cpf' | 'sg_nric' | 'us_ssn') | null + /** @description Last name. */ + last_name?: string | null + /** + * @description Status of this `id_number` check. + * @enum {string} + */ + status: 'unverified' | 'verified' + } + /** GelatoIdNumberReportError */ + gelato_id_number_report_error: { + /** + * @description A short machine-readable string giving the reason for the verification failure. + * @enum {string|null} + */ + code?: ('id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other') | null + /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason?: string | null + } + /** GelatoReportDocumentOptions */ + gelato_report_document_options: { + /** @description Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. */ + allowed_types?: ('driving_license' | 'id_card' | 'passport')[] + /** @description Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. */ + require_id_number?: boolean + /** @description Disable image uploads, identity document images have to be captured using the device’s camera. */ + require_live_capture?: boolean + /** @description Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). */ + require_matching_selfie?: boolean + } + /** GelatoReportIdNumberOptions */ + gelato_report_id_number_options: { [key: string]: unknown } + /** + * GelatoSelfieReport + * @description Result from a selfie check + */ + gelato_selfie_report: { + /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. */ + document?: string | null + /** @description Details on the verification error. Present when status is `unverified`. */ + error?: components['schemas']['gelato_selfie_report_error'] | null + /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. */ + selfie?: string | null + /** + * @description Status of this `selfie` check. + * @enum {string} + */ + status: 'unverified' | 'verified' + } + /** GelatoSelfieReportError */ + gelato_selfie_report_error: { + /** + * @description A short machine-readable string giving the reason for the verification failure. + * @enum {string|null} + */ + code?: ('selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other') | null + /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ + reason?: string | null + } + /** GelatoSessionDocumentOptions */ + gelato_session_document_options: { + /** @description Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. */ + allowed_types?: ('driving_license' | 'id_card' | 'passport')[] + /** @description Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. */ + require_id_number?: boolean + /** @description Disable image uploads, identity document images have to be captured using the device’s camera. */ + require_live_capture?: boolean + /** @description Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). */ + require_matching_selfie?: boolean + } + /** GelatoSessionIdNumberOptions */ + gelato_session_id_number_options: { [key: string]: unknown } + /** + * GelatoSessionLastError + * @description Shows last VerificationSession error + */ + gelato_session_last_error: { + /** + * @description A short machine-readable string giving the reason for the verification or user-session failure. + * @enum {string|null} + */ + code?: + | ( + | 'abandoned' + | 'consent_declined' + | 'country_not_supported' + | 'device_not_supported' + | 'document_expired' + | 'document_type_not_supported' + | 'document_unverified_other' + | 'id_number_insufficient_document_data' + | 'id_number_mismatch' + | 'id_number_unverified_other' + | 'selfie_document_missing_photo' + | 'selfie_face_mismatch' + | 'selfie_manipulated' + | 'selfie_unverified_other' + | 'under_supported_age' + ) + | null + /** @description A message that explains the reason for verification or user-session failure. */ + reason?: string | null + } + /** GelatoVerificationReportOptions */ + gelato_verification_report_options: { + document?: components['schemas']['gelato_report_document_options'] + id_number?: components['schemas']['gelato_report_id_number_options'] + } + /** GelatoVerificationSessionOptions */ + gelato_verification_session_options: { + document?: components['schemas']['gelato_session_document_options'] + id_number?: components['schemas']['gelato_session_id_number_options'] + } + /** GelatoVerifiedOutputs */ + gelato_verified_outputs: { + /** @description The user's verified address. */ + address?: components['schemas']['address'] | null + /** @description The user’s verified date of birth. */ + dob?: components['schemas']['gelato_data_verified_outputs_date'] | null + /** @description The user's verified first name. */ + first_name?: string | null + /** @description The user's verified id number. */ + id_number?: string | null + /** + * @description The user's verified id number type. + * @enum {string|null} + */ + id_number_type?: ('br_cpf' | 'sg_nric' | 'us_ssn') | null + /** @description The user's verified last name. */ + last_name?: string | null + } + /** + * GelatoVerificationReport + * @description A VerificationReport is the result of an attempt to collect and verify data from a user. + * The collection of verification checks performed is determined from the `type` and `options` + * parameters used. You can find the result of each verification check performed in the + * appropriate sub-resource: `document`, `id_number`, `selfie`. + * + * Each VerificationReport contains a copy of any data collected by the user as well as + * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + * API. To configure and create VerificationReports, use the + * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + * + * Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + */ + 'identity.verification_report': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + document?: components['schemas']['gelato_document_report'] + /** @description Unique identifier for the object. */ + id: string + id_number?: components['schemas']['gelato_id_number_report'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'identity.verification_report' + options: components['schemas']['gelato_verification_report_options'] + selfie?: components['schemas']['gelato_selfie_report'] + /** + * @description Type of report. + * @enum {string} + */ + type: 'document' | 'id_number' + /** @description ID of the VerificationSession that created this report. */ + verification_session?: string | null + } + /** + * GelatoVerificationSession + * @description A VerificationSession guides you through the process of collecting and verifying the identities + * of your users. It contains details about the type of verification, such as what [verification + * check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for + * each verification in your system. + * + * A VerificationSession transitions through [multiple + * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through + * the verification flow. The VerificationSession contains the user’s verified data after + * verification checks are complete. + * + * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) + */ + 'identity.verification_session': { + /** @description The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. */ + client_secret?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description If present, this property tells you the last error encountered when processing the verification. */ + last_error?: components['schemas']['gelato_session_last_error'] | null + /** @description ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) */ + last_verification_report?: (string | components['schemas']['identity.verification_report']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'identity.verification_session' + options: components['schemas']['gelato_verification_session_options'] + /** @description Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. */ + redaction?: components['schemas']['verification_session_redaction'] | null + /** + * @description Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + * @enum {string} + */ + status: 'canceled' | 'processing' | 'requires_input' | 'verified' + /** + * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + * @enum {string} + */ + type: 'document' | 'id_number' + /** @description The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. */ + url?: string | null + /** @description The user’s verified data. */ + verified_outputs?: components['schemas']['gelato_verified_outputs'] | null + } + /** + * Invoice + * @description Invoices are statements of amounts owed by a customer, and are either + * generated one-off, or generated periodically from a subscription. + * + * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + * that may be caused by subscription upgrades/downgrades (if necessary). + * + * If your invoice is configured to be billed through automatic charges, + * Stripe automatically finalizes your invoice and attempts payment. Note + * that finalizing the invoice, + * [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does + * not happen immediately as the invoice is created. Stripe waits + * until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after + * creation to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on your + * [email settings](https://dashboard.stripe.com/account/billing/automatic), + * Stripe will email the invoice to your customer and await payment. These + * emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the + * amount due for the invoice (i.e., the amount that will be actually + * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the + * invoice is automatically marked paid, and we add the amount due to the + * customer's credit balance which is applied to the next invoice. + * + * More details on the customer's credit balance are + * [here](https://stripe.com/docs/billing/customer/balance). + * + * Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending). + */ + invoice: { + /** @description The country of the business associated with this invoice, most often the business creating the invoice. */ + account_country?: string | null + /** @description The public name of the business associated with this invoice, most often the business creating the invoice. */ + account_name?: string | null + /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ + account_tax_ids?: (string | components['schemas']['tax_id'] | components['schemas']['deleted_tax_id'])[] | null + /** @description Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. */ + amount_due: number + /** @description The amount, in %s, that was paid. */ + amount_paid: number + /** @description The amount remaining, in %s, that is due. */ + amount_remaining: number + /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ + application_fee_amount?: number | null + /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ + attempt_count: number + /** @description Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. */ + attempted: boolean + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + automatic_tax: components['schemas']['automatic_tax'] + /** + * @description Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. + * @enum {string|null} + */ + billing_reason?: + | ( + | 'automatic_pending_invoice_item_invoice' + | 'manual' + | 'quote_accept' + | 'subscription' + | 'subscription_create' + | 'subscription_cycle' + | 'subscription_threshold' + | 'subscription_update' + | 'upcoming' + ) + | null + /** @description ID of the latest charge generated for this invoice, if any. */ + charge?: (string | components['schemas']['charge']) | null + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + * @enum {string} + */ + collection_method: 'charge_automatically' | 'send_invoice' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Custom fields displayed on the invoice. */ + custom_fields?: components['schemas']['invoice_setting_custom_field'][] | null + /** @description The ID of the customer who will be billed. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. */ + customer_address?: components['schemas']['address'] | null + /** @description The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. */ + customer_email?: string | null + /** @description The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. */ + customer_name?: string | null + /** @description The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. */ + customer_phone?: string | null + /** @description The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. */ + customer_shipping?: components['schemas']['shipping'] | null + /** + * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + * @enum {string|null} + */ + customer_tax_exempt?: ('exempt' | 'none' | 'reverse') | null + /** @description The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. */ + customer_tax_ids?: components['schemas']['invoices_resource_invoice_tax_id'][] | null + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: + | ( + | string + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + ) + | null + /** @description The tax rates applied to this invoice, if any. */ + default_tax_rates: components['schemas']['tax_rate'][] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string | null + /** @description Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. */ + discount?: components['schemas']['discount'] | null + /** @description The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'] | components['schemas']['deleted_discount'])[] | null + /** + * Format: unix-time + * @description The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + */ + due_date?: number | null + /** @description Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. */ + ending_balance?: number | null + /** @description Footer displayed on the invoice. */ + footer?: string | null + /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ + hosted_invoice_url?: string | null + /** @description Unique identifier for the object. */ + id?: string + /** @description The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ + invoice_pdf?: string | null + /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ + last_finalization_error?: components['schemas']['api_errors'] | null + /** + * InvoiceLinesList + * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. + */ + lines: { + /** @description Details about each object. */ + data: components['schemas']['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * Format: unix-time + * @description The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + */ + next_payment_attempt?: number | null + /** @description A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. */ + number?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoice' + /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ + paid: boolean + /** @description Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. */ + paid_out_of_band: boolean + /** @description The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + payment_settings: components['schemas']['invoices_payment_settings'] + /** + * Format: unix-time + * @description End of the usage period during which invoice items were added to this invoice. + */ + period_end: number + /** + * Format: unix-time + * @description Start of the usage period during which invoice items were added to this invoice. + */ + period_start: number + /** @description Total amount of all post-payment credit notes issued for this invoice. */ + post_payment_credit_notes_amount: number + /** @description Total amount of all pre-payment credit notes issued for this invoice. */ + pre_payment_credit_notes_amount: number + /** @description The quote this invoice was generated from. */ + quote?: (string | components['schemas']['quote']) | null + /** @description This is the transaction number that appears on email receipts sent for this invoice. */ + receipt_number?: string | null + /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ + starting_balance: number + /** @description Extra information about an invoice for the customer's credit card statement. */ + statement_descriptor?: string | null + /** + * @description The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + * @enum {string|null} + */ + status?: ('deleted' | 'draft' | 'open' | 'paid' | 'uncollectible' | 'void') | null + status_transitions: components['schemas']['invoices_status_transitions'] + /** @description The subscription that this invoice was prepared for, if any. */ + subscription?: (string | components['schemas']['subscription']) | null + /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ + subscription_proration_date?: number + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal: number + /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ + tax?: number | null + threshold_reason?: components['schemas']['invoice_threshold_reason'] + /** @description Total after discounts and taxes. */ + total: number + /** @description The aggregate amounts calculated per discount across all line items. */ + total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The aggregate amounts calculated per tax rate for all line items. */ + total_tax_amounts: components['schemas']['invoice_tax_amount'][] + /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ + transfer_data?: components['schemas']['invoice_transfer_data'] | null + /** + * Format: unix-time + * @description Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + */ + webhooks_delivered_at?: number | null + } + /** InvoiceItemThresholdReason */ + invoice_item_threshold_reason: { + /** @description The IDs of the line items that triggered the threshold invoice. */ + line_item_ids: string[] + /** @description The quantity threshold boundary that applied to the given line item. */ + usage_gte: number + } + /** InvoiceLineItemPeriod */ + invoice_line_item_period: { + /** + * Format: unix-time + * @description End of the line item's billing period + */ + end: number + /** + * Format: unix-time + * @description Start of the line item's billing period + */ + start: number + } + /** invoice_mandate_options_card */ + invoice_mandate_options_card: { + /** @description Amount to be charged for future payments. */ + amount?: number | null + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string|null} + */ + amount_type?: ('fixed' | 'maximum') | null + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + } + /** invoice_payment_method_options_acss_debit */ + invoice_payment_method_options_acss_debit: { + mandate_options?: components['schemas']['invoice_payment_method_options_acss_debit_mandate_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** invoice_payment_method_options_acss_debit_mandate_options */ + invoice_payment_method_options_acss_debit_mandate_options: { + /** + * @description Transaction type of the mandate. + * @enum {string|null} + */ + transaction_type?: ('business' | 'personal') | null + } + /** invoice_payment_method_options_bancontact */ + invoice_payment_method_options_bancontact: { + /** + * @description Preferred language of the Bancontact authorization page that the customer is redirected to. + * @enum {string} + */ + preferred_language: 'de' | 'en' | 'fr' | 'nl' + } + /** invoice_payment_method_options_card */ + invoice_payment_method_options_card: { + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string|null} + */ + request_three_d_secure?: ('any' | 'automatic') | null + } + /** InvoiceSettingCustomField */ + invoice_setting_custom_field: { + /** @description The name of the custom field. */ + name: string + /** @description The value of the custom field. */ + value: string + } + /** InvoiceSettingCustomerSetting */ + invoice_setting_customer_setting: { + /** @description Default custom fields to be displayed on invoices for this customer. */ + custom_fields?: components['schemas']['invoice_setting_custom_field'][] | null + /** @description ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. */ + default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Default footer to be displayed on invoices for this customer. */ + footer?: string | null + } + /** InvoiceSettingQuoteSetting */ + invoice_setting_quote_setting: { + /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ + days_until_due?: number | null + } + /** InvoiceSettingSubscriptionScheduleSetting */ + invoice_setting_subscription_schedule_setting: { + /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ + days_until_due?: number | null + } + /** InvoiceTaxAmount */ + invoice_tax_amount: { + /** @description The amount, in %s, of the tax. */ + amount: number + /** @description Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean + /** @description The tax rate that was applied to get this tax amount. */ + tax_rate: string | components['schemas']['tax_rate'] + } + /** InvoiceThresholdReason */ + invoice_threshold_reason: { + /** @description The total invoice amount threshold boundary if it triggered the threshold invoice. */ + amount_gte?: number | null + /** @description Indicates which line items triggered a threshold invoice. */ + item_reasons: components['schemas']['invoice_item_threshold_reason'][] + } + /** InvoiceTransferData */ + invoice_transfer_data: { + /** @description The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. */ + amount?: number | null + /** @description The account where funds from the payment will be transferred to upon payment success. */ + destination: string | components['schemas']['account'] + } + /** + * InvoiceItem + * @description Sometimes you want to add a charge or credit to a customer, but actually + * charge or credit the customer's card only at the end of a regular billing + * cycle. This is useful for combining several charges (to minimize + * per-transaction fees), or for having Stripe tabulate your usage-based billing + * totals. + * + * Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + */ + invoiceitem: { + /** @description Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of the customer who will be billed when this invoice item is billed. */ + customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + date: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description If true, discounts will apply to this invoice item. Always false for prorations. */ + discountable: boolean + /** @description The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'])[] | null + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the invoice this invoice item belongs to. */ + invoice?: (string | components['schemas']['invoice']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'invoiceitem' + period: components['schemas']['invoice_line_item_period'] + /** @description The price of the invoice item. */ + price?: components['schemas']['price'] | null + /** @description Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ + proration: boolean + /** @description Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ + quantity: number + /** @description The subscription that this invoice item has been created for, if any. */ + subscription?: (string | components['schemas']['subscription']) | null + /** @description The subscription item that this invoice item has been created for, if any. */ + subscription_item?: string + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ + tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Unit amount (in the `currency` specified) of the invoice item. */ + unit_amount?: number | null + /** + * Format: decimal + * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ + unit_amount_decimal?: string | null + } + /** InvoicesPaymentMethodOptions */ + invoices_payment_method_options: { + /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ + acss_debit?: components['schemas']['invoice_payment_method_options_acss_debit'] | null + /** @description If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. */ + bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null + /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ + card?: components['schemas']['invoice_payment_method_options_card'] | null + } + /** InvoicesPaymentSettings */ + invoices_payment_settings: { + /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ + payment_method_options?: components['schemas']['invoices_payment_method_options'] | null + /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + } + /** InvoicesResourceInvoiceTaxID */ + invoices_resource_invoice_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null + } + /** InvoicesStatusTransitions */ + invoices_status_transitions: { + /** + * Format: unix-time + * @description The time that the invoice draft was finalized. + */ + finalized_at?: number | null + /** + * Format: unix-time + * @description The time that the invoice was marked uncollectible. + */ + marked_uncollectible_at?: number | null + /** + * Format: unix-time + * @description The time that the invoice was paid. + */ + paid_at?: number | null + /** + * Format: unix-time + * @description The time that the invoice was voided. + */ + voided_at?: number | null + } + /** + * IssuerFraudRecord + * @description This resource has been renamed to [Early Fraud + * Warning](#early_fraud_warning_object) and will be removed in a future API + * version. + */ + issuer_fraud_record: { + /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ + actionable: boolean + /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ + charge: string | components['schemas']['charge'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ + fraud_type: string + /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ + has_liability_shift: boolean + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuer_fraud_record' + /** @description The timestamp at which the card issuer posted the issuer fraud record. */ + post_date: number + } + /** IssuingAuthorizationAmountDetails */ + issuing_authorization_amount_details: { + /** @description The fee charged by the ATM for the cash withdrawal. */ + atm_fee?: number | null + } + /** IssuingAuthorizationMerchantData */ + issuing_authorization_merchant_data: { + /** @description A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. */ + category: string + /** @description The merchant category code for the seller’s business */ + category_code: string + /** @description City where the seller is located */ + city?: string | null + /** @description Country where the seller is located */ + country?: string | null + /** @description Name of the seller */ + name?: string | null + /** @description Identifier assigned to the seller by the card brand */ + network_id: string + /** @description Postal code where the seller is located */ + postal_code?: string | null + /** @description State where the seller is located */ + state?: string | null + } + /** IssuingAuthorizationPendingRequest */ + issuing_authorization_pending_request: { + /** @description The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_details?: components['schemas']['issuing_authorization_amount_details'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. */ + is_amount_controllable: boolean + /** @description The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The local currency the merchant is requesting to authorize. */ + merchant_currency: string + } + /** IssuingAuthorizationRequest */ + issuing_authorization_request: { + /** @description The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. */ + amount: number + /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_details?: components['schemas']['issuing_authorization_amount_details'] | null + /** @description Whether this request was approved. */ + approved: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + merchant_currency: string + /** + * @description The reason for the approval or decline. + * @enum {string} + */ + reason: + | 'account_disabled' + | 'card_active' + | 'card_inactive' + | 'cardholder_inactive' + | 'cardholder_verification_required' + | 'insufficient_funds' + | 'not_allowed' + | 'spending_controls' + | 'suspected_fraud' + | 'verification_failed' + | 'webhook_approved' + | 'webhook_declined' + | 'webhook_timeout' + } + /** IssuingAuthorizationVerificationData */ + issuing_authorization_verification_data: { + /** + * @description Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + * @enum {string} + */ + address_line1_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + * @enum {string} + */ + address_postal_code_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided a CVC and if it matched Stripe’s record. + * @enum {string} + */ + cvc_check: 'match' | 'mismatch' | 'not_provided' + /** + * @description Whether the cardholder provided an expiry date and if it matched Stripe’s record. + * @enum {string} + */ + expiry_check: 'match' | 'mismatch' | 'not_provided' + } + /** IssuingCardApplePay */ + issuing_card_apple_pay: { + /** @description Apple Pay Eligibility */ + eligible: boolean + /** + * @description Reason the card is ineligible for Apple Pay + * @enum {string|null} + */ + ineligible_reason?: ('missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region') | null + } + /** IssuingCardAuthorizationControls */ + issuing_card_authorization_controls: { + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. */ + allowed_categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. */ + blocked_categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** @description Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). */ + spending_limits?: components['schemas']['issuing_card_spending_limit'][] | null + /** @description Currency of the amounts within `spending_limits`. Always the same as the currency of the card. */ + spending_limits_currency?: string | null + } + /** IssuingCardGooglePay */ + issuing_card_google_pay: { + /** @description Google Pay Eligibility */ + eligible: boolean + /** + * @description Reason the card is ineligible for Google Pay + * @enum {string|null} + */ + ineligible_reason?: ('missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region') | null + } + /** IssuingCardShipping */ + issuing_card_shipping: { + address: components['schemas']['address'] + /** + * @description The delivery company that shipped a card. + * @enum {string|null} + */ + carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** + * Format: unix-time + * @description A unix timestamp representing a best estimate of when the card will be delivered. + */ + eta?: number | null + /** @description Recipient name. */ + name: string + /** + * @description Shipment service, such as `standard` or `express`. + * @enum {string} + */ + service: 'express' | 'priority' | 'standard' + /** + * @description The delivery status of the card. + * @enum {string|null} + */ + status?: ('canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped') | null + /** @description A tracking number for a card shipment. */ + tracking_number?: string | null + /** @description A link to the shipping carrier's site where you can view detailed information about a card shipment. */ + tracking_url?: string | null + /** + * @description Packaging options. + * @enum {string} + */ + type: 'bulk' | 'individual' + } + /** IssuingCardSpendingLimit */ + issuing_card_spending_limit: { + /** @description Maximum amount allowed to spend per interval. */ + amount: number + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ + categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** + * @description Interval (or event) to which the amount applies. + * @enum {string} + */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + } + /** IssuingCardWallets */ + issuing_card_wallets: { + apple_pay: components['schemas']['issuing_card_apple_pay'] + google_pay: components['schemas']['issuing_card_google_pay'] + /** @description Unique identifier for a card used with digital wallets */ + primary_account_identifier?: string | null + } + /** IssuingCardholderAddress */ + issuing_cardholder_address: { + address: components['schemas']['address'] + } + /** IssuingCardholderAuthorizationControls */ + issuing_cardholder_authorization_controls: { + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. */ + allowed_categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. */ + blocked_categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** @description Limit spending with amount-based rules that apply across this cardholder's cards. */ + spending_limits?: components['schemas']['issuing_cardholder_spending_limit'][] | null + /** @description Currency of the amounts within `spending_limits`. */ + spending_limits_currency?: string | null + } + /** IssuingCardholderCompany */ + issuing_cardholder_company: { + /** @description Whether the company's business ID number was provided. */ + tax_id_provided: boolean + } + /** IssuingCardholderIdDocument */ + issuing_cardholder_id_document: { + /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + back?: (string | components['schemas']['file']) | null + /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + front?: (string | components['schemas']['file']) | null + } + /** IssuingCardholderIndividual */ + issuing_cardholder_individual: { + /** @description The date of birth of this cardholder. */ + dob?: components['schemas']['issuing_cardholder_individual_dob'] | null + /** @description The first name of this cardholder. */ + first_name: string + /** @description The last name of this cardholder. */ + last_name: string + /** @description Government-issued ID document for this cardholder. */ + verification?: components['schemas']['issuing_cardholder_verification'] | null + } + /** IssuingCardholderIndividualDOB */ + issuing_cardholder_individual_dob: { + /** @description The day of birth, between 1 and 31. */ + day?: number | null + /** @description The month of birth, between 1 and 12. */ + month?: number | null + /** @description The four-digit year of birth. */ + year?: number | null + } + /** IssuingCardholderRequirements */ + issuing_cardholder_requirements: { + /** + * @description If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + * @enum {string|null} + */ + disabled_reason?: ('listed' | 'rejected.listed' | 'under_review') | null + /** @description Array of fields that need to be collected in order to verify and re-enable the cardholder. */ + past_due?: + | ( + | 'company.tax_id' + | 'individual.dob.day' + | 'individual.dob.month' + | 'individual.dob.year' + | 'individual.first_name' + | 'individual.last_name' + | 'individual.verification.document' + )[] + | null + } + /** IssuingCardholderSpendingLimit */ + issuing_cardholder_spending_limit: { + /** @description Maximum amount allowed to spend per interval. */ + amount: number + /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ + categories?: + | ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + | null + /** + * @description Interval (or event) to which the amount applies. + * @enum {string} + */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + } + /** IssuingCardholderVerification */ + issuing_cardholder_verification: { + /** @description An identifying document, either a passport or local ID card. */ + document?: components['schemas']['issuing_cardholder_id_document'] | null + } + /** IssuingDisputeCanceledEvidence */ + issuing_dispute_canceled_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** + * Format: unix-time + * @description Date when order was canceled. + */ + canceled_at?: number | null + /** @description Whether the cardholder was provided with a cancellation policy. */ + cancellation_policy_provided?: boolean | null + /** @description Reason for canceling the order. */ + cancellation_reason?: string | null + /** + * Format: unix-time + * @description Date when the cardholder expected to receive the product. + */ + expected_at?: number | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** @description Description of the merchandise or service that was purchased. */ + product_description?: string | null + /** + * @description Whether the product was a merchandise or service. + * @enum {string|null} + */ + product_type?: ('merchandise' | 'service') | null + /** + * @description Result of cardholder's attempt to return the product. + * @enum {string|null} + */ + return_status?: ('merchant_rejected' | 'successful') | null + /** + * Format: unix-time + * @description Date when the product was returned or attempted to be returned. + */ + returned_at?: number | null + } + /** IssuingDisputeDuplicateEvidence */ + issuing_dispute_duplicate_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. */ + card_statement?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. */ + cash_receipt?: (string | components['schemas']['file']) | null + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. */ + check_image?: (string | components['schemas']['file']) | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** @description Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. */ + original_transaction?: string | null + } + /** IssuingDisputeEvidence */ + issuing_dispute_evidence: { + canceled?: components['schemas']['issuing_dispute_canceled_evidence'] + duplicate?: components['schemas']['issuing_dispute_duplicate_evidence'] + fraudulent?: components['schemas']['issuing_dispute_fraudulent_evidence'] + merchandise_not_as_described?: components['schemas']['issuing_dispute_merchandise_not_as_described_evidence'] + not_received?: components['schemas']['issuing_dispute_not_received_evidence'] + other?: components['schemas']['issuing_dispute_other_evidence'] + /** + * @description The reason for filing the dispute. Its value will match the field containing the evidence. + * @enum {string} + */ + reason: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' + service_not_as_described?: components['schemas']['issuing_dispute_service_not_as_described_evidence'] + } + /** IssuingDisputeFraudulentEvidence */ + issuing_dispute_fraudulent_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + } + /** IssuingDisputeMerchandiseNotAsDescribedEvidence */ + issuing_dispute_merchandise_not_as_described_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** + * Format: unix-time + * @description Date when the product was received. + */ + received_at?: number | null + /** @description Description of the cardholder's attempt to return the product. */ + return_description?: string | null + /** + * @description Result of cardholder's attempt to return the product. + * @enum {string|null} + */ + return_status?: ('merchant_rejected' | 'successful') | null + /** + * Format: unix-time + * @description Date when the product was returned or attempted to be returned. + */ + returned_at?: number | null + } + /** IssuingDisputeNotReceivedEvidence */ + issuing_dispute_not_received_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** + * Format: unix-time + * @description Date when the cardholder expected to receive the product. + */ + expected_at?: number | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** @description Description of the merchandise or service that was purchased. */ + product_description?: string | null + /** + * @description Whether the product was a merchandise or service. + * @enum {string|null} + */ + product_type?: ('merchandise' | 'service') | null + } + /** IssuingDisputeOtherEvidence */ + issuing_dispute_other_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** @description Description of the merchandise or service that was purchased. */ + product_description?: string | null + /** + * @description Whether the product was a merchandise or service. + * @enum {string|null} + */ + product_type?: ('merchandise' | 'service') | null + } + /** IssuingDisputeServiceNotAsDescribedEvidence */ + issuing_dispute_service_not_as_described_evidence: { + /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ + additional_documentation?: (string | components['schemas']['file']) | null + /** + * Format: unix-time + * @description Date when order was canceled. + */ + canceled_at?: number | null + /** @description Reason for canceling the order. */ + cancellation_reason?: string | null + /** @description Explanation of why the cardholder is disputing this transaction. */ + explanation?: string | null + /** + * Format: unix-time + * @description Date when the product was received. + */ + received_at?: number | null + } + /** IssuingTransactionAmountDetails */ + issuing_transaction_amount_details: { + /** @description The fee charged by the ATM for the cash withdrawal. */ + atm_fee?: number | null + } + /** IssuingTransactionFlightData */ + issuing_transaction_flight_data: { + /** @description The time that the flight departed. */ + departure_at?: number | null + /** @description The name of the passenger. */ + passenger_name?: string | null + /** @description Whether the ticket is refundable. */ + refundable?: boolean | null + /** @description The legs of the trip. */ + segments?: components['schemas']['issuing_transaction_flight_data_leg'][] | null + /** @description The travel agency that issued the ticket. */ + travel_agency?: string | null + } + /** IssuingTransactionFlightDataLeg */ + issuing_transaction_flight_data_leg: { + /** @description The three-letter IATA airport code of the flight's destination. */ + arrival_airport_code?: string | null + /** @description The airline carrier code. */ + carrier?: string | null + /** @description The three-letter IATA airport code that the flight departed from. */ + departure_airport_code?: string | null + /** @description The flight number. */ + flight_number?: string | null + /** @description The flight's service class. */ + service_class?: string | null + /** @description Whether a stopover is allowed on this flight. */ + stopover_allowed?: boolean | null + } + /** IssuingTransactionFuelData */ + issuing_transaction_fuel_data: { + /** @description The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. */ + type: string + /** @description The units for `volume_decimal`. One of `us_gallon` or `liter`. */ + unit: string + /** + * Format: decimal + * @description The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + */ + unit_cost_decimal: string + /** + * Format: decimal + * @description The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. + */ + volume_decimal?: string | null + } + /** IssuingTransactionLodgingData */ + issuing_transaction_lodging_data: { + /** @description The time of checking into the lodging. */ + check_in_at?: number | null + /** @description The number of nights stayed at the lodging. */ + nights?: number | null + } + /** IssuingTransactionPurchaseDetails */ + issuing_transaction_purchase_details: { + /** @description Information about the flight that was purchased with this transaction. */ + flight?: components['schemas']['issuing_transaction_flight_data'] | null + /** @description Information about fuel that was purchased with this transaction. */ + fuel?: components['schemas']['issuing_transaction_fuel_data'] | null + /** @description Information about lodging that was purchased with this transaction. */ + lodging?: components['schemas']['issuing_transaction_lodging_data'] | null + /** @description The line items in the purchase. */ + receipt?: components['schemas']['issuing_transaction_receipt_data'][] | null + /** @description A merchant-specific order number. */ + reference?: string | null + } + /** IssuingTransactionReceiptData */ + issuing_transaction_receipt_data: { + /** @description The description of the item. The maximum length of this field is 26 characters. */ + description?: string | null + /** @description The quantity of the item. */ + quantity?: number | null + /** @description The total for this line item in cents. */ + total?: number | null + /** @description The unit cost of the item in cents. */ + unit_cost?: number | null + } + /** + * IssuingAuthorization + * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + * purchase to be completed successfully. + * + * Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations). + */ + 'issuing.authorization': { + /** @description The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_details?: components['schemas']['issuing_authorization_amount_details'] | null + /** @description Whether the authorization has been approved. */ + approved: boolean + /** + * @description How the card details were provided. + * @enum {string} + */ + authorization_method: 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe' + /** @description List of balance transactions associated with this authorization. */ + balance_transactions: components['schemas']['balance_transaction'][] + card: components['schemas']['issuing.card'] + /** @description The cardholder to whom this authorization belongs. */ + cardholder?: (string | components['schemas']['issuing.cardholder']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + merchant_amount: number + /** @description The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + merchant_currency: string + merchant_data: components['schemas']['issuing_authorization_merchant_data'] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.authorization' + /** @description The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ + pending_request?: components['schemas']['issuing_authorization_pending_request'] | null + /** @description History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization. */ + request_history: components['schemas']['issuing_authorization_request'][] + /** + * @description The current status of the authorization in its lifecycle. + * @enum {string} + */ + status: 'closed' | 'pending' | 'reversed' + /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ + transactions: components['schemas']['issuing.transaction'][] + verification_data: components['schemas']['issuing_authorization_verification_data'] + /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ + wallet?: string | null + } + /** + * IssuingCard + * @description You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + */ + 'issuing.card': { + /** @description The brand of the card. */ + brand: string + /** + * @description The reason why the card was canceled. + * @enum {string|null} + */ + cancellation_reason?: ('lost' | 'stolen') | null + cardholder: components['schemas']['issuing.cardholder'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ + cvc?: string + /** @description The expiration month of the card. */ + exp_month: number + /** @description The expiration year of the card. */ + exp_year: number + /** @description Unique identifier for the object. */ + id: string + /** @description The last 4 digits of the card number. */ + last4: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ + number?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.card' + /** @description The latest card that replaces this card, if any. */ + replaced_by?: (string | components['schemas']['issuing.card']) | null + /** @description The card this card replaces, if any. */ + replacement_for?: (string | components['schemas']['issuing.card']) | null + /** + * @description The reason why the previous card needed to be replaced. + * @enum {string|null} + */ + replacement_reason?: ('damaged' | 'expired' | 'lost' | 'stolen') | null + /** @description Where and how the card will be shipped. */ + shipping?: components['schemas']['issuing_card_shipping'] | null + spending_controls: components['schemas']['issuing_card_authorization_controls'] + /** + * @description Whether authorizations can be approved on this card. + * @enum {string} + */ + status: 'active' | 'canceled' | 'inactive' + /** + * @description The type of the card. + * @enum {string} + */ + type: 'physical' | 'virtual' + /** @description Information relating to digital wallets (like Apple Pay and Google Pay). */ + wallets?: components['schemas']['issuing_card_wallets'] | null + } + /** + * IssuingCardholder + * @description An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + * + * Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + */ + 'issuing.cardholder': { + billing: components['schemas']['issuing_cardholder_address'] + /** @description Additional information about a `company` cardholder. */ + company?: components['schemas']['issuing_cardholder_company'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The cardholder's email address. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Additional information about an `individual` cardholder. */ + individual?: components['schemas']['issuing_cardholder_individual'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The cardholder's name. This will be printed on cards issued to them. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.cardholder' + /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ + phone_number?: string | null + requirements: components['schemas']['issuing_cardholder_requirements'] + /** @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. */ + spending_controls?: components['schemas']['issuing_cardholder_authorization_controls'] | null + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. + * @enum {string} + */ + status: 'active' | 'blocked' | 'inactive' + /** + * @description One of `individual` or `company`. + * @enum {string} + */ + type: 'company' | 'individual' + } + /** + * IssuingDispute + * @description As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + * + * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) + */ + 'issuing.dispute': { + /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + amount: number + /** @description List of balance transactions associated with the dispute. */ + balance_transactions?: components['schemas']['balance_transaction'][] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The currency the `transaction` was made in. */ + currency: string + evidence: components['schemas']['issuing_dispute_evidence'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.dispute' + /** + * @description Current status of the dispute. + * @enum {string} + */ + status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' + /** @description The transaction being disputed. */ + transaction: string | components['schemas']['issuing.transaction'] + } + /** + * IssuingSettlement + * @description When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + */ + 'issuing.settlement': { + /** @description The Bank Identification Number reflecting this settlement record. */ + bin: string + /** @description The date that the transactions are cleared and posted to user's accounts. */ + clearing_date: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The total interchange received as reimbursement for the transactions. */ + interchange_fees: number + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The total net amount required to settle with the network. */ + net_total: number + /** + * @description The card network for this settlement report. One of ["visa"] + * @enum {string} + */ + network: 'visa' + /** @description The total amount of fees owed to the network. */ + network_fees: number + /** @description The Settlement Identification Number assigned by the network. */ + network_settlement_identifier: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.settlement' + /** @description One of `international` or `uk_national_net`. */ + settlement_service: string + /** @description The total number of transactions reflected in this settlement. */ + transaction_count: number + /** @description The total transaction amount reflected in this settlement. */ + transaction_volume: number + } + /** + * IssuingTransaction + * @description Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + * your Stripe account, such as a completed purchase or refund, is represented by an Issuing + * `Transaction` object. + * + * Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions). + */ + 'issuing.transaction': { + /** @description The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount: number + /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount_details?: components['schemas']['issuing_transaction_amount_details'] | null + /** @description The `Authorization` object that led to this transaction. */ + authorization?: (string | components['schemas']['issuing.authorization']) | null + /** @description ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** @description The card used to make this transaction. */ + card: string | components['schemas']['issuing.card'] + /** @description The cardholder to whom this transaction belongs. */ + cardholder?: (string | components['schemas']['issuing.cardholder']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description If you've disputed the transaction, the ID of the dispute. */ + dispute?: (string | components['schemas']['issuing.dispute']) | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. */ + merchant_amount: number + /** @description The currency with which the merchant is taking payment. */ + merchant_currency: string + merchant_data: components['schemas']['issuing_authorization_merchant_data'] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'issuing.transaction' + /** @description Additional purchase information that is optionally provided by the merchant. */ + purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null + /** + * @description The nature of the transaction. + * @enum {string} + */ + type: 'capture' | 'refund' + /** + * @description The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + * @enum {string|null} + */ + wallet?: ('apple_pay' | 'google_pay' | 'samsung_pay') | null + } + /** + * LineItem + * @description A line item. + */ + item: { + /** @description Total before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total after discounts and taxes. */ + amount_total: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. */ + description: string + /** @description The discounts applied to the line item. */ + discounts?: components['schemas']['line_items_discount_amount'][] + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'item' + /** @description The price used to generate the line item. */ + price?: components['schemas']['price'] | null + /** @description The quantity of products being purchased. */ + quantity?: number | null + /** @description The taxes applied to the line item. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } + /** LegalEntityCompany */ + legal_entity_company: { + address?: components['schemas']['address'] + /** @description The Kana variation of the company's primary address (Japan only). */ + address_kana?: components['schemas']['legal_entity_japan_address'] | null + /** @description The Kanji variation of the company's primary address (Japan only). */ + address_kanji?: components['schemas']['legal_entity_japan_address'] | null + /** @description Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). */ + directors_provided?: boolean + /** @description Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. */ + executives_provided?: boolean + /** @description The company's legal name. */ + name?: string | null + /** @description The Kana variation of the company's legal name (Japan only). */ + name_kana?: string | null + /** @description The Kanji variation of the company's legal name (Japan only). */ + name_kanji?: string | null + /** @description Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). */ + owners_provided?: boolean + /** @description This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. */ + ownership_declaration?: components['schemas']['legal_entity_ubo_declaration'] | null + /** @description The company's phone number (used for verification). */ + phone?: string | null + /** + * @description The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + * @enum {string} + */ + structure?: + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + /** @description Whether the company's business ID number was provided. */ + tax_id_provided?: boolean + /** @description The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ + tax_id_registrar?: string + /** @description Whether the company's business VAT number was provided. */ + vat_id_provided?: boolean + /** @description Information on the verification state of the company. */ + verification?: components['schemas']['legal_entity_company_verification'] | null + } + /** LegalEntityCompanyVerification */ + legal_entity_company_verification: { + document: components['schemas']['legal_entity_company_verification_document'] + } + /** LegalEntityCompanyVerificationDocument */ + legal_entity_company_verification_document: { + /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + back?: (string | components['schemas']['file']) | null + /** @description A user-displayable string describing the verification state of this document. */ + details?: string | null + /** @description One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. */ + details_code?: string | null + /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ + front?: (string | components['schemas']['file']) | null + } + /** LegalEntityDOB */ + legal_entity_dob: { + /** @description The day of birth, between 1 and 31. */ + day?: number | null + /** @description The month of birth, between 1 and 12. */ + month?: number | null + /** @description The four-digit year of birth. */ + year?: number | null + } + /** LegalEntityJapanAddress */ + legal_entity_japan_address: { + /** @description City/Ward. */ + city?: string | null + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string | null + /** @description Block/Building number. */ + line1?: string | null + /** @description Building details. */ + line2?: string | null + /** @description ZIP or postal code. */ + postal_code?: string | null + /** @description Prefecture. */ + state?: string | null + /** @description Town/cho-me. */ + town?: string | null + } + /** LegalEntityPersonVerification */ + legal_entity_person_verification: { + /** @description A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ + additional_document?: components['schemas']['legal_entity_person_verification_document'] | null + /** @description A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ + details?: string | null + /** @description One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. */ + details_code?: string | null + document?: components['schemas']['legal_entity_person_verification_document'] + /** @description The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ + status: string + } + /** LegalEntityPersonVerificationDocument */ + legal_entity_person_verification_document: { + /** @description The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + back?: (string | components['schemas']['file']) | null + /** @description A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". */ + details?: string | null + /** @description One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. */ + details_code?: string | null + /** @description The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ + front?: (string | components['schemas']['file']) | null + } + /** LegalEntityUBODeclaration */ + legal_entity_ubo_declaration: { + /** + * Format: unix-time + * @description The Unix timestamp marking when the beneficial owner attestation was made. + */ + date?: number | null + /** @description The IP address from which the beneficial owner attestation was made. */ + ip?: string | null + /** @description The user-agent string from the browser where the beneficial owner attestation was made. */ + user_agent?: string | null + } + /** InvoiceLineItem */ + line_item: { + /** @description The amount, in %s. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The amount of discount calculated per discount for this line item. */ + discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description If true, discounts will apply to this line item. Always false for prorations. */ + discountable: boolean + /** @description The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'])[] | null + /** @description Unique identifier for the object. */ + id: string + /** @description The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ + invoice_item?: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'line_item' + period: components['schemas']['invoice_line_item_period'] + /** @description The price of the line item. */ + price?: components['schemas']['price'] | null + /** @description Whether this is a proration. */ + proration: boolean + /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ + quantity?: number | null + /** @description The subscription that the invoice item pertains to, if any. */ + subscription?: string | null + /** @description The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. */ + subscription_item?: string + /** @description The amount of tax calculated per tax rate for this line item */ + tax_amounts?: components['schemas']['invoice_tax_amount'][] + /** @description The tax rates which apply to the line item. */ + tax_rates?: components['schemas']['tax_rate'][] + /** + * @description A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + * @enum {string} + */ + type: 'invoiceitem' | 'subscription' + } + /** LineItemsDiscountAmount */ + line_items_discount_amount: { + /** @description The amount discounted. */ + amount: number + discount: components['schemas']['discount'] + } + /** LineItemsTaxAmount */ + line_items_tax_amount: { + /** @description Amount of tax applied for this rate. */ + amount: number + rate: components['schemas']['tax_rate'] + } + /** LoginLink */ + login_link: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'login_link' + /** @description The URL for the login link. */ + url: string + } + /** + * Mandate + * @description A Mandate is a record of the permission a customer has given you to debit their payment method. + */ + mandate: { + customer_acceptance: components['schemas']['customer_acceptance'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + multi_use?: components['schemas']['mandate_multi_use'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'mandate' + /** @description ID of the payment method associated with this mandate. */ + payment_method: string | components['schemas']['payment_method'] + payment_method_details: components['schemas']['mandate_payment_method_details'] + single_use?: components['schemas']['mandate_single_use'] + /** + * @description The status of the mandate, which indicates whether it can be used to initiate a payment. + * @enum {string} + */ + status: 'active' | 'inactive' | 'pending' + /** + * @description The type of the mandate. + * @enum {string} + */ + type: 'multi_use' | 'single_use' + } + /** mandate_acss_debit */ + mandate_acss_debit: { + /** @description List of Stripe products where this mandate can be selected automatically. */ + default_for?: ('invoice' | 'subscription')[] + /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description?: string | null + /** + * @description Payment schedule for the mandate. + * @enum {string} + */ + payment_schedule: 'combined' | 'interval' | 'sporadic' + /** + * @description Transaction type of the mandate. + * @enum {string} + */ + transaction_type: 'business' | 'personal' + } + /** mandate_au_becs_debit */ + mandate_au_becs_debit: { + /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string + } + /** mandate_bacs_debit */ + mandate_bacs_debit: { + /** + * @description The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + * @enum {string} + */ + network_status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @description The unique reference identifying the mandate on the Bacs network. */ + reference: string + /** @description The URL that will contain the mandate that the customer has signed. */ + url: string + } + /** mandate_multi_use */ + mandate_multi_use: { [key: string]: unknown } + /** mandate_payment_method_details */ + mandate_payment_method_details: { + acss_debit?: components['schemas']['mandate_acss_debit'] + au_becs_debit?: components['schemas']['mandate_au_becs_debit'] + bacs_debit?: components['schemas']['mandate_bacs_debit'] + card?: components['schemas']['card_mandate_payment_method_details'] + sepa_debit?: components['schemas']['mandate_sepa_debit'] + /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ + type: string + } + /** mandate_sepa_debit */ + mandate_sepa_debit: { + /** @description The unique reference of the mandate. */ + reference: string + /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string + } + /** mandate_single_use */ + mandate_single_use: { + /** @description On a single use mandate, the amount of the payment. */ + amount: number + /** @description On a single use mandate, the currency of the payment. */ + currency: string + } + /** networks */ + networks: { + /** @description All available networks for the card. */ + available: string[] + /** @description The preferred network for the card. */ + preferred?: string | null + } + /** NotificationEventData */ + notification_event_data: { + /** @description Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. */ + object: { [key: string]: unknown } + /** @description Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ + previous_attributes?: { [key: string]: unknown } + } + /** NotificationEventRequest */ + notification_event_request: { + /** @description ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. */ + id?: string | null + /** @description The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ + idempotency_key?: string | null + } + /** offline_acceptance */ + offline_acceptance: { [key: string]: unknown } + /** online_acceptance */ + online_acceptance: { + /** @description The IP address from which the Mandate was accepted by the customer. */ + ip_address?: string | null + /** @description The user agent of the browser from which the Mandate was accepted by the customer. */ + user_agent?: string | null + } + /** + * Order + * @description Order objects are created to handle end customers' purchases of previously + * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well + * as list all orders. Orders are identified by a unique, random ID. + * + * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + */ + order: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ + amount: number + /** @description The total amount that was returned to the customer. */ + amount_returned?: number | null + /** @description ID of the Connect Application that created the order. */ + application?: string | null + /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ + application_fee?: number | null + /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ + charge?: (string | components['schemas']['charge']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer used for the order. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description The email address of the customer placing the order. */ + email?: string | null + /** @description External coupon code to load for this order. */ + external_coupon_code?: string + /** @description Unique identifier for the object. */ + id: string + /** @description List of items constituting the order. An order can have up to 25 items. */ + items: components['schemas']['order_item'][] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order' + /** + * OrdersResourceOrderReturnList + * @description A list of returns that have taken place for this order. + */ + returns?: { + /** @description Details about each object. */ + data: components['schemas']['order_return'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ + selected_shipping_method?: string | null + /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ + shipping?: components['schemas']['shipping'] | null + /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ + shipping_methods?: components['schemas']['shipping_method'][] | null + /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ + status: string + /** @description The timestamps at which the order status was updated. */ + status_transitions?: components['schemas']['status_transitions'] | null + /** + * Format: unix-time + * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated?: number | null + /** @description The user's order ID if it is different from the Stripe order ID. */ + upstream_id?: string + } + /** + * OrderItem + * @description A representation of the constituent items of any given order. Can be used to + * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. + * + * Related guide: [Orders](https://stripe.com/docs/orders/guide). + */ + order_item: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ + description: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order_item' + /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ + parent?: (string | components['schemas']['sku']) | null + /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ + quantity?: number | null + /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ + type: string + } + /** + * OrderReturn + * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). + * Returns always belong to an order, and may optionally contain a refund. + * + * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). + */ + order_return: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The items included in this order return. */ + items: components['schemas']['order_item'][] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order_return' + /** @description The order that this return includes items from. */ + order?: (string | components['schemas']['order']) | null + /** @description The ID of the refund issued for this return. */ + refund?: (string | components['schemas']['refund']) | null + } + /** PackageDimensions */ + package_dimensions: { + /** @description Height, in inches. */ + height: number + /** @description Length, in inches. */ + length: number + /** @description Weight, in ounces. */ + weight: number + /** @description Width, in inches. */ + width: number + } + /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ + payment_flows_automatic_payment_methods_payment_intent: { + /** @description Automatically calculates compatible payment methods */ + enabled: boolean + } + /** PaymentFlowsPrivatePaymentMethodsAlipay */ + payment_flows_private_payment_methods_alipay: { [key: string]: unknown } + /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ + payment_flows_private_payment_methods_alipay_details: { + /** @description Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ + buyer_id?: string + /** @description Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ + fingerprint?: string | null + /** @description Transaction ID of this particular Alipay transaction. */ + transaction_id?: string | null + } + /** PaymentFlowsPrivatePaymentMethodsKlarnaDOB */ + payment_flows_private_payment_methods_klarna_dob: { + /** @description The day of birth, between 1 and 31. */ + day?: number | null + /** @description The month of birth, between 1 and 12. */ + month?: number | null + /** @description The four-digit year of birth. */ + year?: number | null + } + /** + * PaymentIntent + * @description A PaymentIntent guides you through the process of collecting a payment from your customer. + * We recommend that you create exactly one PaymentIntent for each order or + * customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. + * + * A PaymentIntent transitions through + * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + * throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). + */ + payment_intent: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description Amount that can be captured from this PaymentIntent. */ + amount_capturable?: number + /** @description Amount that was collected by this PaymentIntent. */ + amount_received?: number + /** @description ID of the Connect application that created the PaymentIntent. */ + application?: (string | components['schemas']['application']) | null + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | null + /** @description Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) */ + automatic_payment_methods?: components['schemas']['payment_flows_automatic_payment_methods_payment_intent'] | null + /** + * Format: unix-time + * @description Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + */ + canceled_at?: number | null + /** + * @description Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + * @enum {string|null} + */ + cancellation_reason?: + | ('abandoned' | 'automatic' | 'duplicate' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice') + | null + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * PaymentFlowsPaymentIntentResourceChargeList + * @description Charges that were created by this PaymentIntent, if any. + */ + charges?: { + /** @description This list only contains the latest charge, even if there were previously multiple unsuccessful charges. To view all previous charges for a PaymentIntent, you can filter the charges list using the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). */ + data: components['schemas']['charge'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** + * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + */ + client_secret?: string | null + /** @enum {string} */ + confirmation_method: 'automatic' | 'manual' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description ID of the invoice that created this PaymentIntent, if it exists. */ + invoice?: (string | components['schemas']['invoice']) | null + /** @description The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. */ + last_payment_error?: components['schemas']['api_errors'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ + metadata?: { [key: string]: string } + /** @description If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. */ + next_action?: components['schemas']['payment_intent_next_action'] | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payment_intent' + /** @description The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description ID of the payment method used in this PaymentIntent. */ + payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Payment-method-specific configuration for this PaymentIntent. */ + payment_method_options?: components['schemas']['payment_intent_payment_method_options'] | null + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types: string[] + /** @description If present, this property tells you about the processing state of the payment. */ + processing?: components['schemas']['payment_intent_processing'] | null + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | null + /** @description ID of the review associated with this PaymentIntent, if any. */ + review?: (string | components['schemas']['review']) | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string|null} + */ + setup_future_usage?: ('off_session' | 'on_session') | null + /** @description Shipping information for this PaymentIntent. */ + shipping?: components['schemas']['shipping'] | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** + * @description Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + * @enum {string} + */ + status: 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' + /** @description The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_data?: components['schemas']['transfer_data'] | null + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string | null + } + /** PaymentIntentCardProcessing */ + payment_intent_card_processing: { [key: string]: unknown } + /** PaymentIntentNextAction */ + payment_intent_next_action: { + alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] + boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] + /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ + type: string + /** @description When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ + use_stripe_sdk?: { [key: string]: unknown } + verify_with_microdeposits?: components['schemas']['payment_intent_next_action_verify_with_microdeposits'] + wechat_pay_display_qr_code?: components['schemas']['payment_intent_next_action_wechat_pay_display_qr_code'] + wechat_pay_redirect_to_android_app?: components['schemas']['payment_intent_next_action_wechat_pay_redirect_to_android_app'] + wechat_pay_redirect_to_ios_app?: components['schemas']['payment_intent_next_action_wechat_pay_redirect_to_ios_app'] + } + /** PaymentIntentNextActionAlipayHandleRedirect */ + payment_intent_next_action_alipay_handle_redirect: { + /** @description The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. */ + native_data?: string | null + /** @description The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. */ + native_url?: string | null + /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string | null + /** @description The URL you must redirect your customer to in order to authenticate the payment. */ + url?: string | null + } + /** payment_intent_next_action_boleto */ + payment_intent_next_action_boleto: { + /** + * Format: unix-time + * @description The timestamp after which the boleto expires. + */ + expires_at?: number | null + /** @description The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. */ + hosted_voucher_url?: string | null + /** @description The boleto number. */ + number?: string | null + /** @description The URL to the downloadable boleto voucher PDF. */ + pdf?: string | null + } + /** PaymentIntentNextActionDisplayOxxoDetails */ + payment_intent_next_action_display_oxxo_details: { + /** + * Format: unix-time + * @description The timestamp after which the OXXO voucher expires. + */ + expires_after?: number | null + /** @description The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. */ + hosted_voucher_url?: string | null + /** @description OXXO reference number. */ + number?: string | null + } + /** PaymentIntentNextActionRedirectToUrl */ + payment_intent_next_action_redirect_to_url: { + /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string | null + /** @description The URL you must redirect your customer to in order to authenticate the payment. */ + url?: string | null + } + /** PaymentIntentNextActionVerifyWithMicrodeposits */ + payment_intent_next_action_verify_with_microdeposits: { + /** + * Format: unix-time + * @description The timestamp when the microdeposits are expected to land. + */ + arrival_date: number + /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ + hosted_verification_url: string + } + /** PaymentIntentNextActionWechatPayDisplayQrCode */ + payment_intent_next_action_wechat_pay_display_qr_code: { + /** @description The data being used to generate QR code */ + data: string + /** @description The base64 image data for a pre-generated QR code */ + image_data_url: string + /** @description The image_url_png string used to render QR code */ + image_url_png: string + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string + } + /** PaymentIntentNextActionWechatPayRedirectToAndroidApp */ + payment_intent_next_action_wechat_pay_redirect_to_android_app: { + /** @description app_id is the APP ID registered on WeChat open platform */ + app_id: string + /** @description nonce_str is a random string */ + nonce_str: string + /** @description package is static value */ + package: string + /** @description an unique merchant ID assigned by Wechat Pay */ + partner_id: string + /** @description an unique trading ID assigned by Wechat Pay */ + prepay_id: string + /** @description A signature */ + sign: string + /** @description Specifies the current time in epoch format */ + timestamp: string + } + /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ + payment_intent_next_action_wechat_pay_redirect_to_ios_app: { + /** @description An universal link that redirect to Wechat Pay APP */ + native_url: string + } + /** PaymentIntentPaymentMethodOptions */ + payment_intent_payment_method_options: { + acss_debit?: + | components['schemas']['payment_intent_payment_method_options_acss_debit'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + afterpay_clearpay?: + | components['schemas']['payment_method_options_afterpay_clearpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + alipay?: + | components['schemas']['payment_method_options_alipay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + au_becs_debit?: + | components['schemas']['payment_intent_payment_method_options_au_becs_debit'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + bacs_debit?: + | components['schemas']['payment_method_options_bacs_debit'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + bancontact?: + | components['schemas']['payment_method_options_bancontact'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + boleto?: + | components['schemas']['payment_method_options_boleto'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + card?: + | components['schemas']['payment_intent_payment_method_options_card'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + card_present?: + | components['schemas']['payment_method_options_card_present'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + eps?: + | components['schemas']['payment_intent_payment_method_options_eps'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + fpx?: components['schemas']['payment_method_options_fpx'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + giropay?: + | components['schemas']['payment_method_options_giropay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + grabpay?: + | components['schemas']['payment_method_options_grabpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ideal?: + | components['schemas']['payment_method_options_ideal'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + interac_present?: + | components['schemas']['payment_method_options_interac_present'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + klarna?: + | components['schemas']['payment_method_options_klarna'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + oxxo?: + | components['schemas']['payment_method_options_oxxo'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + p24?: components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + sepa_debit?: + | components['schemas']['payment_intent_payment_method_options_sepa_debit'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + sofort?: + | components['schemas']['payment_method_options_sofort'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + wechat_pay?: + | components['schemas']['payment_method_options_wechat_pay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + } + /** payment_intent_payment_method_options_acss_debit */ + payment_intent_payment_method_options_acss_debit: { + mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** payment_intent_payment_method_options_au_becs_debit */ + payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } + /** payment_intent_payment_method_options_card */ + payment_intent_payment_method_options_card: { + /** + * @description Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: components['schemas']['payment_method_options_card_installments'] | null + /** + * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string|null} + */ + request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_eps */ + payment_intent_payment_method_options_eps: { [key: string]: unknown } + /** payment_intent_payment_method_options_mandate_options_acss_debit */ + payment_intent_payment_method_options_mandate_options_acss_debit: { + /** @description A URL for custom mandate text */ + custom_mandate_url?: string + /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description?: string | null + /** + * @description Payment schedule for the mandate. + * @enum {string|null} + */ + payment_schedule?: ('combined' | 'interval' | 'sporadic') | null + /** + * @description Transaction type of the mandate. + * @enum {string|null} + */ + transaction_type?: ('business' | 'personal') | null + } + /** payment_intent_payment_method_options_mandate_options_sepa_debit */ + payment_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } + /** payment_intent_payment_method_options_sepa_debit */ + payment_intent_payment_method_options_sepa_debit: { + mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + } + /** PaymentIntentProcessing */ + payment_intent_processing: { + card?: components['schemas']['payment_intent_card_processing'] + /** + * @description Type of the payment method for which payment is in `processing` state, one of `card`. + * @enum {string} + */ + type: 'card' + } + /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ + payment_intent_type_specific_payment_method_options_client: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** + * PaymentLink + * @description A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + * + * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + * + * Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api) + */ + payment_link: { + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ + active: boolean + after_completion: components['schemas']['payment_links_resource_after_completion'] + /** @description Whether user redeemable promotion codes are enabled. */ + allow_promotion_codes: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null + /** @description This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ + application_fee_percent?: number | null + automatic_tax: components['schemas']['payment_links_resource_automatic_tax'] + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection: 'auto' | 'required' + /** @description Unique identifier for the object. */ + id: string + /** + * PaymentLinksResourceListLineItems + * @description The line items representing what is being sold. + */ + line_items?: { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payment_link' + /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: 'card'[] | null + phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null + /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ + subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null + /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ + transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null + /** @description The public URL that can be shared with customers. */ + url: string + } + /** PaymentLinksResourceAfterCompletion */ + payment_links_resource_after_completion: { + hosted_confirmation?: components['schemas']['payment_links_resource_completion_behavior_confirmation_page'] + redirect?: components['schemas']['payment_links_resource_completion_behavior_redirect'] + /** + * @description The specified behavior after the purchase is complete. + * @enum {string} + */ + type: 'hosted_confirmation' | 'redirect' + } + /** PaymentLinksResourceAutomaticTax */ + payment_links_resource_automatic_tax: { + /** @description If `true`, tax will be calculated automatically using the customer's location. */ + enabled: boolean + } + /** PaymentLinksResourceCompletionBehaviorConfirmationPage */ + payment_links_resource_completion_behavior_confirmation_page: { + /** @description The custom message that is displayed to the customer after the purchase is complete. */ + custom_message?: string | null + } + /** PaymentLinksResourceCompletionBehaviorRedirect */ + payment_links_resource_completion_behavior_redirect: { + /** @description The URL the customer will be redirected to after the purchase is complete. */ + url: string + } + /** PaymentLinksResourcePhoneNumberCollection */ + payment_links_resource_phone_number_collection: { + /** @description If `true`, a phone number will be collected during checkout. */ + enabled: boolean + } + /** PaymentLinksResourceShippingAddressCollection */ + payment_links_resource_shipping_address_collection: { + /** @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. */ + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** PaymentLinksResourceSubscriptionData */ + payment_links_resource_subscription_data: { + /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ + trial_period_days?: number | null + } + /** PaymentLinksResourceTransferData */ + payment_links_resource_transfer_data: { + /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ + amount?: number | null + /** @description The connected account receiving the transfer. */ + destination: string | components['schemas']['account'] + } + /** + * PaymentMethod + * @description PaymentMethod objects represent your customer's payment instruments. + * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * Customer objects to store instrument details for future payments. + * + * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + */ + payment_method: { + acss_debit?: components['schemas']['payment_method_acss_debit'] + afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] + alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] + au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] + bacs_debit?: components['schemas']['payment_method_bacs_debit'] + bancontact?: components['schemas']['payment_method_bancontact'] + billing_details: components['schemas']['billing_details'] + boleto?: components['schemas']['payment_method_boleto'] + card?: components['schemas']['payment_method_card'] + card_present?: components['schemas']['payment_method_card_present'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ + customer?: (string | components['schemas']['customer']) | null + eps?: components['schemas']['payment_method_eps'] + fpx?: components['schemas']['payment_method_fpx'] + giropay?: components['schemas']['payment_method_giropay'] + grabpay?: components['schemas']['payment_method_grabpay'] + /** @description Unique identifier for the object. */ + id: string + ideal?: components['schemas']['payment_method_ideal'] + interac_present?: components['schemas']['payment_method_interac_present'] + klarna?: components['schemas']['payment_method_klarna'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payment_method' + oxxo?: components['schemas']['payment_method_oxxo'] + p24?: components['schemas']['payment_method_p24'] + sepa_debit?: components['schemas']['payment_method_sepa_debit'] + sofort?: components['schemas']['payment_method_sofort'] + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'card_present' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'interac_present' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + wechat_pay?: components['schemas']['payment_method_wechat_pay'] + } + /** payment_method_acss_debit */ + payment_method_acss_debit: { + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Institution number of the bank account. */ + institution_number?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Transit number of the bank account. */ + transit_number?: string | null + } + /** payment_method_afterpay_clearpay */ + payment_method_afterpay_clearpay: { [key: string]: unknown } + /** payment_method_au_becs_debit */ + payment_method_au_becs_debit: { + /** @description Six-digit number identifying bank and branch associated with this bank account. */ + bsb_number?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + } + /** payment_method_bacs_debit */ + payment_method_bacs_debit: { + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Sort code of the bank account. (e.g., `10-20-30`) */ + sort_code?: string | null + } + /** payment_method_bancontact */ + payment_method_bancontact: { [key: string]: unknown } + /** payment_method_boleto */ + payment_method_boleto: { + /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ + tax_id: string + } + /** payment_method_card */ + payment_method_card: { + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: string + /** @description Checks on Card address and CVC if provided. */ + checks?: components['schemas']['payment_method_card_checks'] | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string + /** @description Details of the original PaymentMethod that created this object. */ + generated_from?: components['schemas']['payment_method_card_generated_card'] | null + /** @description The last four digits of the card. */ + last4: string + /** @description Contains information about card networks that can be used to process the payment. */ + networks?: components['schemas']['networks'] | null + /** @description Contains details on how this Card maybe be used for 3D Secure authentication. */ + three_d_secure_usage?: components['schemas']['three_d_secure_usage'] | null + /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet?: components['schemas']['payment_method_card_wallet'] | null + } + /** payment_method_card_checks */ + payment_method_card_checks: { + /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null + /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string | null + /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string | null + } + /** payment_method_card_generated_card */ + payment_method_card_generated_card: { + /** @description The charge that created this object. */ + charge?: string | null + /** @description Transaction-specific details of the payment method used in the payment. */ + payment_method_details?: components['schemas']['card_generated_from_payment_method_details'] | null + /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ + setup_attempt?: (string | components['schemas']['setup_attempt']) | null + } + /** payment_method_card_present */ + payment_method_card_present: { [key: string]: unknown } + /** payment_method_card_wallet */ + payment_method_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_card_wallet_visa_checkout'] + } + /** payment_method_card_wallet_amex_express_checkout */ + payment_method_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_card_wallet_apple_pay */ + payment_method_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_card_wallet_google_pay */ + payment_method_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_card_wallet_masterpass */ + payment_method_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_card_wallet_samsung_pay */ + payment_method_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_card_wallet_visa_checkout */ + payment_method_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details */ + payment_method_details: { + ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] + ach_debit?: components['schemas']['payment_method_details_ach_debit'] + acss_debit?: components['schemas']['payment_method_details_acss_debit'] + afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] + alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] + au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] + bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] + bancontact?: components['schemas']['payment_method_details_bancontact'] + boleto?: components['schemas']['payment_method_details_boleto'] + card?: components['schemas']['payment_method_details_card'] + card_present?: components['schemas']['payment_method_details_card_present'] + eps?: components['schemas']['payment_method_details_eps'] + fpx?: components['schemas']['payment_method_details_fpx'] + giropay?: components['schemas']['payment_method_details_giropay'] + grabpay?: components['schemas']['payment_method_details_grabpay'] + ideal?: components['schemas']['payment_method_details_ideal'] + interac_present?: components['schemas']['payment_method_details_interac_present'] + klarna?: components['schemas']['payment_method_details_klarna'] + multibanco?: components['schemas']['payment_method_details_multibanco'] + oxxo?: components['schemas']['payment_method_details_oxxo'] + p24?: components['schemas']['payment_method_details_p24'] + sepa_debit?: components['schemas']['payment_method_details_sepa_debit'] + sofort?: components['schemas']['payment_method_details_sofort'] + stripe_account?: components['schemas']['payment_method_details_stripe_account'] + /** + * @description The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + * An additional hash is included on `payment_method_details` with a name matching this value. + * It contains information specific to the payment method. + */ + type: string + wechat?: components['schemas']['payment_method_details_wechat'] + wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] + } + /** payment_method_details_ach_credit_transfer */ + payment_method_details_ach_credit_transfer: { + /** @description Account number to transfer funds to. */ + account_number?: string | null + /** @description Name of the bank associated with the routing number. */ + bank_name?: string | null + /** @description Routing transit number for the bank account to transfer funds to. */ + routing_number?: string | null + /** @description SWIFT code of the bank associated with the routing number. */ + swift_code?: string | null + } + /** payment_method_details_ach_debit */ + payment_method_details_ach_debit: { + /** + * @description Type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Routing transit number of the bank account. */ + routing_number?: string | null + } + /** payment_method_details_acss_debit */ + payment_method_details_acss_debit: { + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Institution number of the bank account */ + institution_number?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description ID of the mandate used to make this payment. */ + mandate?: string + /** @description Transit number of the bank account. */ + transit_number?: string | null + } + /** payment_method_details_afterpay_clearpay */ + payment_method_details_afterpay_clearpay: { + /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ + reference?: string | null + } + /** payment_method_details_au_becs_debit */ + payment_method_details_au_becs_debit: { + /** @description Bank-State-Branch number of the bank account. */ + bsb_number?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description ID of the mandate used to make this payment. */ + mandate?: string + } + /** payment_method_details_bacs_debit */ + payment_method_details_bacs_debit: { + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description ID of the mandate used to make this payment. */ + mandate?: string | null + /** @description Sort code of the bank account. (e.g., `10-20-30`) */ + sort_code?: string | null + } + /** payment_method_details_bancontact */ + payment_method_details_bancontact: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + * @enum {string|null} + */ + preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null + /** + * @description Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_boleto */ + payment_method_details_boleto: { + /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ + tax_id: string + } + /** payment_method_details_card */ + payment_method_details_card: { + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string | null + /** @description Check results by Card networks on Card address and CVC at time of payment. */ + checks?: components['schemas']['payment_method_details_card_checks'] | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** + * @description Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: components['schemas']['payment_method_details_card_installments'] | null + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Populated if this transaction used 3D Secure authentication. */ + three_d_secure?: components['schemas']['three_d_secure_details'] | null + /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet?: components['schemas']['payment_method_details_card_wallet'] | null + } + /** payment_method_details_card_checks */ + payment_method_details_card_checks: { + /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null + /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string | null + /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string | null + } + /** payment_method_details_card_installments */ + payment_method_details_card_installments: { + /** @description Installment plan selected for the payment. */ + plan?: components['schemas']['payment_method_details_card_installments_plan'] | null + } + /** payment_method_details_card_installments_plan */ + payment_method_details_card_installments_plan: { + /** @description For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ + count?: number | null + /** + * @description For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + * @enum {string|null} + */ + interval?: 'month' | null + /** + * @description Type of installment plan, one of `fixed_count`. + * @enum {string} + */ + type: 'fixed_count' + } + /** payment_method_details_card_present */ + payment_method_details_card_present: { + /** @description The authorized amount */ + amount_authorized?: number | null + /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string | null + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported?: boolean | null + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null + } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null + } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null + } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + preferred_locales?: string[] | null + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: components['schemas']['payment_method_details_interac_present_receipt'] | null + } + /** payment_method_details_interac_present_receipt */ + payment_method_details_interac_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'savings' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } + /** payment_method_details_klarna */ + payment_method_details_klarna: { + /** + * @description The Klarna payment method used for this transaction. + * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + */ + payment_method_category?: string | null + /** + * @description Preferred language of the Klarna authorization page that the customer is redirected to. + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + */ + preferred_locale?: string | null + } + /** payment_method_details_multibanco */ + payment_method_details_multibanco: { + /** @description Entity number associated with this Multibanco payment. */ + entity?: string | null + /** @description Reference number associated with this Multibanco payment. */ + reference?: string | null + } + /** payment_method_details_oxxo */ + payment_method_details_oxxo: { + /** @description OXXO reference number */ + number?: string | null + } + /** payment_method_details_p24 */ + payment_method_details_p24: { + /** + * @description The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + * @enum {string|null} + */ + bank?: + | ( + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + ) + | null + /** @description Unique reference for this Przelewy24 payment. */ + reference?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Przelewy24 directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_sepa_debit */ + payment_method_details_sepa_debit: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Branch code of bank associated with the bank account. */ + branch_code?: string | null + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four characters of the IBAN. */ + last4?: string | null + /** @description ID of the mandate used to make this payment. */ + mandate?: string | null + } + /** payment_method_details_sofort */ + payment_method_details_sofort: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Preferred language of the SOFORT authorization page that the customer is redirected to. + * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + * @enum {string|null} + */ + preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Owner's verified full name. Values are verified or provided by SOFORT directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_stripe_account */ + payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_wechat */ + payment_method_details_wechat: { [key: string]: unknown } + /** payment_method_details_wechat_pay */ + payment_method_details_wechat_pay: { + /** @description Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. */ + fingerprint?: string | null + /** @description Transaction ID of this particular WeChat Pay transaction. */ + transaction_id?: string | null + } + /** payment_method_eps */ + payment_method_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + } + /** payment_method_fpx */ + payment_method_fpx: { + /** + * @description The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** payment_method_giropay */ + payment_method_giropay: { [key: string]: unknown } + /** payment_method_grabpay */ + payment_method_grabpay: { [key: string]: unknown } + /** payment_method_ideal */ + payment_method_ideal: { + /** + * @description The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank, if the bank was provided. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + } + /** payment_method_interac_present */ + payment_method_interac_present: { [key: string]: unknown } + /** payment_method_klarna */ + payment_method_klarna: { + /** @description The customer's date of birth, if provided. */ + dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null + } + /** payment_method_options_afterpay_clearpay */ + payment_method_options_afterpay_clearpay: { + /** + * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + */ + reference?: string | null + } + /** payment_method_options_alipay */ + payment_method_options_alipay: { [key: string]: unknown } + /** payment_method_options_bacs_debit */ + payment_method_options_bacs_debit: { [key: string]: unknown } + /** payment_method_options_bancontact */ + payment_method_options_bancontact: { + /** + * @description Preferred language of the Bancontact authorization page that the customer is redirected to. + * @enum {string} + */ + preferred_language: 'de' | 'en' | 'fr' | 'nl' + } + /** payment_method_options_boleto */ + payment_method_options_boleto: { + /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ + expires_after_days: number + } + /** payment_method_options_card_installments */ + payment_method_options_card_installments: { + /** @description Installment plans that may be selected for this PaymentIntent. */ + available_plans?: components['schemas']['payment_method_details_card_installments_plan'][] | null + /** @description Whether Installments are enabled for this PaymentIntent. */ + enabled: boolean + /** @description Installment plan selected for this PaymentIntent. */ + plan?: components['schemas']['payment_method_details_card_installments_plan'] | null + } + /** payment_method_options_card_present */ + payment_method_options_card_present: { [key: string]: unknown } + /** payment_method_options_fpx */ + payment_method_options_fpx: { [key: string]: unknown } + /** payment_method_options_giropay */ + payment_method_options_giropay: { [key: string]: unknown } + /** payment_method_options_grabpay */ + payment_method_options_grabpay: { [key: string]: unknown } + /** payment_method_options_ideal */ + payment_method_options_ideal: { [key: string]: unknown } + /** payment_method_options_interac_present */ + payment_method_options_interac_present: { [key: string]: unknown } + /** payment_method_options_klarna */ + payment_method_options_klarna: { + /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ + preferred_locale?: string | null + } + /** payment_method_options_oxxo */ + payment_method_options_oxxo: { + /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ + expires_after_days: number + } + /** payment_method_options_p24 */ + payment_method_options_p24: { [key: string]: unknown } + /** payment_method_options_sofort */ + payment_method_options_sofort: { + /** + * @description Preferred language of the SOFORT authorization page that the customer is redirected to. + * @enum {string|null} + */ + preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + } + /** payment_method_options_wechat_pay */ + payment_method_options_wechat_pay: { + /** @description The app ID registered with WeChat Pay. Only required when client is ios or android. */ + app_id?: string | null + /** + * @description The client type that the end customer will pay from + * @enum {string|null} + */ + client?: ('android' | 'ios' | 'web') | null + } + /** payment_method_oxxo */ + payment_method_oxxo: { [key: string]: unknown } + /** payment_method_p24 */ + payment_method_p24: { + /** + * @description The customer's bank, if provided. + * @enum {string|null} + */ + bank?: + | ( + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + ) + | null + } + /** payment_method_sepa_debit */ + payment_method_sepa_debit: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Branch code of bank associated with the bank account. */ + branch_code?: string | null + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Information about the object that generated this PaymentMethod. */ + generated_from?: components['schemas']['sepa_debit_generated_from'] | null + /** @description Last four characters of the IBAN. */ + last4?: string | null + } + /** payment_method_sofort */ + payment_method_sofort: { + /** @description Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null + } + /** payment_method_wechat_pay */ + payment_method_wechat_pay: { [key: string]: unknown } + /** PaymentPagesCheckoutSessionAfterExpiration */ + payment_pages_checkout_session_after_expiration: { + /** @description When set, configuration used to recover the Checkout Session on expiry. */ + recovery?: components['schemas']['payment_pages_checkout_session_after_expiration_recovery'] | null + } + /** PaymentPagesCheckoutSessionAfterExpirationRecovery */ + payment_pages_checkout_session_after_expiration_recovery: { + /** @description Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` */ + allow_promotion_codes: boolean + /** + * @description If `true`, a recovery url will be generated to recover this Checkout Session if it + * expires before a transaction is completed. It will be attached to the + * Checkout Session object upon expiration. + */ + enabled: boolean + /** + * Format: unix-time + * @description The timestamp at which the recovery URL will expire. + */ + expires_at?: number | null + /** @description URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session */ + url?: string | null + } + /** PaymentPagesCheckoutSessionAutomaticTax */ + payment_pages_checkout_session_automatic_tax: { + /** @description Indicates whether automatic tax is enabled for the session */ + enabled: boolean + /** + * @description The status of the most recent automated tax calculation for this session. + * @enum {string|null} + */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** PaymentPagesCheckoutSessionConsent */ + payment_pages_checkout_session_consent: { + /** + * @description If `opt_in`, the customer consents to receiving promotional communications + * from the merchant about this Checkout Session. + * @enum {string|null} + */ + promotions?: ('opt_in' | 'opt_out') | null + } + /** PaymentPagesCheckoutSessionConsentCollection */ + payment_pages_checkout_session_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + * Session will determine whether to display an option to opt into promotional communication + * from the merchant depending on the customer's locale. Only available to US merchants. + * @enum {string|null} + */ + promotions?: 'auto' | null + } + /** PaymentPagesCheckoutSessionCustomerDetails */ + payment_pages_checkout_session_customer_details: { + /** + * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + */ + email?: string | null + /** @description The customer's phone number at the time of checkout */ + phone?: string | null + /** + * @description The customer’s tax exempt status at time of checkout. + * @enum {string|null} + */ + tax_exempt?: ('exempt' | 'none' | 'reverse') | null + /** @description The customer’s tax IDs at time of checkout. */ + tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null + } + /** PaymentPagesCheckoutSessionPhoneNumberCollection */ + payment_pages_checkout_session_phone_number_collection: { + /** @description Indicates whether phone number collection is enabled for the session */ + enabled: boolean + } + /** PaymentPagesCheckoutSessionShippingAddressCollection */ + payment_pages_checkout_session_shipping_address_collection: { + /** + * @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for + * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + */ + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** PaymentPagesCheckoutSessionShippingOption */ + payment_pages_checkout_session_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number + /** @description The shipping rate. */ + shipping_rate: string | components['schemas']['shipping_rate'] + } + /** PaymentPagesCheckoutSessionTaxID */ + payment_pages_checkout_session_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null + } + /** PaymentPagesCheckoutSessionTaxIDCollection */ + payment_pages_checkout_session_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session */ + enabled: boolean + } + /** PaymentPagesCheckoutSessionTotalDetails */ + payment_pages_checkout_session_total_details: { + /** @description This is the sum of all the line item discounts. */ + amount_discount: number + /** @description This is the sum of all the line item shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the line item tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] + } + /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ + payment_pages_checkout_session_total_details_resource_breakdown: { + /** @description The aggregated line item discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated line item tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } + /** Polymorphic */ + payment_source: + | components['schemas']['account'] + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + /** + * Payout + * @description A `Payout` object is created when you receive funds from Stripe, or when you + * initiate a payout to either a bank account or debit card of a [connected + * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + * as well as list all payouts. Payouts are made on [varying + * schedules](/docs/connect/manage-payout-schedule), depending on your country and + * industry. + * + * Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). + */ + payout: { + /** @description Amount (in %s) to be transferred to your bank account or debit card. */ + amount: number + /** + * Format: unix-time + * @description Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. + */ + arrival_date: number + /** @description Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). */ + automatic: boolean + /** @description ID of the balance transaction that describes the impact of this payout on your account balance. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description ID of the bank account or card the payout was sent to. */ + destination?: + | ( + | string + | components['schemas']['bank_account'] + | components['schemas']['card'] + | components['schemas']['deleted_bank_account'] + | components['schemas']['deleted_card'] + ) + | null + /** @description If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. */ + failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** @description Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. */ + failure_code?: string | null + /** @description Message to user further explaining reason for payout failure if available. */ + failure_message?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) */ + method: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'payout' + /** @description If the payout reverses another, this is the ID of the original payout. */ + original_payout?: (string | components['schemas']['payout']) | null + /** @description If the payout was reversed, this is the ID of the payout that reverses this payout. */ + reversed_by?: (string | components['schemas']['payout']) | null + /** @description The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ + source_type: string + /** @description Extra information about a payout to be displayed on the user's bank statement. */ + statement_descriptor?: string | null + /** @description Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. */ + status: string + /** + * @description Can be `bank_account` or `card`. + * @enum {string} + */ + type: 'bank_account' | 'card' + } + /** Period */ + period: { + /** + * Format: unix-time + * @description The end date of this usage period. All usage up to and including this point in time is included. + */ + end?: number | null + /** + * Format: unix-time + * @description The start date of this usage period. All usage after this point in time is included. + */ + start?: number | null + } + /** + * Person + * @description This is an object representing a person associated with a Stripe account. + * + * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. + * + * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). + */ + person: { + /** @description The account the person is associated with. */ + account: string + address?: components['schemas']['address'] + address_kana?: components['schemas']['legal_entity_japan_address'] | null + address_kanji?: components['schemas']['legal_entity_japan_address'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + dob?: components['schemas']['legal_entity_dob'] + /** @description The person's email address. */ + email?: string | null + /** @description The person's first name. */ + first_name?: string | null + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string | null + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string | null + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] + future_requirements?: components['schemas']['person_future_requirements'] | null + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Whether the person's `id_number` was provided. */ + id_number_provided?: boolean + /** @description The person's last name. */ + last_name?: string | null + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string | null + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string | null + /** @description The person's maiden name. */ + maiden_name?: string | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } + /** @description The country where the person is a national. */ + nationality?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'person' + /** @description The person's phone number. */ + phone?: string | null + /** + * @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + * @enum {string} + */ + political_exposure?: 'existing' | 'none' + relationship?: components['schemas']['person_relationship'] + requirements?: components['schemas']['person_requirements'] | null + /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ + ssn_last_4_provided?: boolean + verification?: components['schemas']['legal_entity_person_verification'] + } + /** PersonFutureRequirements */ + person_future_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. */ + currently_due: string[] + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: components['schemas']['account_requirements_error'][] + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. */ + eventually_due: string[] + /** @description Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ + pending_verification: string[] + } + /** PersonRelationship */ + person_relationship: { + /** @description Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. */ + director?: boolean | null + /** @description Whether the person has significant responsibility to control, manage, or direct the organization. */ + executive?: boolean | null + /** @description Whether the person is an owner of the account’s legal entity. */ + owner?: boolean | null + /** @description The percent owned by the person of the account's legal entity. */ + percent_ownership?: number | null + /** @description Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. */ + representative?: boolean | null + /** @description The person's title (e.g., CEO, Support Engineer). */ + title?: string | null + } + /** PersonRequirements */ + person_requirements: { + /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ + alternatives?: components['schemas']['account_requirements_alternative'][] | null + /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ + currently_due: string[] + /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ + errors: components['schemas']['account_requirements_error'][] + /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. */ + eventually_due: string[] + /** @description Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. */ + past_due: string[] + /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ + pending_verification: string[] + } + /** + * Plan + * @description You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + * + * Plans define the base price, currency, and billing cycle for recurring purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ + plan: { + /** @description Whether the plan can be used for new purchases. */ + active: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string|null} + */ + aggregate_usage?: ('last_during_period' | 'last_ever' | 'max' | 'sum') | null + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + amount_decimal?: string | null + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme: 'per_unit' | 'tiered' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ + interval_count: number + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'plan' + /** @description The product whose pricing this plan determines. */ + product?: (string | components['schemas']['product'] | components['schemas']['deleted_product']) | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['plan_tier'][] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + * @enum {string|null} + */ + tiers_mode?: ('graduated' | 'volume') | null + /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ + transform_usage?: components['schemas']['transform_usage'] | null + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number | null + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type: 'licensed' | 'metered' + } + /** PlanTier */ + plan_tier: { + /** @description Price for the entire tier. */ + flat_amount?: number | null + /** + * Format: decimal + * @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ + flat_amount_decimal?: string | null + /** @description Per unit price for units relevant to the tier. */ + unit_amount?: number | null + /** + * Format: decimal + * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ + unit_amount_decimal?: string | null + /** @description Up to and including to this quantity will be contained in the tier. */ + up_to?: number | null + } + /** PlatformTax */ + platform_tax_fee: { + /** @description The Connected account that incurred this charge. */ + account: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'platform_tax_fee' + /** @description The payment object that caused this tax to be inflicted. */ + source_transaction: string + /** @description The type of tax (VAT). */ + type: string + } + /** PortalBusinessProfile */ + portal_business_profile: { + /** @description The messaging shown to customers in the portal. */ + headline?: string | null + /** @description A link to the business’s publicly available privacy policy. */ + privacy_policy_url: string + /** @description A link to the business’s publicly available terms of service. */ + terms_of_service_url: string + } + /** PortalCustomerUpdate */ + portal_customer_update: { + /** @description The types of customer updates that are supported. When empty, customers are not updateable. */ + allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] + /** @description Whether the feature is enabled. */ + enabled: boolean + } + /** PortalFeatures */ + portal_features: { + customer_update: components['schemas']['portal_customer_update'] + invoice_history: components['schemas']['portal_invoice_list'] + payment_method_update: components['schemas']['portal_payment_method_update'] + subscription_cancel: components['schemas']['portal_subscription_cancel'] + subscription_pause: components['schemas']['portal_subscription_pause'] + subscription_update: components['schemas']['portal_subscription_update'] + } + /** PortalInvoiceList */ + portal_invoice_list: { + /** @description Whether the feature is enabled. */ + enabled: boolean + } + /** PortalPaymentMethodUpdate */ + portal_payment_method_update: { + /** @description Whether the feature is enabled. */ + enabled: boolean + } + /** PortalSubscriptionCancel */ + portal_subscription_cancel: { + cancellation_reason: components['schemas']['portal_subscription_cancellation_reason'] + /** @description Whether the feature is enabled. */ + enabled: boolean + /** + * @description Whether to cancel subscriptions immediately or at the end of the billing period. + * @enum {string} + */ + mode: 'at_period_end' | 'immediately' + /** + * @description Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + * @enum {string} + */ + proration_behavior: 'always_invoice' | 'create_prorations' | 'none' + } + /** PortalSubscriptionCancellationReason */ + portal_subscription_cancellation_reason: { + /** @description Whether the feature is enabled. */ + enabled: boolean + /** @description Which cancellation reasons will be given as options to the customer. */ + options: ('customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused')[] + } + /** PortalSubscriptionPause */ + portal_subscription_pause: { + /** @description Whether the feature is enabled. */ + enabled: boolean + } + /** PortalSubscriptionUpdate */ + portal_subscription_update: { + /** @description The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. */ + default_allowed_updates: ('price' | 'promotion_code' | 'quantity')[] + /** @description Whether the feature is enabled. */ + enabled: boolean + /** @description The list of products that support subscription updates. */ + products?: components['schemas']['portal_subscription_update_product'][] | null + /** + * @description Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + * @enum {string} + */ + proration_behavior: 'always_invoice' | 'create_prorations' | 'none' + } + /** PortalSubscriptionUpdateProduct */ + portal_subscription_update_product: { + /** @description The list of price IDs which, when subscribed to, a subscription can be updated. */ + prices: string[] + /** @description The product ID. */ + product: string + } + /** + * Price + * @description Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + * + * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + */ + price: { + /** @description Whether the price can be used for new purchases. */ + active: boolean + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme: 'per_unit' | 'tiered' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'price' + /** @description The ID of the product this price is associated with. */ + product: string | components['schemas']['product'] | components['schemas']['deleted_product'] + /** @description The recurring components of a price such as `interval` and `usage_type`. */ + recurring?: components['schemas']['recurring'] | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['price_tier'][] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + * @enum {string|null} + */ + tiers_mode?: ('graduated' | 'volume') | null + /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ + transform_quantity?: components['schemas']['transform_quantity'] | null + /** + * @description One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + * @enum {string} + */ + type: 'one_time' | 'recurring' + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null + } + /** PriceTier */ + price_tier: { + /** @description Price for the entire tier. */ + flat_amount?: number | null + /** + * Format: decimal + * @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + */ + flat_amount_decimal?: string | null + /** @description Per unit price for units relevant to the tier. */ + unit_amount?: number | null + /** + * Format: decimal + * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + */ + unit_amount_decimal?: string | null + /** @description Up to and including to this quantity will be contained in the tier. */ + up_to?: number | null + } + /** + * Product + * @description Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + * + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + * [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), + * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + */ + product: { + /** @description Whether the product is currently available for purchase. */ + active: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images: string[] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'product' + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: components['schemas']['package_dimensions'] | null + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean | null + /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ + statement_descriptor?: string | null + /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + tax_code?: (string | components['schemas']['tax_code']) | null + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string | null + /** + * Format: unix-time + * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string | null + } + /** + * PromotionCode + * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * create multiple codes for a single coupon. + */ + promotion_code: { + /** @description Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. */ + active: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. */ + code: string + coupon: components['schemas']['coupon'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The customer that this promotion code can be used by. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * Format: unix-time + * @description Date at which the promotion code can no longer be redeemed. + */ + expires_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Maximum number of times this promotion code can be redeemed. */ + max_redemptions?: number | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'promotion_code' + restrictions: components['schemas']['promotion_codes_resource_restrictions'] + /** @description Number of times this promotion code has been used. */ + times_redeemed: number + } + /** PromotionCodesResourceRestrictions */ + promotion_codes_resource_restrictions: { + /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ + first_time_transaction: boolean + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount?: number | null + /** @description Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount */ + minimum_amount_currency?: string | null + } + /** + * Quote + * @description A Quote is a way to model prices that you'd like to provide to a customer. + * Once accepted, it will automatically create an invoice, subscription or subscription schedule. + */ + quote: { + /** @description Total before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total after discounts and taxes are applied. */ + amount_total: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ + application_fee_amount?: number | null + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ + application_fee_percent?: number | null + automatic_tax: components['schemas']['quotes_resource_automatic_tax'] + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method: 'charge_automatically' | 'send_invoice' + computed: components['schemas']['quotes_resource_computed'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** @description The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description The tax rates applied to this quote. */ + default_tax_rates?: (string | components['schemas']['tax_rate'])[] + /** @description A description that will be displayed on the quote PDF. */ + description?: string | null + /** @description The discounts applied to this quote. */ + discounts: (string | components['schemas']['discount'])[] + /** + * Format: unix-time + * @description The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string | null + /** @description Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. */ + from_quote?: components['schemas']['quotes_resource_from_quote'] | null + /** @description A header that will be displayed on the quote PDF. */ + header?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The invoice that was created from this quote. */ + invoice?: (string | components['schemas']['invoice'] | components['schemas']['deleted_invoice']) | null + /** @description All invoices will be billed using the specified settings. */ + invoice_settings?: components['schemas']['invoice_setting_quote_setting'] | null + /** + * QuotesResourceListLineItems + * @description A list of items the customer is being quoted for. + */ + line_items?: { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). */ + number?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'quote' + /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** + * @description The status of the quote. + * @enum {string} + */ + status: 'accepted' | 'canceled' | 'draft' | 'open' + status_transitions: components['schemas']['quotes_resource_status_transitions'] + /** @description The subscription that was created or updated from this quote. */ + subscription?: (string | components['schemas']['subscription']) | null + subscription_data: components['schemas']['quotes_resource_subscription_data'] + /** @description The subscription schedule that was created or updated from this quote. */ + subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null + total_details: components['schemas']['quotes_resource_total_details'] + /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ + transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null + } + /** QuotesResourceAutomaticTax */ + quotes_resource_automatic_tax: { + /** @description Automatically calculate taxes */ + enabled: boolean + /** + * @description The status of the most recent automated tax calculation for this quote. + * @enum {string|null} + */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** QuotesResourceComputed */ + quotes_resource_computed: { + /** @description The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. */ + recurring?: components['schemas']['quotes_resource_recurring'] | null + upfront: components['schemas']['quotes_resource_upfront'] + } + /** QuotesResourceFromQuote */ + quotes_resource_from_quote: { + /** @description Whether this quote is a revision of a different quote. */ + is_revision: boolean + /** @description The quote that was cloned. */ + quote: string | components['schemas']['quote'] + } + /** QuotesResourceRecurring */ + quotes_resource_recurring: { + /** @description Total before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total after discounts and taxes are applied. */ + amount_total: number + /** + * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ + interval_count: number + total_details: components['schemas']['quotes_resource_total_details'] + } + /** QuotesResourceStatusTransitions */ + quotes_resource_status_transitions: { + /** + * Format: unix-time + * @description The time that the quote was accepted. Measured in seconds since Unix epoch. + */ + accepted_at?: number | null + /** + * Format: unix-time + * @description The time that the quote was canceled. Measured in seconds since Unix epoch. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description The time that the quote was finalized. Measured in seconds since Unix epoch. + */ + finalized_at?: number | null + } + /** QuotesResourceSubscriptionData */ + quotes_resource_subscription_data: { + /** + * Format: unix-time + * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + */ + effective_date?: number | null + /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ + trial_period_days?: number | null + } + /** QuotesResourceTotalDetails */ + quotes_resource_total_details: { + /** @description This is the sum of all the line item discounts. */ + amount_discount: number + /** @description This is the sum of all the line item shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the line item tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] + } + /** QuotesResourceTotalDetailsResourceBreakdown */ + quotes_resource_total_details_resource_breakdown: { + /** @description The aggregated line item discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated line item tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } + /** QuotesResourceTransferData */ + quotes_resource_transfer_data: { + /** @description The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. */ + amount?: number | null + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. */ + amount_percent?: number | null + /** @description The account where funds from the payment will be transferred to upon payment success. */ + destination: string | components['schemas']['account'] + } + /** QuotesResourceUpfront */ + quotes_resource_upfront: { + /** @description Total before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total after discounts and taxes are applied. */ + amount_total: number + /** + * QuotesResourceListLineItems + * @description The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + */ + line_items?: { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + total_details: components['schemas']['quotes_resource_total_details'] + } + /** RadarReviewResourceLocation */ + radar_review_resource_location: { + /** @description The city where the payment originated. */ + city?: string | null + /** @description Two-letter ISO code representing the country where the payment originated. */ + country?: string | null + /** @description The geographic latitude where the payment originated. */ + latitude?: number | null + /** @description The geographic longitude where the payment originated. */ + longitude?: number | null + /** @description The state/county/province/region where the payment originated. */ + region?: string | null + } + /** RadarReviewResourceSession */ + radar_review_resource_session: { + /** @description The browser used in this browser session (e.g., `Chrome`). */ + browser?: string | null + /** @description Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ + device?: string | null + /** @description The platform for the browser session (e.g., `Macintosh`). */ + platform?: string | null + /** @description The version for the browser session (e.g., `61.0.3163.100`). */ + version?: string | null + } + /** + * RadarEarlyFraudWarning + * @description An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. + * + * Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). + */ + 'radar.early_fraud_warning': { + /** @description An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. */ + actionable: boolean + /** @description ID of the charge this early fraud warning is for, optionally expanded. */ + charge: string | components['schemas']['charge'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ + fraud_type: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.early_fraud_warning' + /** @description ID of the Payment Intent this early fraud warning is for, optionally expanded. */ + payment_intent?: string | components['schemas']['payment_intent'] + } + /** + * RadarListList + * @description Value lists allow you to group values together which can then be referenced in rules. + * + * Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). + */ + 'radar.value_list': { + /** @description The name of the value list for use in rules. */ + alias: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The name or email address of the user who created this value list. */ + created_by: string + /** @description Unique identifier for the object. */ + id: string + /** + * @description The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + * @enum {string} + */ + item_type: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** + * RadarListListItemList + * @description List of items contained within this value list. + */ + list_items: { + /** @description Details about each object. */ + data: components['schemas']['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The name of the value list. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list' + } + /** + * RadarListListItem + * @description Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + * + * Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). + */ + 'radar.value_list_item': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The name or email address of the user who added this item to the value list. */ + created_by: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'radar.value_list_item' + /** @description The value of the item. */ + value: string + /** @description The identifier of the value list this item belongs to. */ + value_list: string + } + /** + * TransferRecipient + * @description With `Recipient` objects, you can transfer money from your Stripe account to a + * third-party bank account or debit card. The API allows you to create, delete, + * and update your recipients. You can retrieve individual recipients as well as + * a list of all your recipients. + * + * **`Recipient` objects have been deprecated in favor of + * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful + * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use + * recipients can no longer begin doing so. Please use `Account` objects + * instead.** + */ + recipient: { + /** @description Hash describing the current account on the recipient, if there is one. */ + active_account?: components['schemas']['bank_account'] | null + /** CardList */ + cards?: { + data: components['schemas']['card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The default card to use for creating transfers to this recipient. */ + default_card?: (string | components['schemas']['card']) | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ + migrated_to?: (string | components['schemas']['account']) | null + /** @description Full, legal name of the recipient. */ + name?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'recipient' + rolled_back_from?: string | components['schemas']['account'] + /** @description Type of the recipient, one of `individual` or `corporation`. */ + type: string + } + /** Recurring */ + recurring: { + /** + * @description Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string|null} + */ + aggregate_usage?: ('last_during_period' | 'last_ever' | 'max' | 'sum') | null + /** + * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ + interval_count: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type: 'licensed' | 'metered' + } + /** + * Refund + * @description `Refund` objects allow you to refund a charge that has previously been created + * but not yet refunded. Funds will be refunded to the credit or debit card that + * was originally charged. + * + * Related guide: [Refunds](https://stripe.com/docs/refunds). + */ + refund: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** @description ID of the charge that was refunded. */ + charge?: (string | components['schemas']['charge']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ + description?: string + /** @description If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ + failure_balance_transaction?: string | components['schemas']['balance_transaction'] + /** @description If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ + failure_reason?: string + /** @description Unique identifier for the object. */ + id: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'refund' + /** @description ID of the PaymentIntent that was refunded. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** + * @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + * @enum {string|null} + */ + reason?: ('duplicate' | 'expired_uncaptured_charge' | 'fraudulent' | 'requested_by_customer') | null + /** @description This is the transaction number that appears on email receipts sent for this refund. */ + receipt_number?: string | null + /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ + source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + status?: string | null + /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ + transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null + } + /** + * reporting_report_run + * @description The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing the report. + * When the report has finished running, it will give you a reference to a file + * where you can retrieve your results. For an overview, see + * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ + 'reporting.report_run': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * @description If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ + error?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description `true` if the report is run on live mode data and `false` if it is run on test mode data. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reporting.report_run' + parameters: components['schemas']['financial_reporting_finance_report_run_run_parameters'] + /** @description The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + /** + * @description The file object representing the result of the report run (populated when + * `status=succeeded`). + */ + result?: components['schemas']['file'] | null + /** + * @description Status of this report run. This will be `pending` when the run is initially created. + * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + */ + status: string + /** + * Format: unix-time + * @description Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ + succeeded_at?: number | null + } + /** + * reporting_report_type + * @description The Report Type resource corresponds to a particular type of report, such as + * the "Activity summary" or "Itemized payouts" reports. These objects are + * identified by an ID belonging to a set of enumerated values. See + * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + * for those Report Type IDs, along with required and optional parameters. + * + * Note that certain report types can only be run based on your live-mode data (not test-mode + * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + */ + 'reporting.report_type': { + /** + * Format: unix-time + * @description Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ + data_available_end: number + /** + * Format: unix-time + * @description Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + */ + data_available_start: number + /** @description List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) */ + default_columns?: string[] | null + /** @description The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Human-readable name of the Report Type */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reporting.report_type' + /** + * Format: unix-time + * @description When this Report Type was latest updated. Measured in seconds since the Unix epoch. + */ + updated: number + /** @description Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. */ + version: number + } + /** ReserveTransaction */ + reserve_transaction: { + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'reserve_transaction' + } + /** + * RadarReview + * @description Reviews can be used to supplement automated fraud detection with human expertise. + * + * Learn more about [Radar](/radar) and reviewing payments + * [here](https://stripe.com/docs/radar/reviews). + */ + review: { + /** @description The ZIP or postal code of the card used, if applicable. */ + billing_zip?: string | null + /** @description The charge associated with this review. */ + charge?: (string | components['schemas']['charge']) | null + /** + * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + * @enum {string|null} + */ + closed_reason?: ('approved' | 'disputed' | 'redacted' | 'refunded' | 'refunded_as_fraud') | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description The IP address where the payment originated. */ + ip_address?: string | null + /** @description Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. */ + ip_address_location?: components['schemas']['radar_review_resource_location'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'review' + /** @description If `true`, the review needs action. */ + open: boolean + /** + * @description The reason the review was opened. One of `rule` or `manual`. + * @enum {string} + */ + opened_reason: 'manual' | 'rule' + /** @description The PaymentIntent ID associated with this review, if one exists. */ + payment_intent?: string | components['schemas']['payment_intent'] + /** @description The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. */ + reason: string + /** @description Information related to the browsing session of the user who initiated the payment. */ + session?: components['schemas']['radar_review_resource_session'] | null + } + /** RadarRule */ + rule: { + /** @description The action taken on the payment. */ + action: string + /** @description Unique identifier for the object. */ + id: string + /** @description The predicate to evaluate the payment against. */ + predicate: string + } + /** + * ScheduledQueryRun + * @description If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + * receive a `sigma.scheduled_query_run.created` webhook each time the query + * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + * retrieve the query results. + */ + scheduled_query_run: { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Format: unix-time + * @description When the query was run, Sigma contained a snapshot of your Stripe data at this time. + */ + data_load_time: number + error?: components['schemas']['sigma_scheduled_query_run_error'] + /** @description The file object representing the results of the query. */ + file?: components['schemas']['file'] | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'scheduled_query_run' + /** + * Format: unix-time + * @description Time at which the result expires and is no longer available for download. + */ + result_available_until: number + /** @description SQL for the query. */ + sql: string + /** @description The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ + status: string + /** @description Title of the query. */ + title: string + } + /** SchedulesPhaseAutomaticTax */ + schedules_phase_automatic_tax: { + /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ + enabled: boolean + } + /** sepa_debit_generated_from */ + sepa_debit_generated_from: { + /** @description The ID of the Charge that generated this PaymentMethod, if any. */ + charge?: (string | components['schemas']['charge']) | null + /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ + setup_attempt?: (string | components['schemas']['setup_attempt']) | null + } + /** + * PaymentFlowsSetupIntentSetupAttempt + * @description A SetupAttempt describes one attempted confirmation of a SetupIntent, + * whether that confirmation was successful or unsuccessful. You can use + * SetupAttempts to inspect details of a specific attempt at setting up a + * payment method using a SetupIntent. + */ + setup_attempt: { + /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ + application?: (string | components['schemas']['application']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'setup_attempt' + /** @description The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description ID of the payment method used with this SetupAttempt. */ + payment_method: string | components['schemas']['payment_method'] + payment_method_details: components['schemas']['setup_attempt_payment_method_details'] + /** @description The error encountered during this attempt to confirm the SetupIntent, if any. */ + setup_error?: components['schemas']['api_errors'] | null + /** @description ID of the SetupIntent that this attempt belongs to. */ + setup_intent: string | components['schemas']['setup_intent'] + /** @description Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. */ + status: string + /** @description The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. */ + usage: string + } + /** SetupAttemptPaymentMethodDetails */ + setup_attempt_payment_method_details: { + acss_debit?: components['schemas']['setup_attempt_payment_method_details_acss_debit'] + au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] + bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] + bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] + card?: components['schemas']['setup_attempt_payment_method_details_card'] + card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] + ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] + sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] + /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ + type: string + } + /** setup_attempt_payment_method_details_acss_debit */ + setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } + /** setup_attempt_payment_method_details_au_becs_debit */ + setup_attempt_payment_method_details_au_becs_debit: { [key: string]: unknown } + /** setup_attempt_payment_method_details_bacs_debit */ + setup_attempt_payment_method_details_bacs_debit: { [key: string]: unknown } + /** setup_attempt_payment_method_details_bancontact */ + setup_attempt_payment_method_details_bancontact: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + * @enum {string|null} + */ + preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null + /** + * @description Owner's verified full name. Values are verified or provided by Bancontact directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** setup_attempt_payment_method_details_boleto */ + setup_attempt_payment_method_details_boleto: { [key: string]: unknown } + /** setup_attempt_payment_method_details_card */ + setup_attempt_payment_method_details_card: { + /** @description Populated if this authorization used 3D Secure authentication. */ + three_d_secure?: components['schemas']['three_d_secure_details'] | null + } + /** setup_attempt_payment_method_details_card_present */ + setup_attempt_payment_method_details_card_present: { + /** @description The ID of the Card PaymentMethod which was generated by this SetupAttempt. */ + generated_card?: (string | components['schemas']['payment_method']) | null + } + /** setup_attempt_payment_method_details_ideal */ + setup_attempt_payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** setup_attempt_payment_method_details_sepa_debit */ + setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } + /** setup_attempt_payment_method_details_sofort */ + setup_attempt_payment_method_details_sofort: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Preferred language of the Sofort authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + * @enum {string|null} + */ + preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null + /** + * @description Owner's verified full name. Values are verified or provided by Sofort directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** + * SetupIntent + * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + * + * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. + * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. + * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides + * you through the setup process. + * + * Successful SetupIntents result in payment credentials that are optimized for future payments. + * For example, cardholders in [certain regions](/guides/strong-customer-authentication) may need to be run through + * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection + * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). + * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, + * it will automatically attach the resulting payment method to that Customer. + * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. + * + * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, + * even as regulations change over time. + * + * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). + */ + setup_intent: { + /** @description ID of the Connect application that created the SetupIntent. */ + application?: (string | components['schemas']['application']) | null + /** + * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + * @enum {string|null} + */ + cancellation_reason?: ('abandoned' | 'duplicate' | 'requested_by_customer') | null + /** + * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + */ + client_secret?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The error encountered in the previous SetupIntent confirmation. */ + last_setup_error?: components['schemas']['api_errors'] | null + /** @description The most recent SetupAttempt for this SetupIntent. */ + latest_attempt?: (string | components['schemas']['setup_attempt']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description ID of the multi use Mandate generated by the SetupIntent. */ + mandate?: (string | components['schemas']['mandate']) | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** @description If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ + next_action?: components['schemas']['setup_intent_next_action'] | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'setup_intent' + /** @description The account (if any) for which the setup is intended. */ + on_behalf_of?: (string | components['schemas']['account']) | null + /** @description ID of the payment method used with this SetupIntent. */ + payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: components['schemas']['setup_intent_payment_method_options'] | null + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ + payment_method_types: string[] + /** @description ID of the single_use Mandate generated by the SetupIntent. */ + single_use_mandate?: (string | components['schemas']['mandate']) | null + /** + * @description [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + * @enum {string} + */ + status: 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' + /** + * @description Indicates how the payment method is intended to be used in the future. + * + * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + */ + usage: string + } + /** SetupIntentNextAction */ + setup_intent_next_action: { + redirect_to_url?: components['schemas']['setup_intent_next_action_redirect_to_url'] + /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ + type: string + /** @description When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ + use_stripe_sdk?: { [key: string]: unknown } + verify_with_microdeposits?: components['schemas']['setup_intent_next_action_verify_with_microdeposits'] + } + /** SetupIntentNextActionRedirectToUrl */ + setup_intent_next_action_redirect_to_url: { + /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string | null + /** @description The URL you must redirect your customer to in order to authenticate. */ + url?: string | null + } + /** SetupIntentNextActionVerifyWithMicrodeposits */ + setup_intent_next_action_verify_with_microdeposits: { + /** + * Format: unix-time + * @description The timestamp when the microdeposits are expected to land. + */ + arrival_date: number + /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ + hosted_verification_url: string + } + /** SetupIntentPaymentMethodOptions */ + setup_intent_payment_method_options: { + acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + card?: components['schemas']['setup_intent_payment_method_options_card'] + sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + } + /** setup_intent_payment_method_options_acss_debit */ + setup_intent_payment_method_options_acss_debit: { + /** + * @description Currency supported by the bank account + * @enum {string|null} + */ + currency?: ('cad' | 'usd') | null + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_card */ + setup_intent_payment_method_options_card: { + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string|null} + */ + request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null + } + /** setup_intent_payment_method_options_mandate_options_acss_debit */ + setup_intent_payment_method_options_mandate_options_acss_debit: { + /** @description A URL for custom mandate text */ + custom_mandate_url?: string + /** @description List of Stripe products where this mandate can be selected automatically. */ + default_for?: ('invoice' | 'subscription')[] + /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ + interval_description?: string | null + /** + * @description Payment schedule for the mandate. + * @enum {string|null} + */ + payment_schedule?: ('combined' | 'interval' | 'sporadic') | null + /** + * @description Transaction type of the mandate. + * @enum {string|null} + */ + transaction_type?: ('business' | 'personal') | null + } + /** setup_intent_payment_method_options_mandate_options_sepa_debit */ + setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } + /** setup_intent_payment_method_options_sepa_debit */ + setup_intent_payment_method_options_sepa_debit: { + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] + } + /** Shipping */ + shipping: { + address?: components['schemas']['address'] + /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ + carrier?: string | null + /** @description Recipient name. */ + name?: string | null + /** @description Recipient phone (including extension). */ + phone?: string | null + /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ + tracking_number?: string | null + } + /** ShippingMethod */ + shipping_method: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ + delivery_estimate?: components['schemas']['delivery_estimate'] | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** @description Unique identifier for the object. */ + id: string + } + /** + * ShippingRate + * @description Shipping rates describe the price of shipping presented to your customers and can be + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + */ + shipping_rate: { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + delivery_estimate?: components['schemas']['shipping_rate_delivery_estimate'] | null + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name?: string | null + fixed_amount?: components['schemas']['shipping_rate_fixed_amount'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'shipping_rate' + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: (string | components['schemas']['tax_code']) | null + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type: 'fixed_amount' + } + /** ShippingRateDeliveryEstimate */ + shipping_rate_delivery_estimate: { + /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ + maximum?: components['schemas']['shipping_rate_delivery_estimate_bound'] | null + /** @description The lower bound of the estimated range. If empty, represents no lower bound. */ + minimum?: components['schemas']['shipping_rate_delivery_estimate_bound'] | null + } + /** ShippingRateDeliveryEstimateBound */ + shipping_rate_delivery_estimate_bound: { + /** + * @description A unit of time. + * @enum {string} + */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + /** @description Must be greater than 0. */ + value: number + } + /** ShippingRateFixedAmount */ + shipping_rate_fixed_amount: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + } + /** SigmaScheduledQueryRunError */ + sigma_scheduled_query_run_error: { + /** @description Information about the run failure. */ + message: string + } + /** + * Sku + * @description Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). + * SKUs describe specific product variations, taking into account any combination of: attributes, + * currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents + * the `size: large`, `color: red` version of that shirt. + * + * Can also be used to manage inventory. + * + * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + */ + sku: { + /** @description Whether the SKU is available for purchase. */ + active: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes: { [key: string]: string } + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string | null + inventory: components['schemas']['sku_inventory'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'sku' + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: components['schemas']['package_dimensions'] | null + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. The product must be currently active. */ + product: string | components['schemas']['product'] + /** + * Format: unix-time + * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number + } + /** SKUInventory */ + sku_inventory: { + /** @description The count of inventory available. Will be present if and only if `type` is `finite`. */ + quantity?: number | null + /** @description Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`. */ + type: string + /** @description An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`. */ + value?: string | null + } + /** + * Source + * @description `Source` objects allow you to accept a variety of payment methods. They + * represent a customer's payment instrument, and can be used with the Stripe API + * just like a `Card` object: once chargeable, they can be charged, or can be + * attached to customers. + * + * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + */ + source: { + ach_credit_transfer?: components['schemas']['source_type_ach_credit_transfer'] + ach_debit?: components['schemas']['source_type_ach_debit'] + acss_debit?: components['schemas']['source_type_acss_debit'] + alipay?: components['schemas']['source_type_alipay'] + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. */ + amount?: number | null + au_becs_debit?: components['schemas']['source_type_au_becs_debit'] + bancontact?: components['schemas']['source_type_bancontact'] + card?: components['schemas']['source_type_card'] + card_present?: components['schemas']['source_type_card_present'] + /** @description The client secret of the source. Used for client-side retrieval using a publishable key. */ + client_secret: string + code_verification?: components['schemas']['source_code_verification_flow'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. */ + currency?: string | null + /** @description The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. */ + customer?: string + eps?: components['schemas']['source_type_eps'] + /** @description The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ + flow: string + giropay?: components['schemas']['source_type_giropay'] + /** @description Unique identifier for the object. */ + id: string + ideal?: components['schemas']['source_type_ideal'] + klarna?: components['schemas']['source_type_klarna'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + multibanco?: components['schemas']['source_type_multibanco'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source' + /** @description Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: components['schemas']['source_owner'] | null + p24?: components['schemas']['source_type_p24'] + receiver?: components['schemas']['source_receiver_flow'] + redirect?: components['schemas']['source_redirect_flow'] + sepa_debit?: components['schemas']['source_type_sepa_debit'] + sofort?: components['schemas']['source_type_sofort'] + source_order?: components['schemas']['source_order'] + /** @description Extra information about a source. This will appear on your customer's statement every time you charge the source. */ + statement_descriptor?: string | null + /** @description The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. */ + status: string + three_d_secure?: components['schemas']['source_type_three_d_secure'] + /** + * @description The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + * @enum {string} + */ + type: + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'alipay' + | 'au_becs_debit' + | 'bancontact' + | 'card' + | 'card_present' + | 'eps' + | 'giropay' + | 'ideal' + | 'klarna' + | 'multibanco' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'three_d_secure' + | 'wechat' + /** @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. */ + usage?: string | null + wechat?: components['schemas']['source_type_wechat'] + } + /** SourceCodeVerificationFlow */ + source_code_verification_flow: { + /** @description The number of attempts remaining to authenticate the source object with a verification code. */ + attempts_remaining: number + /** @description The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). */ + status: string + } + /** + * SourceMandateNotification + * @description Source mandate notifications should be created when a notification related to + * a source mandate must be sent to the payer. They will trigger a webhook or + * deliver an email to the customer. + */ + source_mandate_notification: { + acss_debit?: components['schemas']['source_mandate_notification_acss_debit_data'] + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. */ + amount?: number | null + bacs_debit?: components['schemas']['source_mandate_notification_bacs_debit_data'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source_mandate_notification' + /** @description The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. */ + reason: string + sepa_debit?: components['schemas']['source_mandate_notification_sepa_debit_data'] + source: components['schemas']['source'] + /** @description The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ + status: string + /** @description The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. */ + type: string + } + /** SourceMandateNotificationAcssDebitData */ + source_mandate_notification_acss_debit_data: { + /** @description The statement descriptor associate with the debit. */ + statement_descriptor?: string + } + /** SourceMandateNotificationBacsDebitData */ + source_mandate_notification_bacs_debit_data: { + /** @description Last 4 digits of the account number associated with the debit. */ + last4?: string + } + /** SourceMandateNotificationSepaDebitData */ + source_mandate_notification_sepa_debit_data: { + /** @description SEPA creditor ID. */ + creditor_identifier?: string + /** @description Last 4 digits of the account number associated with the debit. */ + last4?: string + /** @description Mandate reference associated with the debit. */ + mandate_reference?: string + } + /** SourceOrder */ + source_order: { + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The email address of the customer placing the order. */ + email?: string + /** @description List of items constituting the order. */ + items?: components['schemas']['source_order_item'][] | null + shipping?: components['schemas']['shipping'] + } + /** SourceOrderItem */ + source_order_item: { + /** @description The amount (price) for this order item. */ + amount?: number | null + /** @description This currency of this order item. Required when `amount` is present. */ + currency?: string | null + /** @description Human-readable description for this order item. */ + description?: string | null + /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ + parent?: string | null + /** @description The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ + quantity?: number + /** @description The type of this order item. Must be `sku`, `tax`, or `shipping`. */ + type?: string | null + } + /** SourceOwner */ + source_owner: { + /** @description Owner's address. */ + address?: components['schemas']['address'] | null + /** @description Owner's email address. */ + email?: string | null + /** @description Owner's full name. */ + name?: string | null + /** @description Owner's phone number (including extension). */ + phone?: string | null + /** @description Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_address?: components['schemas']['address'] | null + /** @description Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_email?: string | null + /** @description Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_name?: string | null + /** @description Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + verified_phone?: string | null + } + /** SourceReceiverFlow */ + source_receiver_flow: { + /** @description The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ + address?: string | null + /** @description The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. */ + amount_charged: number + /** @description The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. */ + amount_received: number + /** @description The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ + amount_returned: number + /** @description Type of refund attribute method, one of `email`, `manual`, or `none`. */ + refund_attributes_method: string + /** @description Type of refund attribute status, one of `missing`, `requested`, or `available`. */ + refund_attributes_status: string + } + /** SourceRedirectFlow */ + source_redirect_flow: { + /** @description The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. */ + failure_reason?: string | null + /** @description The URL you provide to redirect the customer to after they authenticated their payment. */ + return_url: string + /** @description The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). */ + status: string + /** @description The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ + url: string + } + /** + * SourceTransaction + * @description Some payment methods have no required amount that a customer must send. + * Customers can be instructed to send any amount, and it can be made up of + * multiple transactions. As such, sources can have multiple associated + * transactions. + */ + source_transaction: { + ach_credit_transfer?: components['schemas']['source_transaction_ach_credit_transfer_data'] + /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. */ + amount: number + chf_credit_transfer?: components['schemas']['source_transaction_chf_credit_transfer_data'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + gbp_credit_transfer?: components['schemas']['source_transaction_gbp_credit_transfer_data'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'source_transaction' + paper_check?: components['schemas']['source_transaction_paper_check_data'] + sepa_credit_transfer?: components['schemas']['source_transaction_sepa_credit_transfer_data'] + /** @description The ID of the source this transaction is attached to. */ + source: string + /** @description The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ + status: string + /** + * @description The type of source this transaction is attached to. + * @enum {string} + */ + type: + | 'ach_credit_transfer' + | 'ach_debit' + | 'alipay' + | 'bancontact' + | 'card' + | 'card_present' + | 'eps' + | 'giropay' + | 'ideal' + | 'klarna' + | 'multibanco' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'three_d_secure' + | 'wechat' + } + /** SourceTransactionAchCreditTransferData */ + source_transaction_ach_credit_transfer_data: { + /** @description Customer data associated with the transfer. */ + customer_data?: string + /** @description Bank account fingerprint associated with the transfer. */ + fingerprint?: string + /** @description Last 4 digits of the account number associated with the transfer. */ + last4?: string + /** @description Routing number associated with the transfer. */ + routing_number?: string + } + /** SourceTransactionChfCreditTransferData */ + source_transaction_chf_credit_transfer_data: { + /** @description Reference associated with the transfer. */ + reference?: string + /** @description Sender's country address. */ + sender_address_country?: string + /** @description Sender's line 1 address. */ + sender_address_line1?: string + /** @description Sender's bank account IBAN. */ + sender_iban?: string + /** @description Sender's name. */ + sender_name?: string + } + /** SourceTransactionGbpCreditTransferData */ + source_transaction_gbp_credit_transfer_data: { + /** @description Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ + fingerprint?: string + /** @description The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. */ + funding_method?: string + /** @description Last 4 digits of sender account number associated with the transfer. */ + last4?: string + /** @description Sender entered arbitrary information about the transfer. */ + reference?: string + /** @description Sender account number associated with the transfer. */ + sender_account_number?: string + /** @description Sender name associated with the transfer. */ + sender_name?: string + /** @description Sender sort code associated with the transfer. */ + sender_sort_code?: string + } + /** SourceTransactionPaperCheckData */ + source_transaction_paper_check_data: { + /** @description Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ + available_at?: string + /** @description Comma-separated list of invoice IDs associated with the paper check. */ + invoices?: string + } + /** SourceTransactionSepaCreditTransferData */ + source_transaction_sepa_credit_transfer_data: { + /** @description Reference associated with the transfer. */ + reference?: string + /** @description Sender's bank account IBAN. */ + sender_iban?: string + /** @description Sender's name. */ + sender_name?: string + } + source_type_ach_credit_transfer: { + account_number?: string | null + bank_name?: string | null + fingerprint?: string | null + refund_account_holder_name?: string | null + refund_account_holder_type?: string | null + refund_routing_number?: string | null + routing_number?: string | null + swift_code?: string | null + } + source_type_ach_debit: { + bank_name?: string | null + country?: string | null + fingerprint?: string | null + last4?: string | null + routing_number?: string | null + type?: string | null + } + source_type_acss_debit: { + bank_address_city?: string | null + bank_address_line_1?: string | null + bank_address_line_2?: string | null + bank_address_postal_code?: string | null + bank_name?: string | null + category?: string | null + country?: string | null + fingerprint?: string | null + last4?: string | null + routing_number?: string | null + } + source_type_alipay: { + data_string?: string | null + native_url?: string | null + statement_descriptor?: string | null + } + source_type_au_becs_debit: { + bsb_number?: string | null + fingerprint?: string | null + last4?: string | null + } + source_type_bancontact: { + bank_code?: string | null + bank_name?: string | null + bic?: string | null + iban_last4?: string | null + preferred_language?: string | null + statement_descriptor?: string | null + } + source_type_card: { + address_line1_check?: string | null + address_zip_check?: string | null + brand?: string | null + country?: string | null + cvc_check?: string | null + dynamic_last4?: string | null + exp_month?: number | null + exp_year?: number | null + fingerprint?: string + funding?: string | null + last4?: string | null + name?: string | null + three_d_secure?: string + tokenization_method?: string | null + } + source_type_card_present: { + application_cryptogram?: string + application_preferred_name?: string + authorization_code?: string | null + authorization_response_code?: string + brand?: string | null + country?: string | null + cvm_type?: string + data_type?: string | null + dedicated_file_name?: string + emv_auth_data?: string + evidence_customer_signature?: string | null + evidence_transaction_certificate?: string | null + exp_month?: number | null + exp_year?: number | null + fingerprint?: string + funding?: string | null + last4?: string | null + pos_device_id?: string | null + pos_entry_mode?: string + read_method?: string | null + reader?: string | null + terminal_verification_results?: string + transaction_status_information?: string + } + source_type_eps: { + reference?: string | null + statement_descriptor?: string | null + } + source_type_giropay: { + bank_code?: string | null + bank_name?: string | null + bic?: string | null + statement_descriptor?: string | null + } + source_type_ideal: { + bank?: string | null + bic?: string | null + iban_last4?: string | null + statement_descriptor?: string | null + } + source_type_klarna: { + background_image_url?: string + client_token?: string | null + first_name?: string + last_name?: string + locale?: string + logo_url?: string + page_title?: string + pay_later_asset_urls_descriptive?: string + pay_later_asset_urls_standard?: string + pay_later_name?: string + pay_later_redirect_url?: string + pay_now_asset_urls_descriptive?: string + pay_now_asset_urls_standard?: string + pay_now_name?: string + pay_now_redirect_url?: string + pay_over_time_asset_urls_descriptive?: string + pay_over_time_asset_urls_standard?: string + pay_over_time_name?: string + pay_over_time_redirect_url?: string + payment_method_categories?: string + purchase_country?: string + purchase_type?: string + redirect_url?: string + shipping_delay?: number + shipping_first_name?: string + shipping_last_name?: string + } + source_type_multibanco: { + entity?: string | null + reference?: string | null + refund_account_holder_address_city?: string | null + refund_account_holder_address_country?: string | null + refund_account_holder_address_line1?: string | null + refund_account_holder_address_line2?: string | null + refund_account_holder_address_postal_code?: string | null + refund_account_holder_address_state?: string | null + refund_account_holder_name?: string | null + refund_iban?: string | null + } + source_type_p24: { + reference?: string | null + } + source_type_sepa_debit: { + bank_code?: string | null + branch_code?: string | null + country?: string | null + fingerprint?: string | null + last4?: string | null + mandate_reference?: string | null + mandate_url?: string | null + } + source_type_sofort: { + bank_code?: string | null + bank_name?: string | null + bic?: string | null + country?: string | null + iban_last4?: string | null + preferred_language?: string | null + statement_descriptor?: string | null + } + source_type_three_d_secure: { + address_line1_check?: string | null + address_zip_check?: string | null + authenticated?: boolean | null + brand?: string | null + card?: string | null + country?: string | null + customer?: string | null + cvc_check?: string | null + dynamic_last4?: string | null + exp_month?: number | null + exp_year?: number | null + fingerprint?: string + funding?: string | null + last4?: string | null + name?: string | null + three_d_secure?: string + tokenization_method?: string | null + } + source_type_wechat: { + prepay_id?: string + qr_code_url?: string | null + statement_descriptor?: string + } + /** StatusTransitions */ + status_transitions: { + /** + * Format: unix-time + * @description The time that the order was canceled. + */ + canceled?: number | null + /** + * Format: unix-time + * @description The time that the order was fulfilled. + */ + fulfiled?: number | null + /** + * Format: unix-time + * @description The time that the order was paid. + */ + paid?: number | null + /** + * Format: unix-time + * @description The time that the order was returned. + */ + returned?: number | null + } + /** + * Subscription + * @description Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + */ + subscription: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ + application_fee_percent?: number | null + automatic_tax: components['schemas']['subscription_automatic_tax'] + /** + * Format: unix-time + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + */ + billing_cycle_anchor: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null + /** + * Format: unix-time + * @description A date in the future at which the subscription will automatically get canceled + */ + cancel_at?: number | null + /** @description If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. */ + cancel_at_period_end: boolean + /** + * Format: unix-time + * @description If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + */ + canceled_at?: number | null + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string} + */ + collection_method: 'charge_automatically' | 'send_invoice' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** + * Format: unix-time + * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + */ + current_period_end: number + /** + * Format: unix-time + * @description Start of the current period that the subscription has been invoiced for. + */ + current_period_start: number + /** @description ID of the customer who owns the subscription. */ + customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] + /** @description Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. */ + days_until_due?: number | null + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: + | ( + | string + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + ) + | null + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ + discount?: components['schemas']['discount'] | null + /** + * Format: unix-time + * @description If the subscription has ended, the date the subscription ended. + */ + ended_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** + * SubscriptionItemList + * @description List of subscription items, each with an attached price. + */ + items: { + /** @description Details about each object. */ + data: components['schemas']['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description The most recent invoice this subscription has generated. */ + latest_invoice?: (string | components['schemas']['invoice']) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * Format: unix-time + * @description Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + */ + next_pending_invoice_item_invoice?: number | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription' + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: components['schemas']['subscriptions_resource_pause_collection'] | null + /** @description Payment settings passed on to invoices created by the subscription. */ + payment_settings?: components['schemas']['subscriptions_resource_payment_settings'] | null + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: components['schemas']['subscription_pending_invoice_item_interval'] | null + /** @description You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). */ + pending_setup_intent?: (string | components['schemas']['setup_intent']) | null + /** @description If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. */ + pending_update?: components['schemas']['subscriptions_resource_pending_update'] | null + /** @description The schedule attached to the subscription */ + schedule?: (string | components['schemas']['subscription_schedule']) | null + /** + * Format: unix-time + * @description Date when the subscription was first created. The date might differ from the `created` date due to backdating. + */ + start_date: number + /** + * @description Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + * + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. + * + * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + * + * If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. + * + * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + * @enum {string} + */ + status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ + transfer_data?: components['schemas']['subscription_transfer_data'] | null + /** + * Format: unix-time + * @description If the subscription has a trial, the end of that trial. + */ + trial_end?: number | null + /** + * Format: unix-time + * @description If the subscription has a trial, the beginning of that trial. + */ + trial_start?: number | null + } + /** SubscriptionAutomaticTax */ + subscription_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this subscription. */ + enabled: boolean + } + /** SubscriptionBillingThresholds */ + subscription_billing_thresholds: { + /** @description Monetary threshold that triggers the subscription to create an invoice */ + amount_gte?: number | null + /** @description Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. */ + reset_billing_cycle_anchor?: boolean | null + } + /** + * SubscriptionItem + * @description Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ + subscription_item: { + /** @description Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds?: components['schemas']['subscription_item_billing_thresholds'] | null + /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_item' + price: components['schemas']['price'] + /** @description The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ + quantity?: number + /** @description The `subscription` this `subscription_item` belongs to. */ + subscription: string + /** @description The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. */ + tax_rates?: components['schemas']['tax_rate'][] | null + } + /** SubscriptionItemBillingThresholds */ + subscription_item_billing_thresholds: { + /** @description Usage threshold that triggers the subscription to create an invoice */ + usage_gte?: number | null + } + /** subscription_payment_method_options_card */ + subscription_payment_method_options_card: { + mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + * @enum {string|null} + */ + request_three_d_secure?: ('any' | 'automatic') | null + } + /** SubscriptionPendingInvoiceItemInterval */ + subscription_pending_invoice_item_interval: { + /** + * @description Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count: number + } + /** + * SubscriptionSchedule + * @description A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + * + * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + */ + subscription_schedule: { + /** + * Format: unix-time + * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + */ + completed_at?: number | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ + current_phase?: components['schemas']['subscription_schedule_current_phase'] | null + /** @description ID of the customer who owns the subscription schedule. */ + customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] + default_settings: components['schemas']['subscription_schedules_resource_default_settings'] + /** + * @description Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`. + * @enum {string} + */ + end_behavior: 'cancel' | 'none' | 'release' | 'renew' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'subscription_schedule' + /** @description Configuration for the subscription schedule's phases. */ + phases: components['schemas']['subscription_schedule_phase_configuration'][] + /** + * Format: unix-time + * @description Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + */ + released_at?: number | null + /** @description ID of the subscription once managed by the subscription schedule (if it is released). */ + released_subscription?: string | null + /** + * @description The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + * @enum {string} + */ + status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' + /** @description ID of the subscription managed by the subscription schedule. */ + subscription?: (string | components['schemas']['subscription']) | null + } + /** + * SubscriptionScheduleAddInvoiceItem + * @description An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. + */ + subscription_schedule_add_invoice_item: { + /** @description ID of the price used to generate the invoice item. */ + price: string | components['schemas']['price'] | components['schemas']['deleted_price'] + /** @description The quantity of the invoice item. */ + quantity?: number | null + /** @description The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. */ + tax_rates?: components['schemas']['tax_rate'][] | null + } + /** + * SubscriptionScheduleConfigurationItem + * @description A phase item describes the price and quantity of a phase. + */ + subscription_schedule_configuration_item: { + /** @description Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds?: components['schemas']['subscription_item_billing_thresholds'] | null + /** @description ID of the price to which the customer should be subscribed. */ + price: string | components['schemas']['price'] | components['schemas']['deleted_price'] + /** @description Quantity of the plan to which the customer should be subscribed. */ + quantity?: number + /** @description The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. */ + tax_rates?: components['schemas']['tax_rate'][] | null + } + /** SubscriptionScheduleCurrentPhase */ + subscription_schedule_current_phase: { + /** + * Format: unix-time + * @description The end of this phase of the subscription schedule. + */ + end_date: number + /** + * Format: unix-time + * @description The start of this phase of the subscription schedule. + */ + start_date: number + } + /** + * SubscriptionSchedulePhaseConfiguration + * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. + */ + subscription_schedule_phase_configuration: { + /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ + application_fee_percent?: number | null + automatic_tax?: components['schemas']['schedules_phase_automatic_tax'] + /** + * @description Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string|null} + */ + billing_cycle_anchor?: ('automatic' | 'phase_start') | null + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string|null} + */ + collection_method?: ('charge_automatically' | 'send_invoice') | null + /** @description ID of the coupon to use during this phase of the subscription schedule. */ + coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null + /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ + default_tax_rates?: components['schemas']['tax_rate'][] | null + /** + * Format: unix-time + * @description The end of this phase of the subscription schedule. + */ + end_date: number + /** @description The invoice settings applicable during this phase. */ + invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null + /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ + items: components['schemas']['subscription_schedule_configuration_item'][] + /** + * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + * @enum {string} + */ + proration_behavior: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description The start of this phase of the subscription schedule. + */ + start_date: number + /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ + transfer_data?: components['schemas']['subscription_transfer_data'] | null + /** + * Format: unix-time + * @description When the trial ends within the phase. + */ + trial_end?: number | null + } + /** SubscriptionSchedulesResourceDefaultSettings */ + subscription_schedules_resource_default_settings: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ + application_fee_percent?: number | null + automatic_tax?: components['schemas']['subscription_schedules_resource_default_settings_automatic_tax'] + /** + * @description Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor: 'automatic' | 'phase_start' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @enum {string|null} + */ + collection_method?: ('charge_automatically' | 'send_invoice') | null + /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ + default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description The subscription schedule's default invoice settings. */ + invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null + /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ + transfer_data?: components['schemas']['subscription_transfer_data'] | null + } + /** SubscriptionSchedulesResourceDefaultSettingsAutomaticTax */ + subscription_schedules_resource_default_settings_automatic_tax: { + /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ + enabled: boolean + } + /** SubscriptionTransferData */ + subscription_transfer_data: { + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ + amount_percent?: number | null + /** @description The account where funds from the payment will be transferred to upon payment success. */ + destination: string | components['schemas']['account'] + } + /** + * SubscriptionsResourcePauseCollection + * @description The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + * should be paused. + */ + subscriptions_resource_pause_collection: { + /** + * @description The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + * @enum {string} + */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** + * Format: unix-time + * @description The time after which the subscription will resume collecting payments. + */ + resumes_at?: number | null + } + /** SubscriptionsResourcePaymentMethodOptions */ + subscriptions_resource_payment_method_options: { + /** @description This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. */ + acss_debit?: components['schemas']['invoice_payment_method_options_acss_debit'] | null + /** @description This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. */ + bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null + /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ + card?: components['schemas']['subscription_payment_method_options_card'] | null + } + /** SubscriptionsResourcePaymentSettings */ + subscriptions_resource_payment_settings: { + /** @description Payment-method-specific configuration to provide to invoices created by the subscription. */ + payment_method_options?: components['schemas']['subscriptions_resource_payment_method_options'] | null + /** @description The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + } + /** + * SubscriptionsResourcePendingUpdate + * @description Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ + subscriptions_resource_pending_update: { + /** + * Format: unix-time + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + */ + billing_cycle_anchor?: number | null + /** + * Format: unix-time + * @description The point after which the changes reflected by this update will be discarded and no longer applied. + */ + expires_at: number + /** @description List of subscription items, each with an attached plan, that will be set if the update is applied. */ + subscription_items?: components['schemas']['subscription_item'][] | null + /** + * Format: unix-time + * @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + */ + trial_end?: number | null + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean | null + } + /** + * TaxProductResourceTaxCode + * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + */ + tax_code: { + /** @description A detailed description of which types of products the tax code represents. */ + description: string + /** @description Unique identifier for the object. */ + id: string + /** @description A short name for the tax code. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_code' + } + /** TaxDeductedAtSource */ + tax_deducted_at_source: { + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_deducted_at_source' + /** + * Format: unix-time + * @description The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ + period_end: number + /** + * Format: unix-time + * @description The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + */ + period_start: number + /** @description The TAN that was supplied to Stripe when TDS was assessed */ + tax_deduction_account_number: string + } + /** + * tax_id + * @description You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). + * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + * + * Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + */ + tax_id: { + /** @description Two-letter ISO code representing the country of the tax ID. */ + country?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description ID of the customer. */ + customer?: (string | components['schemas']['customer']) | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_id' + /** + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description Value of the tax ID. */ + value: string + /** @description Tax ID verification information. */ + verification?: components['schemas']['tax_id_verification'] | null + } + /** tax_id_verification */ + tax_id_verification: { + /** + * @description Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + * @enum {string} + */ + status: 'pending' | 'unavailable' | 'unverified' | 'verified' + /** @description Verified address. */ + verified_address?: string | null + /** @description Verified name. */ + verified_name?: string | null + } + /** + * TaxRate + * @description Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + * + * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). + */ + tax_rate: { + /** @description Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string | null + /** @description The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. */ + display_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'tax_rate' + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string | null + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string|null} + */ + tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null + } + /** + * TerminalConnectionToken + * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + * + * Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + */ + 'terminal.connection_token': { + /** @description The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.connection_token' + /** @description Your application should pass this token to the Stripe Terminal SDK. */ + secret: string + } + /** + * TerminalLocationLocation + * @description A Location represents a grouping of readers. + * + * Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + */ + 'terminal.location': { + address: components['schemas']['address'] + /** @description The display name of the location. */ + display_name: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.location' + } + /** + * TerminalReaderReader + * @description A Reader represents a physical device for accepting payment details. + * + * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). + */ + 'terminal.reader': { + /** @description The current software version of the reader. */ + device_sw_version?: string | null + /** + * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @enum {string} + */ + device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + /** @description Unique identifier for the object. */ + id: string + /** @description The local IP address of the reader. */ + ip_address?: string | null + /** @description Custom label given to the reader for easier identification. */ + label: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The location identifier of the reader. */ + location?: (string | components['schemas']['terminal.location']) | null + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.reader' + /** @description Serial number of the reader. */ + serial_number: string + /** @description The networking status of the reader. */ + status?: string | null + } + /** + * ThreeDSecure + * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` + * object. Once the object has been created, you can use it to authenticate the + * cardholder and create a charge. + */ + three_d_secure: { + /** @description Amount of the charge that you will create when authentication completes. */ + amount: number + /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ + authenticated: boolean + card: components['schemas']['card'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'three_d_secure' + /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ + redirect_url?: string | null + /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ + status: string + } + /** three_d_secure_details */ + three_d_secure_details: { + /** + * @description For authenticated transactions: how the customer was authenticated by + * the issuing bank. + * @enum {string|null} + */ + authentication_flow?: ('challenge' | 'frictionless') | null + /** + * @description Indicates the outcome of 3D Secure authentication. + * @enum {string|null} + */ + result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + /** + * @description Additional information about why 3D Secure succeeded or failed based + * on the `result`. + * @enum {string|null} + */ + result_reason?: ('abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected') | null + /** + * @description The version of 3D Secure that was used. + * @enum {string|null} + */ + version?: ('1.0.2' | '2.1.0' | '2.2.0') | null + } + /** three_d_secure_usage */ + three_d_secure_usage: { + /** @description Whether 3D Secure is supported on this card. */ + supported: boolean + } + /** + * Token + * @description Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. You should use our + * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + * client-side. This ensures that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + * If you cannot use client-side tokenization, you can also create tokens using + * the API with either your publishable or secret API key. Keep in mind that if + * your integration uses this method, you are responsible for any PCI compliance + * that may be required, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information is not sent directly to + * Stripe, so we cannot determine how it is handled or stored. + * + * Tokens cannot be stored or used more than once. To store card or bank account + * information for later use, you can create [Customer](https://stripe.com/docs/api#customers) + * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that + * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + * performs best with integrations that use client-side tokenization. + * + * Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) + */ + token: { + bank_account?: components['schemas']['bank_account'] + card?: components['schemas']['card'] + /** @description IP address of the client that generated the token. */ + client_ip?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'token' + /** @description Type of the token: `account`, `bank_account`, `card`, or `pii`. */ + type: string + /** @description Whether this token has already been used (tokens can be used only once). */ + used: boolean + } + /** + * Topup + * @description To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. + * + * Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). + */ + topup: { + /** @description Amount transferred. */ + amount: number + /** @description ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. */ + expected_availability_date?: number | null + /** @description Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ + failure_code?: string | null + /** @description Message to user further explaining reason for top-up failure if available. */ + failure_message?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'topup' + source: components['schemas']['source'] + /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ + statement_descriptor?: string | null + /** + * @description The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded' + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string | null + } + /** + * Transfer + * @description A `Transfer` object is created when you move funds between Stripe accounts as + * part of Connect. + * + * Before April 6, 2017, transfers also represented movement of funds from a + * Stripe account to a card or bank account. This behavior has since been split + * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + * information, read about the + * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + * + * Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). + */ + transfer: { + /** @description Amount in %s to be transferred. */ + amount: number + /** @description Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ + amount_reversed: number + /** @description Balance transaction that describes the impact of this transfer on your account balance. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** + * Format: unix-time + * @description Time that this record of the transfer was first created. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description ID of the Stripe account the transfer was sent to. */ + destination?: (string | components['schemas']['account']) | null + /** @description If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ + destination_payment?: string | components['schemas']['charge'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'transfer' + /** + * TransferReversalList + * @description A list of reversals that have been applied to the transfer. + */ + reversals: { + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ + reversed: boolean + /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ + source_transaction?: (string | components['schemas']['charge']) | null + /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ + source_type?: string | null + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string | null + } + /** transfer_data */ + transfer_data: { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** + * @description The account (if any) the payment will be attributed to for tax + * reporting, and where funds from the payment will be transferred to upon + * payment success. + */ + destination: string | components['schemas']['account'] + } + /** + * TransferReversal + * @description [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + * connected account, either entirely or partially, and can also specify whether + * to refund any related application fees. Transfer reversals add to the + * platform's balance and subtract from the destination account's balance. + * + * Reversing a transfer that was made for a [destination + * charge](/docs/connect/destination-charges) is allowed only up to the amount of + * the charge. It is possible to reverse a + * [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) + * transfer only if the destination account has enough balance to cover the + * reversal. + * + * Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). + */ + transfer_reversal: { + /** @description Amount, in %s. */ + amount: number + /** @description Balance transaction that describes the impact on your account balance. */ + balance_transaction?: (string | components['schemas']['balance_transaction']) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Linked payment refund for the transfer reversal. */ + destination_payment_refund?: (string | components['schemas']['refund']) | null + /** @description Unique identifier for the object. */ + id: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'transfer_reversal' + /** @description ID of the refund responsible for the transfer reversal. */ + source_refund?: (string | components['schemas']['refund']) | null + /** @description ID of the transfer that was reversed. */ + transfer: string | components['schemas']['transfer'] + } + /** TransferSchedule */ + transfer_schedule: { + /** @description The number of days charges for the account will be held before being paid out. */ + delay_days: number + /** @description How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ + interval: string + /** @description The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. */ + monthly_anchor?: number + /** @description The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ + weekly_anchor?: string + } + /** TransformQuantity */ + transform_quantity: { + /** @description Divide usage by this number. */ + divide_by: number + /** + * @description After division, either round the result `up` or `down`. + * @enum {string} + */ + round: 'down' | 'up' + } + /** TransformUsage */ + transform_usage: { + /** @description Divide usage by this number. */ + divide_by: number + /** + * @description After division, either round the result `up` or `down`. + * @enum {string} + */ + round: 'down' | 'up' + } + /** + * UsageRecord + * @description Usage records allow you to report customer usage and metrics to Stripe for + * metered billing of subscription prices. + * + * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). + */ + usage_record: { + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'usage_record' + /** @description The usage quantity for the specified date. */ + quantity: number + /** @description The ID of the subscription item this usage record contains data for. */ + subscription_item: string + /** + * Format: unix-time + * @description The timestamp when this usage occurred. + */ + timestamp: number + } + /** UsageRecordSummary */ + usage_record_summary: { + /** @description Unique identifier for the object. */ + id: string + /** @description The invoice in which this usage period has been billed for. */ + invoice?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'usage_record_summary' + period: components['schemas']['period'] + /** @description The ID of the subscription item this summary is describing. */ + subscription_item: string + /** @description The total usage within this usage period. */ + total_usage: number + } + /** verification_session_redaction */ + verification_session_redaction: { + /** + * @description Indicates whether this object and its related objects have been redacted or not. + * @enum {string} + */ + status: 'processing' | 'redacted' + } + /** + * NotificationWebhookEndpoint + * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + */ + webhook_endpoint: { + /** @description The API version events are rendered as for this webhook endpoint. */ + api_version?: string | null + /** @description The ID of the associated Connect application. */ + application?: string | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description An optional description of what the webhook is used for. */ + description?: string | null + /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ + enabled_events: string[] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'webhook_endpoint' + /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ + secret?: string + /** @description The status of the webhook. It can be `enabled` or `disabled`. */ + status: string + /** @description The URL of the webhook endpoint. */ + url: string + } + } +} + +export interface operations { + /**

Initiate 3D Secure authentication.

*/ + Post3dSecure: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['three_d_secure'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount of the charge that you will create when authentication completes. */ + amount: number + /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ + card?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer associated with this 3D secure authentication. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ + return_url: string + } + } + } + } + /**

Retrieves a 3D Secure object.

*/ + Get3dSecureThreeDSecure: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + three_d_secure: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['three_d_secure'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an account.

*/ + GetAccount: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccount: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + /** address_specs */ + support_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + support_email?: string + support_phone?: string + support_url?: string | '' + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * capabilities_param + * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + */ + capabilities?: { + /** capability_param */ + acss_debit_payments?: { + requested?: boolean + } + /** capability_param */ + afterpay_clearpay_payments?: { + requested?: boolean + } + /** capability_param */ + au_becs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bacs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bancontact_payments?: { + requested?: boolean + } + /** capability_param */ + boleto_payments?: { + requested?: boolean + } + /** capability_param */ + card_issuing?: { + requested?: boolean + } + /** capability_param */ + card_payments?: { + requested?: boolean + } + /** capability_param */ + cartes_bancaires_payments?: { + requested?: boolean + } + /** capability_param */ + eps_payments?: { + requested?: boolean + } + /** capability_param */ + fpx_payments?: { + requested?: boolean + } + /** capability_param */ + giropay_payments?: { + requested?: boolean + } + /** capability_param */ + grabpay_payments?: { + requested?: boolean + } + /** capability_param */ + ideal_payments?: { + requested?: boolean + } + /** capability_param */ + jcb_payments?: { + requested?: boolean + } + /** capability_param */ + klarna_payments?: { + requested?: boolean + } + /** capability_param */ + legacy_payments?: { + requested?: boolean + } + /** capability_param */ + oxxo_payments?: { + requested?: boolean + } + /** capability_param */ + p24_payments?: { + requested?: boolean + } + /** capability_param */ + sepa_debit_payments?: { + requested?: boolean + } + /** capability_param */ + sofort_payments?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_k?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_misc?: { + requested?: boolean + } + /** capability_param */ + transfers?: { + requested?: boolean + } + } + /** + * company_specs + * @description Information about the company or business. This field is available for any `business_type`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** + * documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + bank_account_ownership_verification?: { + files?: string[] + } + /** documents_param */ + company_license?: { + files?: string[] + } + /** documents_param */ + company_memorandum_of_association?: { + files?: string[] + } + /** documents_param */ + company_ministerial_decree?: { + files?: string[] + } + /** documents_param */ + company_registration_verification?: { + files?: string[] + } + /** documents_param */ + company_tax_id_verification?: { + files?: string[] + } + /** documents_param */ + proof_of_registration?: { + files?: string[] + } + } + /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * settings_specs_update + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_issuing_settings_specs */ + card_issuing?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: 'minimum' | number + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + service_agreement?: string + user_agent?: string + } + } + } + } + } + /** + *

With Connect, you can delete accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + DeleteAccount: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account?: string + } + } + } + } + /**

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

*/ + PostAccountLinks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the account to create an account link for. */ + account: string + /** + * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. + * @enum {string} + */ + collect?: 'currently_due' | 'eventually_due' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. */ + refresh_url?: string + /** @description The URL that the user will be redirected to upon leaving or completing the linked flow. */ + return_url?: string + /** + * @description The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + * @enum {string} + */ + type: 'account_onboarding' | 'account_update' + } + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountBankAccounts: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountBankAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountBankAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + } + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountBankAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + GetAccountCapabilities: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['capability'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves information about the specified Account Capability.

*/ + GetAccountCapabilitiesCapability: { + parameters: { + path: { + capability: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['capability'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing Account Capability.

*/ + PostAccountCapabilitiesCapability: { + parameters: { + path: { + capability: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['capability'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ + requested?: boolean + } + } + } + } + /**

List external accounts for an account.

*/ + GetAccountExternalAccounts: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'])[] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountExternalAccounts: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountExternalAccountsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountExternalAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + } + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountExternalAccountsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + PostAccountLoginLinks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['login_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string + } + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountPeople: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + representative?: boolean + } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new person.

*/ + PostAccountPeople: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountPeoplePerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing person.

*/ + PostAccountPeoplePerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountPeoplePerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountPersons: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + representative?: boolean + } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new person.

*/ + PostAccountPersons: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountPersonsPerson: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing person.

*/ + PostAccountPersonsPerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + account?: string + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountPersonsPerson: { + parameters: { + path: { + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ + GetAccounts: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

With Connect, you can create Stripe accounts for your users. + * To do this, you’ll first need to register your platform.

+ */ + PostAccounts: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + /** address_specs */ + support_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + support_email?: string + support_phone?: string + support_url?: string | '' + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * capabilities_param + * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + */ + capabilities?: { + /** capability_param */ + acss_debit_payments?: { + requested?: boolean + } + /** capability_param */ + afterpay_clearpay_payments?: { + requested?: boolean + } + /** capability_param */ + au_becs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bacs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bancontact_payments?: { + requested?: boolean + } + /** capability_param */ + boleto_payments?: { + requested?: boolean + } + /** capability_param */ + card_issuing?: { + requested?: boolean + } + /** capability_param */ + card_payments?: { + requested?: boolean + } + /** capability_param */ + cartes_bancaires_payments?: { + requested?: boolean + } + /** capability_param */ + eps_payments?: { + requested?: boolean + } + /** capability_param */ + fpx_payments?: { + requested?: boolean + } + /** capability_param */ + giropay_payments?: { + requested?: boolean + } + /** capability_param */ + grabpay_payments?: { + requested?: boolean + } + /** capability_param */ + ideal_payments?: { + requested?: boolean + } + /** capability_param */ + jcb_payments?: { + requested?: boolean + } + /** capability_param */ + klarna_payments?: { + requested?: boolean + } + /** capability_param */ + legacy_payments?: { + requested?: boolean + } + /** capability_param */ + oxxo_payments?: { + requested?: boolean + } + /** capability_param */ + p24_payments?: { + requested?: boolean + } + /** capability_param */ + sepa_debit_payments?: { + requested?: boolean + } + /** capability_param */ + sofort_payments?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_k?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_misc?: { + requested?: boolean + } + /** capability_param */ + transfers?: { + requested?: boolean + } + } + /** + * company_specs + * @description Information about the company or business. This field is available for any `business_type`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + country?: string + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** + * documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + bank_account_ownership_verification?: { + files?: string[] + } + /** documents_param */ + company_license?: { + files?: string[] + } + /** documents_param */ + company_memorandum_of_association?: { + files?: string[] + } + /** documents_param */ + company_ministerial_decree?: { + files?: string[] + } + /** documents_param */ + company_registration_verification?: { + files?: string[] + } + /** documents_param */ + company_tax_id_verification?: { + files?: string[] + } + /** documents_param */ + proof_of_registration?: { + files?: string[] + } + } + /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * settings_specs + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_issuing_settings_specs */ + card_issuing?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: 'minimum' | number + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + service_agreement?: string + user_agent?: string + } + /** + * @description The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + * @enum {string} + */ + type?: 'custom' | 'express' | 'standard' + } + } + } + } + /**

Retrieves the details of an account.

*/ + GetAccountsAccount: { + parameters: { + path: { + account: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccountsAccount: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** + * business_profile_specs + * @description Business information about the account. + */ + business_profile?: { + mcc?: string + name?: string + product_description?: string + /** address_specs */ + support_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + support_email?: string + support_phone?: string + support_url?: string | '' + url?: string + } + /** + * @description The business type. + * @enum {string} + */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** + * capabilities_param + * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + */ + capabilities?: { + /** capability_param */ + acss_debit_payments?: { + requested?: boolean + } + /** capability_param */ + afterpay_clearpay_payments?: { + requested?: boolean + } + /** capability_param */ + au_becs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bacs_debit_payments?: { + requested?: boolean + } + /** capability_param */ + bancontact_payments?: { + requested?: boolean + } + /** capability_param */ + boleto_payments?: { + requested?: boolean + } + /** capability_param */ + card_issuing?: { + requested?: boolean + } + /** capability_param */ + card_payments?: { + requested?: boolean + } + /** capability_param */ + cartes_bancaires_payments?: { + requested?: boolean + } + /** capability_param */ + eps_payments?: { + requested?: boolean + } + /** capability_param */ + fpx_payments?: { + requested?: boolean + } + /** capability_param */ + giropay_payments?: { + requested?: boolean + } + /** capability_param */ + grabpay_payments?: { + requested?: boolean + } + /** capability_param */ + ideal_payments?: { + requested?: boolean + } + /** capability_param */ + jcb_payments?: { + requested?: boolean + } + /** capability_param */ + klarna_payments?: { + requested?: boolean + } + /** capability_param */ + legacy_payments?: { + requested?: boolean + } + /** capability_param */ + oxxo_payments?: { + requested?: boolean + } + /** capability_param */ + p24_payments?: { + requested?: boolean + } + /** capability_param */ + sepa_debit_payments?: { + requested?: boolean + } + /** capability_param */ + sofort_payments?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_k?: { + requested?: boolean + } + /** capability_param */ + tax_reporting_us_1099_misc?: { + requested?: boolean + } + /** capability_param */ + transfers?: { + requested?: boolean + } + } + /** + * company_specs + * @description Information about the company or business. This field is available for any `business_type`. + */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ + default_currency?: string + /** + * documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + bank_account_ownership_verification?: { + files?: string[] + } + /** documents_param */ + company_license?: { + files?: string[] + } + /** documents_param */ + company_memorandum_of_association?: { + files?: string[] + } + /** documents_param */ + company_ministerial_decree?: { + files?: string[] + } + /** documents_param */ + company_registration_verification?: { + files?: string[] + } + /** documents_param */ + company_tax_id_verification?: { + files?: string[] + } + /** documents_param */ + proof_of_registration?: { + files?: string[] + } + } + /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + external_account?: string + /** + * individual_specs + * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * settings_specs_update + * @description Options for customizing how the account functions within Stripe. + */ + settings?: { + /** branding_settings_specs */ + branding?: { + icon?: string + logo?: string + primary_color?: string + secondary_color?: string + } + /** card_issuing_settings_specs */ + card_issuing?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } + /** card_payments_settings_specs */ + card_payments?: { + /** decline_charge_on_specs */ + decline_on?: { + avs_failure?: boolean + cvc_failure?: boolean + } + statement_descriptor_prefix?: string + } + /** payments_settings_specs */ + payments?: { + statement_descriptor?: string + statement_descriptor_kana?: string + statement_descriptor_kanji?: string + } + /** payout_settings_specs */ + payouts?: { + debit_negative_balances?: boolean + /** transfer_schedule_specs */ + schedule?: { + delay_days?: 'minimum' | number + /** @enum {string} */ + interval?: 'daily' | 'manual' | 'monthly' | 'weekly' + monthly_anchor?: number + /** @enum {string} */ + weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' + } + statement_descriptor?: string + } + } + /** + * tos_acceptance_specs + * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + service_agreement?: string + user_agent?: string + } + } + } + } + } + /** + *

With Connect, you can delete accounts you manage.

+ * + *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

+ * + *

If you want to delete your own account, use the account information tab in your account settings instead.

+ */ + DeleteAccountsAccount: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountsAccountBankAccounts: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountBankAccountsId: { + parameters: { + path: { + account: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountsAccountBankAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + } + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountBankAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ + GetAccountsAccountCapabilities: { + parameters: { + path: { + account: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['capability'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves information about the specified Account Capability.

*/ + GetAccountsAccountCapabilitiesCapability: { + parameters: { + path: { + account: string + capability: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['capability'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing Account Capability.

*/ + PostAccountsAccountCapabilitiesCapability: { + parameters: { + path: { + account: string + capability: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['capability'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ + requested?: boolean + } + } + } + } + /**

List external accounts for an account.

*/ + GetAccountsAccountExternalAccounts: { + parameters: { + path: { + account: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'])[] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create an external account for a given account.

*/ + PostAccountsAccountExternalAccounts: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountExternalAccountsId: { + parameters: { + path: { + account: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

+ * + *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

+ */ + PostAccountsAccountExternalAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: '' | 'company' | 'individual' + /** + * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + * @enum {string} + */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + } + } + } + } + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountExternalAccountsId: { + parameters: { + path: { + account: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_external_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a single-use login link for an Express account to access their Stripe dashboard.

+ * + *

You may only create login links for Express accounts connected to your platform.

+ */ + PostAccountsAccountLoginLinks: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['login_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string + } + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountsAccountPeople: { + parameters: { + path: { + account: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + representative?: boolean + } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new person.

*/ + PostAccountsAccountPeople: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountsAccountPeoplePerson: { + parameters: { + path: { + account: string + person: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing person.

*/ + PostAccountsAccountPeoplePerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountsAccountPeoplePerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ + GetAccountsAccountPersons: { + parameters: { + path: { + account: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filters on the list of people returned based on the person's relationship to the account's company. */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + representative?: boolean + } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['person'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new person.

*/ + PostAccountsAccountPersons: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Retrieves an existing person.

*/ + GetAccountsAccountPersonsPerson: { + parameters: { + path: { + account: string + person: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing person.

*/ + PostAccountsAccountPersonsPerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * address_specs + * @description The person's address. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** + * japan_address_kana_specs + * @description The Kana variation of the person's address (Japan only). + */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** + * japan_address_kanji_specs + * @description The Kanji variation of the person's address (Japan only). + */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** @description The person's date of birth. */ + dob?: + | { + day: number + month: number + year: number + } + | '' + /** + * person_documents_specs + * @description Documents that may be submitted to satisfy various informational requests. + */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + /** @description The person's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The person's first name. */ + first_name?: string + /** @description The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string + /** @description The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string + /** @description A list of alternate names or aliases that the person is known by. */ + full_name_aliases?: string[] | '' + /** @description The person's gender (International regulations require either "male" or "female"). */ + gender?: string + /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number?: string + /** @description The person's last name. */ + last_name?: string + /** @description The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string + /** @description The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string + /** @description The person's maiden name. */ + maiden_name?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ + nationality?: string + /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string + /** @description The person's phone number. */ + phone?: string + /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ + political_exposure?: string + /** + * relationship_specs + * @description The relationship that this person has with the account's legal entity. + */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + /** @description The last four digits of the person's Social Security number (U.S. only). */ + ssn_last_4?: string + /** + * person_verification_specs + * @description The person's verification status. + */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + } + } + } + /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ + DeleteAccountsAccountPersonsPerson: { + parameters: { + path: { + account: string + person: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_person'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

With Connect, you may flag accounts as suspicious.

+ * + *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

+ */ + PostAccountsAccountReject: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ + reason: string + } + } + } + } + /**

List apple pay domains.

*/ + GetApplePayDomains: { + parameters: { + query: { + domain_name?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['apple_pay_domain'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create an apple pay domain.

*/ + PostApplePayDomains: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apple_pay_domain'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + domain_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Retrieve an apple pay domain.

*/ + GetApplePayDomainsDomain: { + parameters: { + path: { + domain: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apple_pay_domain'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Delete an apple pay domain.

*/ + DeleteApplePayDomainsDomain: { + parameters: { + path: { + domain: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_apple_pay_domain'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ + GetApplicationFees: { + parameters: { + query: { + /** Only return application fees for the charge specified by this charge ID. */ + charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['application_fee'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ + GetApplicationFeesFeeRefundsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + fee: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['fee_refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostApplicationFeesFeeRefundsId: { + parameters: { + path: { + fee: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['fee_refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ + GetApplicationFeesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['application_fee'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + PostApplicationFeesIdRefund: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['application_fee'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + amount?: number + directive?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + GetApplicationFeesIdRefunds: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['fee_refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Refunds an application fee that has previously been collected but not yet refunded. + * Funds will be refunded to the Stripe account from which the fee was originally collected.

+ * + *

You can optionally refund only part of an application fee. + * You can do so multiple times, until the entire fee has been refunded.

+ * + *

Once entirely refunded, an application fee can’t be refunded again. + * This method will raise an error when called on an already-refunded application fee, + * or when trying to refund more money than is left on an application fee.

+ */ + PostApplicationFeesIdRefunds: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['fee_refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /** + *

Retrieves the current account balance, based on the authentication that was used to make the request. + * For a sample request, see Accounting for negative balances.

+ */ + GetBalance: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['balance'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + GetBalanceTransactions: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout?: string + /** Only returns the original transaction. */ + source?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + GetBalanceTransactionsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

+ * + *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

+ */ + GetBalanceHistory: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout?: string + /** Only returns the original transaction. */ + source?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ + type?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieves the balance transaction with the given ID.

+ * + *

Note that this endpoint previously used the path /v1/balance/history/:id.

+ */ + GetBalanceHistoryId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of configurations that describe the functionality of the customer portal.

*/ + GetBillingPortalConfigurations: { + parameters: { + query: { + /** Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). */ + active?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). */ + is_default?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['billing_portal.configuration'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a configuration that describes the functionality and behavior of a PortalSession

*/ + PostBillingPortalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['billing_portal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * business_profile_create_param + * @description The business information shown to customers in the portal. + */ + business_profile: { + headline?: string + privacy_policy_url: string + terms_of_service_url: string + } + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ + default_return_url?: string | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * features_creation_param + * @description Information about the features available in the portal. + */ + features: { + /** customer_update_creation_param */ + customer_update?: { + allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + enabled: boolean + } + /** invoice_list_param */ + invoice_history?: { + enabled: boolean + } + /** payment_method_update_param */ + payment_method_update?: { + enabled: boolean + } + /** subscription_cancel_creation_param */ + subscription_cancel?: { + /** subscription_cancellation_reason_creation_param */ + cancellation_reason?: { + enabled: boolean + options: + | ( + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused' + )[] + | '' + } + enabled: boolean + /** @enum {string} */ + mode?: 'at_period_end' | 'immediately' + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + /** subscription_pause_param */ + subscription_pause?: { + enabled?: boolean + } + /** subscription_update_creation_param */ + subscription_update?: { + default_allowed_updates: ('price' | 'promotion_code' | 'quantity')[] | '' + enabled: boolean + products: + | { + prices: string[] + product: string + }[] + | '' + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Retrieves a configuration that describes the functionality of the customer portal.

*/ + GetBillingPortalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['billing_portal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a configuration that describes the functionality of the customer portal.

*/ + PostBillingPortalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['billing_portal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the configuration is active and can be used to create portal sessions. */ + active?: boolean + /** + * business_profile_update_param + * @description The business information shown to customers in the portal. + */ + business_profile?: { + headline?: string + privacy_policy_url?: string + terms_of_service_url?: string + } + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ + default_return_url?: string | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * features_updating_param + * @description Information about the features available in the portal. + */ + features?: { + /** customer_update_updating_param */ + customer_update?: { + allowed_updates?: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + enabled?: boolean + } + /** invoice_list_param */ + invoice_history?: { + enabled: boolean + } + /** payment_method_update_param */ + payment_method_update?: { + enabled: boolean + } + /** subscription_cancel_updating_param */ + subscription_cancel?: { + /** subscription_cancellation_reason_updating_param */ + cancellation_reason?: { + enabled: boolean + options?: + | ( + | 'customer_service' + | 'low_quality' + | 'missing_features' + | 'other' + | 'switched_service' + | 'too_complex' + | 'too_expensive' + | 'unused' + )[] + | '' + } + enabled?: boolean + /** @enum {string} */ + mode?: 'at_period_end' | 'immediately' + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + /** subscription_pause_param */ + subscription_pause?: { + enabled?: boolean + } + /** subscription_update_updating_param */ + subscription_update?: { + default_allowed_updates?: ('price' | 'promotion_code' | 'quantity')[] | '' + enabled?: boolean + products?: + | { + prices: string[] + product: string + }[] + | '' + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Creates a session of the customer portal.

*/ + PostBillingPortalSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['billing_portal.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. */ + configuration?: string + /** @description The ID of an existing customer. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + * @enum {string} + */ + locale?: + | 'auto' + | 'bg' + | 'cs' + | 'da' + | 'de' + | 'el' + | 'en' + | 'en-AU' + | 'en-CA' + | 'en-GB' + | 'en-IE' + | 'en-IN' + | 'en-NZ' + | 'en-SG' + | 'es' + | 'es-419' + | 'et' + | 'fi' + | 'fil' + | 'fr' + | 'fr-CA' + | 'hr' + | 'hu' + | 'id' + | 'it' + | 'ja' + | 'ko' + | 'lt' + | 'lv' + | 'ms' + | 'mt' + | 'nb' + | 'nl' + | 'pl' + | 'pt' + | 'pt-BR' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sv' + | 'th' + | 'tr' + | 'vi' + | 'zh' + | 'zh-HK' + | 'zh-TW' + /** @description The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ + on_behalf_of?: string + /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. */ + return_url?: string + } + } + } + } + /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ + GetBitcoinReceivers: { + parameters: { + query: { + /** Filter for active receivers. */ + active?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Filter for filled receivers. */ + filled?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Filter for receivers with uncaptured funds. */ + uncaptured_funds?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['bitcoin_receiver'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the Bitcoin receiver with the given ID.

*/ + GetBitcoinReceiversId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['bitcoin_receiver'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List bitcoin transacitons for a given receiver.

*/ + GetBitcoinReceiversReceiverTransactions: { + parameters: { + query: { + /** Only return transactions for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + receiver: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List bitcoin transacitons for a given receiver.

*/ + GetBitcoinTransactions: { + parameters: { + query: { + /** Only return transactions for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + receiver?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['bitcoin_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ + GetCharges: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return charges for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return charges for this transfer group. */ + transfer_group?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['charge'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ + PostCharges: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['charge'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + application_fee?: number + /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + application_fee_amount?: number + /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ + capture?: boolean + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + cvc?: string + exp_month: number + exp_year: number + metadata?: { [key: string]: string } + name?: string + number: string + /** @enum {string} */ + object?: 'card' + } + | string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The ID of an existing customer that will be charged in this request. */ + customer?: string + /** @description An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ + description?: string + destination?: + | { + account: string + amount?: number + } + | string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ + on_behalf_of?: string + /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** + * optional_fields_shipping + * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. */ + source?: string + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_specs + * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). */ + transfer_group?: string + } + } + } + } + /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ + GetChargesCharge: { + parameters: { + path: { + charge: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['charge'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostChargesCharge: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['charge'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. */ + customer?: string + /** @description An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fraud_details + * @description A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + */ + fraud_details?: { + /** @enum {string} */ + user_report: '' | 'fraudulent' | 'safe' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. */ + receipt_email?: string + /** + * optional_fields_shipping + * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + } + /** + *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

+ * + *

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

+ */ + PostChargesChargeCapture: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['charge'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ + amount?: number + /** @description An application fee to add on to this charge. */ + application_fee?: number + /** @description An application fee amount to add on to this charge, which must be less than or equal to the original amount. */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. */ + receipt_email?: string + /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_specs + * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + */ + transfer_data?: { + amount?: number + } + /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + } + /**

Retrieve a dispute for a specified charge.

*/ + GetChargesChargeDispute: { + parameters: { + path: { + charge: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + PostChargesChargeDispute: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string + billing_address?: string + cancellation_policy?: string + cancellation_policy_disclosure?: string + cancellation_rebuttal?: string + customer_communication?: string + customer_email_address?: string + customer_name?: string + customer_purchase_ip?: string + customer_signature?: string + duplicate_charge_documentation?: string + duplicate_charge_explanation?: string + duplicate_charge_id?: string + product_description?: string + receipt?: string + refund_policy?: string + refund_policy_disclosure?: string + refund_refusal_explanation?: string + service_date?: string + service_documentation?: string + shipping_address?: string + shipping_carrier?: string + shipping_date?: string + shipping_documentation?: string + shipping_tracking_number?: string + uncategorized_file?: string + uncategorized_text?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean + } + } + } + } + PostChargesChargeDisputeClose: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

+ * + *

Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged.

+ * + *

You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded.

+ * + *

Once entirely refunded, a charge can’t be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge.

+ */ + PostChargesChargeRefund: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['charge'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ + GetChargesChargeRefunds: { + parameters: { + path: { + charge: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create a refund.

*/ + PostChargesChargeRefunds: { + parameters: { + path: { + charge: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetChargesChargeRefundsRefund: { + parameters: { + path: { + charge: string + refund: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Update a specified refund.

*/ + PostChargesChargeRefundsRefund: { + parameters: { + path: { + charge: string + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of Checkout Sessions.

*/ + GetCheckoutSessions: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return the Checkout Session for the PaymentIntent specified. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return the Checkout Session for the subscription specified. */ + subscription?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['checkout.session'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a Session object.

*/ + PostCheckoutSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['checkout.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * after_expiration_params + * @description Configure actions after a Checkout Session has expired. + */ + after_expiration?: { + /** recovery_params */ + recovery?: { + allow_promotion_codes?: boolean + enabled: boolean + } + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** + * automatic_tax_params + * @description Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Specify whether Checkout should collect the customer's billing address. + * @enum {string} + */ + billing_address_collection?: 'auto' | 'required' + /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string + /** + * @description A unique string to reference the Checkout Session. This can be a + * customer ID, a cart ID, or similar, and can be used to reconcile the + * session with your internal systems. + */ + client_reference_id?: string + /** + * consent_collection_params + * @description Configure fields for the Checkout Session to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: 'auto' + } + /** + * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card + * payment method will be used to prefill the email, name, card details, and billing address + * on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + * will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + * + * If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + * If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + * + * If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow. + * + * You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + */ + customer?: string + /** + * @description Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + * + * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + * + * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * + * Can only be set in `payment` and `setup` mode. + * @enum {string} + */ + customer_creation?: 'always' | 'if_required' + /** + * @description If provided, this value will be used when the Customer object is created. + * If not provided, customers will be asked to enter their email address. + * Use this parameter to prefill customer data if you already have an email + * on file. To access information about the customer once a session is + * complete, use the `customer` field. + */ + customer_email?: string + /** + * customer_update_params + * @description Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + */ + customer_update?: { + /** @enum {string} */ + address?: 'auto' | 'never' + /** @enum {string} */ + name?: 'auto' | 'never' + /** @enum {string} */ + shipping?: 'auto' | 'never' + } + /** @description The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. */ + discounts?: { + coupon?: string + promotion_code?: string + }[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + */ + expires_at?: number + /** + * @description A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + * + * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + * + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + description?: string + dynamic_tax_rates?: string[] + price?: string + /** price_data_with_product_data */ + price_data?: { + currency: string + product?: string + /** product_data */ + product_data?: { + description?: string + images?: string[] + metadata?: { [key: string]: string } + name: string + tax_code?: string + } + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] + }[] + /** + * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + * @enum {string} + */ + locale?: + | 'auto' + | 'bg' + | 'cs' + | 'da' + | 'de' + | 'el' + | 'en' + | 'en-GB' + | 'es' + | 'es-419' + | 'et' + | 'fi' + | 'fil' + | 'fr' + | 'fr-CA' + | 'hr' + | 'hu' + | 'id' + | 'it' + | 'ja' + | 'ko' + | 'lt' + | 'lv' + | 'ms' + | 'mt' + | 'nb' + | 'nl' + | 'pl' + | 'pt' + | 'pt-BR' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sv' + | 'th' + | 'tr' + | 'vi' + | 'zh' + | 'zh-HK' + | 'zh-TW' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description The mode of the Checkout Session. Required when using prices or `setup` mode. Pass `subscription` if the Checkout Session includes at least one recurring item. + * @enum {string} + */ + mode?: 'payment' | 'setup' | 'subscription' + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + application_fee_amount?: number + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + description?: string + metadata?: { [key: string]: string } + on_behalf_of?: string + receipt_email?: string + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + /** shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data_params */ + transfer_data?: { + amount?: number + destination: string + } + transfer_group?: string + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration. + */ + payment_method_options?: { + /** payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** payment_method_options_param */ + boleto?: { + expires_after_days?: number + } + /** payment_method_options_param */ + oxxo?: { + expires_after_days?: number + } + /** payment_method_options_param */ + wechat_pay?: { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + } + } + /** + * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + * + * Read more about the supported payment methods and their requirements in our [payment + * method details guide](/docs/payments/checkout/payment-methods). + * + * If multiple payment methods are passed, Checkout will dynamically reorder them to + * prioritize the most relevant payment methods based on the customer's location and + * other characteristics. + */ + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings for the session. + * + * We recommend that you review your privacy policy and check with your legal contacts + * before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + */ + phone_number_collection?: { + enabled: boolean + } + /** + * setup_intent_data_param + * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + */ + setup_intent_data?: { + description?: string + metadata?: { [key: string]: string } + on_behalf_of?: string + } + /** + * shipping_address_collection_params + * @description When set, provides configuration for Checkout to collect a shipping address from a customer. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** @description The shipping rate options to apply to this Session. */ + shipping_options?: { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + } + metadata?: { [key: string]: string } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string + /** @enum {string} */ + type?: 'fixed_amount' + } + }[] + /** + * @description Describes the type of transaction being performed by Checkout in order to customize + * relevant text on the page, such as the submit button. `submit_type` can only be + * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + * in `subscription` or `setup` mode. + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + */ + subscription_data?: { + application_fee_percent?: number + default_tax_rates?: string[] + items?: { + plan: string + quantity?: number + tax_rates?: string[] + }[] + metadata?: { [key: string]: string } + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** Format: unix-time */ + trial_end?: number + trial_period_days?: number + } + /** + * @description The URL to which Stripe should send customers when payment or setup + * is complete. + * If you’d like to use information from the successful Checkout Session on your page, + * read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + */ + success_url: string + /** + * tax_id_collection_params + * @description Controls tax ID collection settings for the session. + */ + tax_id_collection?: { + enabled: boolean + } + } + } + } + } + /**

Retrieves a Session object.

*/ + GetCheckoutSessionsSession: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['checkout.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

A Session can be expired when it is in one of these statuses: open

+ * + *

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

+ */ + PostCheckoutSessionsSessionExpire: { + parameters: { + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['checkout.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetCheckoutSessionsSessionLineItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Lists all Country Spec objects available in the API.

*/ + GetCountrySpecs: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['country_spec'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a Country Spec for a given Country code.

*/ + GetCountrySpecsCountry: { + parameters: { + path: { + country: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['country_spec'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your coupons.

*/ + GetCoupons: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['coupon'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

+ * + *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

+ */ + PostCoupons: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['coupon'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ + amount_off?: number + /** + * applies_to_params + * @description A hash containing directions for what this Coupon will apply discounts to. + */ + applies_to?: { + products?: string[] + } + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ + currency?: string + /** + * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. + * @enum {string} + */ + duration?: 'forever' | 'once' | 'repeating' + /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ + duration_in_months?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ + id?: string + /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string + /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ + percent_off?: number + /** + * Format: unix-time + * @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + */ + redeem_by?: number + } + } + } + } + /**

Retrieves the coupon with the given ID.

*/ + GetCouponsCoupon: { + parameters: { + path: { + coupon: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['coupon'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ + PostCouponsCoupon: { + parameters: { + path: { + coupon: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['coupon'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ + name?: string + } + } + } + } + /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ + DeleteCouponsCoupon: { + parameters: { + path: { + coupon: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_coupon'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of credit notes.

*/ + GetCreditNotes: { + parameters: { + query: { + /** Only return credit notes for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return credit notes for the invoice specified by this invoice ID. */ + invoice?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['credit_note'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + * in any combination of the following:

+ * + *
    + *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • + *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • + *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • + *
+ * + *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

+ * + *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount + * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

+ */ + PostCreditNotes: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['credit_note'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The integer amount in %s representing the total amount of the credit note. */ + amount?: number + /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the invoice. */ + invoice: string + /** @description Line items that make up the credit note. */ + lines?: { + amount?: number + description?: string + invoice_line_item?: string + quantity?: number + tax_rates?: string[] | '' + /** @enum {string} */ + type: 'custom_line_item' | 'invoice_line_item' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + }[] + /** @description The credit note's memo appears on the credit note PDF. */ + memo?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** + * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + * @enum {string} + */ + reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' + /** @description ID of an existing refund to link this credit note to. */ + refund?: string + /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + } + } + } + } + /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetCreditNotesCreditNoteLines: { + parameters: { + path: { + credit_note: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the credit note object with the given identifier.

*/ + GetCreditNotesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['credit_note'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing credit note.

*/ + PostCreditNotesId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['credit_note'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Credit note memo. */ + memo?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ + PostCreditNotesIdVoid: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['credit_note'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Get a preview of a credit note without creating it.

*/ + GetCreditNotesPreview: { + parameters: { + query: { + /** The integer amount in %s representing the total amount of the credit note. */ + amount?: number + /** The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** ID of the invoice. */ + invoice: string + /** Line items that make up the credit note. */ + lines?: { + amount?: number + description?: string + invoice_line_item?: string + quantity?: number + tax_rates?: string[] | '' + /** @enum {string} */ + type: 'custom_line_item' | 'invoice_line_item' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + }[] + /** The credit note's memo appears on the credit note PDF. */ + memo?: string + /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' + /** ID of an existing refund to link this credit note to. */ + refund?: string + /** The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['credit_note'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ + GetCreditNotesPreviewLines: { + parameters: { + query: { + /** The integer amount in %s representing the total amount of the credit note. */ + amount?: number + /** The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + credit_amount?: number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** ID of the invoice. */ + invoice: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Line items that make up the credit note. */ + lines?: { + amount?: number + description?: string + invoice_line_item?: string + quantity?: number + tax_rates?: string[] | '' + /** @enum {string} */ + type: 'custom_line_item' | 'invoice_line_item' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + }[] + /** The credit note's memo appears on the credit note PDF. */ + memo?: string + /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + out_of_band_amount?: number + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' + /** ID of an existing refund to link this credit note to. */ + refund?: string + /** The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + refund_amount?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['credit_note_line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ + GetCustomers: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. */ + email?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['customer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new customer object.

*/ + PostCustomers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The customer's address. */ + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number + coupon?: string + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: + | { + name: string + value: string + }[] + | '' + default_payment_method?: string + footer?: string + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The customer's full name or business name. */ + name?: string + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number + payment_method?: string + /** @description The customer's phone number. */ + phone?: string + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[] + /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ + promotion_code?: string + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' + source?: string + /** + * tax_param + * @description Tax details about the customer. + */ + tax?: { + ip_address?: string | '' + } + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + /** @description The customer's tax IDs. */ + tax_id_data?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] + } + } + } + } + /**

Retrieves a Customer object.

*/ + GetCustomersCustomer: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer'] | components['schemas']['deleted_customer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

+ * + *

This request accepts mostly the same arguments as the customer creation call.

+ */ + PostCustomersCustomer: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The customer's address. */ + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + balance?: number + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + cvc?: string + exp_month: number + exp_year: number + metadata?: { [key: string]: string } + name?: string + number: string + /** @enum {string} */ + object?: 'card' + } + | string + coupon?: string + /** @description ID of Alipay account to make the customer's new default for invoice payments. */ + default_alipay_account?: string + /** @description ID of bank account to make the customer's new default for invoice payments. */ + default_bank_account?: string + /** @description ID of card to make the customer's new default for invoice payments. */ + default_card?: string + /** + * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + * + * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + * + * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + */ + default_source?: string + /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string + /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string + /** + * customer_param + * @description Default invoice settings for this customer. + */ + invoice_settings?: { + custom_fields?: + | { + name: string + value: string + }[] + | '' + default_payment_method?: string + footer?: string + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The customer's full name or business name. */ + name?: string + /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number + /** @description The customer's phone number. */ + phone?: string + /** @description Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[] + /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ + promotion_code?: string + /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' + source?: string + /** + * tax_param + * @description Tax details about the customer. + */ + tax?: { + ip_address?: string | '' + } + /** + * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + } + } + } + } + /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ + DeleteCustomersCustomer: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_customer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of transactions that updated the customer’s balances.

*/ + GetCustomersCustomerBalanceTransactions: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['customer_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an immutable transaction that updates the customer’s credit balance.

*/ + PostCustomersCustomerBalanceTransactions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a specific customer balance transaction that updated the customer’s balances.

*/ + GetCustomersCustomerBalanceTransactionsTransaction: { + parameters: { + path: { + customer: string + transaction: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Most credit balance transaction fields are immutable, but you may update its description and metadata.

*/ + PostCustomersCustomerBalanceTransactionsTransaction: { + parameters: { + path: { + customer: string + transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ + GetCustomersCustomerBankAccounts: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['bank_account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerBankAccounts: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + cvc?: string + exp_month: number + exp_year: number + metadata?: { [key: string]: string } + name?: string + number: string + /** @enum {string} */ + object?: 'card' + } + | string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + } + /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ + GetCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['bank_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerBankAccountsIdVerify: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['bank_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

You can see a list of the cards belonging to a customer. + * Note that the 10 most recent sources are always available on the Customer object. + * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

+ */ + GetCustomersCustomerCards: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerCards: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + cvc?: string + exp_month: number + exp_year: number + metadata?: { [key: string]: string } + name?: string + number: string + /** @enum {string} */ + object?: 'card' + } + | string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + } + /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ + GetCustomersCustomerCardsId: { + parameters: { + path: { + customer: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerCardsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerCardsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetCustomersCustomerPaymentMethods: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: ( + | components['schemas']['alipay_account'] + | components['schemas']['bank_account'] + | components['schemas']['bitcoin_receiver'] + | components['schemas']['card'] + | components['schemas']['source'] + )[] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

When you create a new credit card, you must specify a customer or recipient on which to create it.

+ * + *

If the card’s owner has no default card, then the new card will become the default. + * However, if the owner already has a default, then it will not change. + * To change the default, you should update the customer to have a new default_source.

+ */ + PostCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ + alipay_account?: string + /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ + bank_account?: + | { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + country: string + currency?: string + /** @enum {string} */ + object?: 'bank_account' + routing_number?: string + } + | string + /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + cvc?: string + exp_month: number + exp_year: number + metadata?: { [key: string]: string } + name?: string + number: string + /** @enum {string} */ + object?: 'card' + } + | string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string + } + } + } + } + /**

Retrieve a specified source for a given customer.

*/ + GetCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name?: string + /** + * @description The type of entity that holds the account. This can be either `individual` or `company`. + * @enum {string} + */ + account_holder_type?: 'company' | 'individual' + /** @description City/District/Suburb/Town/Village. */ + address_city?: string + /** @description Billing address country, if provided when creating card. */ + address_country?: string + /** @description Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string + /** @description Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string + /** @description State/County/Province/Region. */ + address_state?: string + /** @description ZIP or postal code. */ + address_zip?: string + /** @description Two digit number representing the card’s expiration month. */ + exp_month?: string + /** @description Four digit number representing the card’s expiration year. */ + exp_year?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Cardholder name. */ + name?: string + /** owner */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + } + } + } + } + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerSourcesIdVerify: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['bank_account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ + GetCustomersCustomerSubscriptions: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new subscription on an existing customer.

*/ + PostCustomersCustomerSubscriptions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. + */ + automatic_tax?: { + enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number + } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } + } + } + } + /** + *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteCustomersCustomerSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + } + GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + customer: string + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of tax IDs for a customer.

*/ + GetCustomersCustomerTaxIds: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['tax_id'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new TaxID object for a customer.

*/ + PostCustomersCustomerTaxIds: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_id'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + /** @description Value of the tax ID. */ + value: string + } + } + } + } + /**

Retrieves the TaxID object with the given identifier.

*/ + GetCustomersCustomerTaxIdsId: { + parameters: { + path: { + customer: string + id: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_id'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Deletes an existing TaxID object.

*/ + DeleteCustomersCustomerTaxIdsId: { + parameters: { + path: { + customer: string + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_tax_id'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your disputes.

*/ + GetDisputes: { + parameters: { + query: { + /** Only return disputes associated to the charge specified by this charge ID. */ + charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['dispute'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the dispute with the given ID.

*/ + GetDisputesDispute: { + parameters: { + path: { + dispute: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

+ * + *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

+ */ + PostDisputesDispute: { + parameters: { + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * dispute_evidence_params + * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + */ + evidence?: { + access_activity_log?: string + billing_address?: string + cancellation_policy?: string + cancellation_policy_disclosure?: string + cancellation_rebuttal?: string + customer_communication?: string + customer_email_address?: string + customer_name?: string + customer_purchase_ip?: string + customer_signature?: string + duplicate_charge_documentation?: string + duplicate_charge_explanation?: string + duplicate_charge_id?: string + product_description?: string + receipt?: string + refund_policy?: string + refund_policy_disclosure?: string + refund_refusal_explanation?: string + service_date?: string + service_documentation?: string + shipping_address?: string + shipping_carrier?: string + shipping_date?: string + shipping_documentation?: string + shipping_tracking_number?: string + uncategorized_file?: string + uncategorized_text?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ + submit?: boolean + } + } + } + } + /** + *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

+ * + *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

+ */ + PostDisputesDisputeClose: { + parameters: { + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Creates a short-lived API key for a given resource.

*/ + PostEphemeralKeys: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['ephemeral_key'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ + issuing_card?: string + } + } + } + } + /**

Invalidates a short-lived API key for a given resource.

*/ + DeleteEphemeralKeysKey: { + parameters: { + path: { + key: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['ephemeral_key'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ + GetEvents: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ + delivery_success?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ + type?: string + /** An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ + types?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['event'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ + GetEventsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['event'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ + GetExchangeRates: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['exchange_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ + GetExchangeRatesRateId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + rate_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['exchange_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of file links.

*/ + GetFileLinks: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Filter links by their expiration status. By default, all links are returned. */ + expired?: boolean + /** Only return links for the given file. */ + file?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['file_link'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new file link object.

*/ + PostFileLinks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['file_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp after which the link will no longer be usable. + */ + expires_at?: number + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + file: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves the file link with the given ID.

*/ + GetFileLinksLink: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + link: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['file_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing file link object. Expired links can no longer be updated.

*/ + PostFileLinksLink: { + parameters: { + path: { + link: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['file_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ + expires_at?: 'now' | number | '' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ + GetFiles: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The file purpose to filter queries by. If none is provided, files will not be filtered by purpose. */ + purpose?: + | 'account_requirement' + | 'additional_verification' + | 'business_icon' + | 'business_logo' + | 'customer_signature' + | 'dispute_evidence' + | 'document_provider_identity_document' + | 'finance_report_run' + | 'identity_document' + | 'identity_document_downloadable' + | 'pci_document' + | 'selfie' + | 'sigma_scheduled_query' + | 'tax_document_user_upload' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['file'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

+ * + *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

+ */ + PostFiles: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['file'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'multipart/form-data': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ + file: string + /** + * file_link_creation_params + * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + */ + file_link_data?: { + create: boolean + /** Format: unix-time */ + expires_at?: number + metadata?: { [key: string]: string } | '' + } + /** + * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + * @enum {string} + */ + purpose: + | 'account_requirement' + | 'additional_verification' + | 'business_icon' + | 'business_logo' + | 'customer_signature' + | 'dispute_evidence' + | 'identity_document' + | 'pci_document' + | 'tax_document_user_upload' + } + } + } + } + /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ + GetFilesFile: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + file: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['file'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List all verification reports.

*/ + GetIdentityVerificationReports: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return VerificationReports of this type */ + type?: 'document' | 'id_number' + /** Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. */ + verification_session?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['identity.verification_report'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves an existing VerificationReport

*/ + GetIdentityVerificationReportsReport: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_report'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of VerificationSessions

*/ + GetIdentityVerificationSessions: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ + status?: 'canceled' | 'processing' | 'requires_input' | 'verified' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['identity.verification_session'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a VerificationSession object.

+ * + *

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

+ * + *

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

+ * + *

Related guide: Verify your users’ identity documents.

+ */ + PostIdentityVerificationSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * session_options_param + * @description A set of options for the session’s verification checks. + */ + options?: { + document?: + | { + allowed_types?: ('driving_license' | 'id_card' | 'passport')[] + require_id_number?: boolean + require_live_capture?: boolean + require_matching_selfie?: boolean + } + | '' + } + /** @description The URL that the user will be redirected to upon completing the verification flow. */ + return_url?: string + /** + * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + * @enum {string} + */ + type: 'document' | 'id_number' + } + } + } + } + /** + *

Retrieves the details of a VerificationSession that was previously created.

+ * + *

When the session status is requires_input, you can use this method to retrieve a valid + * client_secret or url to allow re-submission.

+ */ + GetIdentityVerificationSessionsSession: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates a VerificationSession object.

+ * + *

When the session status is requires_input, you can use this method to update the + * verification check and options.

+ */ + PostIdentityVerificationSessionsSession: { + parameters: { + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * session_options_param + * @description A set of options for the session’s verification checks. + */ + options?: { + document?: + | { + allowed_types?: ('driving_license' | 'id_card' | 'passport')[] + require_id_number?: boolean + require_live_capture?: boolean + require_matching_selfie?: boolean + } + | '' + } + /** + * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + * @enum {string} + */ + type?: 'document' | 'id_number' + } + } + } + } + /** + *

A VerificationSession object can be canceled when it is in requires_input status.

+ * + *

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

+ */ + PostIdentityVerificationSessionsSessionCancel: { + parameters: { + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Redact a VerificationSession to remove all collected information from Stripe. This will redact + * the VerificationSession and all objects related to it, including VerificationReports, Events, + * request logs, etc.

+ * + *

A VerificationSession object can be redacted when it is in requires_input or verified + * status. Redacting a VerificationSession in requires_action + * state will automatically cancel it.

+ * + *

The redaction process may take up to four days. When the redaction process is in progress, the + * VerificationSession’s redaction.status field will be set to processing; when the process is + * finished, it will change to redacted and an identity.verification_session.redacted event + * will be emitted.

+ * + *

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + * fields that contain personal data will be replaced by the string [redacted] or a similar + * placeholder. The metadata field will also be erased. Redacted objects cannot be updated or + * used for any purpose.

+ * + *

Learn more.

+ */ + PostIdentityVerificationSessionsSessionRedact: { + parameters: { + path: { + session: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['identity.verification_session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ + GetInvoiceitems: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. */ + invoice?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. */ + pending?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoiceitem'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ + PostInvoiceitems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoiceitem'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The ID of the customer who will be billed when this invoice item is billed. */ + customer: string + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ + discountable?: boolean + /** @description The coupons to redeem into discounts for the invoice item or invoice line item. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. */ + invoice?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * period + * @description The period associated with this invoice item. + */ + period?: { + /** Format: unix-time */ + end: number + /** Format: unix-time */ + start: number + } + /** @description The ID of the price object. */ + price?: string + /** + * one_time_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number + /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ + subscription?: string + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ + tax_rates?: string[] + /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string + } + } + } + } + /**

Retrieves the invoice item with the given ID.

*/ + GetInvoiceitemsInvoiceitem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + invoiceitem: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoiceitem'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ + PostInvoiceitemsInvoiceitem: { + parameters: { + path: { + invoiceitem: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoiceitem'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + amount?: number + /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string + /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ + discountable?: boolean + /** @description The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * period + * @description The period associated with this invoice item. + */ + period?: { + /** Format: unix-time */ + end: number + /** Format: unix-time */ + start: number + } + /** @description The ID of the price object. */ + price?: string + /** + * one_time_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** @description Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number + /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string + } + } + } + } + /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ + DeleteInvoiceitemsInvoiceitem: { + parameters: { + path: { + invoiceitem: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_invoiceitem'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ + GetInvoices: { + parameters: { + query: { + /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return invoices for the customer specified by this customer ID. */ + customer?: string + due_date?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) */ + status?: 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' + /** Only return invoices for the subscription specified by this subscription ID. */ + subscription?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoice'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + PostInvoices: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ + account_tax_ids?: string[] | '' + /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + application_fee_amount?: number + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this invoice. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description A list of up to 4 custom fields to be displayed on the invoice. */ + custom_fields?: + | { + name: string + value: string + }[] + | '' + /** @description The ID of the customer who will be billed. */ + customer: string + /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string + /** @description The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** + * Format: unix-time + * @description The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + */ + due_date?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Footer to be displayed on the invoice. */ + footer?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ + on_behalf_of?: string + /** + * payment_settings + * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ + statement_descriptor?: string + /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + subscription?: string + /** + * transfer_data_specs + * @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + */ + transfer_data?: { + amount?: number + destination: string + } + } + } + } + } + /**

Retrieves the invoice with the given ID.

*/ + GetInvoicesInvoice: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Draft invoices are fully editable. Once an invoice is finalized, + * monetary values, as well as collection_method, become uneditable.

+ * + *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + * sending reminders for, or automatically reconciling invoices, pass + * auto_advance=false.

+ */ + PostInvoicesInvoice: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ + account_tax_ids?: string[] | '' + /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + application_fee_amount?: number + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ + auto_advance?: boolean + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this invoice. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ + custom_fields?: + | { + name: string + value: string + }[] + | '' + /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ + days_until_due?: number + /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ + default_payment_method?: string + /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ + default_source?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string + /** @description The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** + * Format: unix-time + * @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + */ + due_date?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Footer to be displayed on the invoice. */ + footer?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ + on_behalf_of?: string | '' + /** + * payment_settings + * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ + statement_descriptor?: string + /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount?: number + destination: string + } + | '' + } + } + } + } + /**

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

*/ + DeleteInvoicesInvoice: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ + PostInvoicesInvoiceFinalize: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ + auto_advance?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetInvoicesInvoiceLines: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ + PostInvoicesInvoiceMarkUncollectible: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ + PostInvoicesInvoicePay: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + * + * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + */ + forgive?: boolean + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ + off_session?: boolean + /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ + paid_out_of_band?: boolean + /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ + payment_method?: string + /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ + source?: string + } + } + } + } + /** + *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

+ * + *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

+ */ + PostInvoicesInvoiceSend: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ + PostInvoicesInvoiceVoid: { + parameters: { + path: { + invoice: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

+ * + *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

+ * + *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

+ */ + GetInvoicesUpcoming: { + parameters: { + query: { + /** Settings for automatic tax lookup for this invoice preview. */ + automatic_tax?: { + enabled: boolean + } + /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ + coupon?: string + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ + customer?: string + /** Details about the customer you want to invoice or overrides for an existing customer. */ + customer_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' + /** tax_param */ + tax?: { + ip_address?: string | '' + } + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] + } + /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** List of invoice items to add or update in the upcoming invoice preview. */ + invoice_items?: { + amount?: number + currency?: string + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + invoiceitem?: string + metadata?: { [key: string]: string } | '' + /** period */ + period?: { + /** Format: unix-time */ + end: number + /** Format: unix-time */ + start: number + } + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + }[] + /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule?: string + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription?: string + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ + subscription_billing_cycle_anchor?: ('now' | 'unchanged') | number + /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ + subscription_cancel_at?: number | '' + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + subscription_cancel_at_period_end?: boolean + /** This simulates the subscription being canceled or expired immediately. */ + subscription_cancel_now?: boolean + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ + subscription_default_tax_rates?: string[] | '' + /** A list of up to 20 subscription items, each with an attached price. */ + subscription_items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + */ + subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ + subscription_proration_date?: number + /** Date a subscription is intended to start (can be future or past) */ + subscription_start_date?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ + subscription_trial_end?: 'now' | number + /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + subscription_trial_from_plan?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['invoice'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetInvoicesUpcomingLines: { + parameters: { + query: { + /** Settings for automatic tax lookup for this invoice preview. */ + automatic_tax?: { + enabled: boolean + } + /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ + coupon?: string + /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ + customer?: string + /** Details about the customer you want to invoice or overrides for an existing customer. */ + customer_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' + /** tax_param */ + tax?: { + ip_address?: string | '' + } + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] + } + /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** List of invoice items to add or update in the upcoming invoice preview. */ + invoice_items?: { + amount?: number + currency?: string + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + invoiceitem?: string + metadata?: { [key: string]: string } | '' + /** period */ + period?: { + /** Format: unix-time */ + end: number + /** Format: unix-time */ + start: number + } + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + }[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ + schedule?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ + subscription?: string + /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ + subscription_billing_cycle_anchor?: ('now' | 'unchanged') | number + /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ + subscription_cancel_at?: number | '' + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + subscription_cancel_at_period_end?: boolean + /** This simulates the subscription being canceled or expired immediately. */ + subscription_cancel_now?: boolean + /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ + subscription_default_tax_rates?: string[] | '' + /** A list of up to 20 subscription items, each with an attached price. */ + subscription_items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + */ + subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ + subscription_proration_date?: number + /** Date a subscription is intended to start (can be future or past) */ + subscription_start_date?: number + /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ + subscription_trial_end?: 'now' | number + /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + subscription_trial_from_plan?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['line_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of issuer fraud records.

*/ + GetIssuerFraudRecords: { + parameters: { + query: { + /** Only return issuer fraud records for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuer_fraud_record'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieves the details of an issuer fraud record that has previously been created.

+ * + *

Please refer to the issuer fraud record object reference for more details.

+ */ + GetIssuerFraudRecordsIssuerFraudRecord: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + issuer_fraud_record: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuer_fraud_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingAuthorizations: { + parameters: { + query: { + /** Only return authorizations that belong to the given card. */ + card?: string + /** Only return authorizations that belong to the given cardholder. */ + cardholder?: string + /** Only return authorizations that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. */ + status?: 'closed' | 'pending' | 'reversed' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.authorization'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves an Issuing Authorization object.

*/ + GetIssuingAuthorizationsAuthorization: { + parameters: { + path: { + authorization: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.authorization'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingAuthorizationsAuthorization: { + parameters: { + path: { + authorization: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.authorization'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ + PostIssuingAuthorizationsAuthorizationApprove: { + parameters: { + path: { + authorization: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.authorization'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ + PostIssuingAuthorizationsAuthorizationDecline: { + parameters: { + path: { + authorization: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.authorization'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingCardholders: { + parameters: { + query: { + /** Only return cardholders that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return cardholders that have the given email address. */ + email?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return cardholders that have the given phone number. */ + phone_number?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. */ + status?: 'active' | 'blocked' | 'inactive' + /** Only return cardholders that have the given type. One of `individual` or `company`. */ + type?: 'company' | 'individual' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.cardholder'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ + PostIssuingCardholders: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.cardholder'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + } + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string + } + /** @description The cardholder's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number + month: number + year: number + } + first_name: string + last_name: string + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + name: string + /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ + phone_number?: string + /** + * authorization_controls_param_v2 + * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + spending_limits_currency?: string + } + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + * @enum {string} + */ + status?: 'active' | 'inactive' + /** + * @description One of `individual` or `company`. + * @enum {string} + */ + type: 'company' | 'individual' + } + } + } + } + /**

Retrieves an Issuing Cardholder object.

*/ + GetIssuingCardholdersCardholder: { + parameters: { + path: { + cardholder: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.cardholder'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingCardholdersCardholder: { + parameters: { + path: { + cardholder: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.cardholder'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * billing_specs + * @description The cardholder's billing address. + */ + billing?: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + } + /** + * company_param + * @description Additional information about a `company` cardholder. + */ + company?: { + tax_id?: string + } + /** @description The cardholder's email address. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * individual_param + * @description Additional information about an `individual` cardholder. + */ + individual?: { + /** date_of_birth_specs */ + dob?: { + day: number + month: number + year: number + } + first_name: string + last_name: string + /** person_verification_param */ + verification?: { + /** person_verification_document_param */ + document?: { + back?: string + front?: string + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. */ + phone_number?: string + /** + * authorization_controls_param_v2 + * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + spending_limits_currency?: string + } + /** + * @description Specifies whether to permit authorizations on this cardholder's cards. + * @enum {string} + */ + status?: 'active' | 'inactive' + } + } + } + } + /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingCards: { + parameters: { + query: { + /** Only return cards belonging to the Cardholder with the provided ID. */ + cardholder?: string + /** Only return cards that were issued during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Only return cards that have the given expiration month. */ + exp_month?: number + /** Only return cards that have the given expiration year. */ + exp_year?: number + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return cards that have the given last four digits. */ + last4?: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ + status?: 'active' | 'canceled' | 'inactive' + /** Only return cards that have the given type. One of `virtual` or `physical`. */ + type?: 'physical' | 'virtual' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.card'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an Issuing Card object.

*/ + PostIssuingCards: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ + cardholder?: string + /** @description The currency for the card. */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The card this is meant to be a replacement for (if any). */ + replacement_for?: string + /** + * @description If `replacement_for` is specified, this should indicate why that card is being replaced. + * @enum {string} + */ + replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' + /** + * shipping_specs + * @description The address where the card will be shipped. + */ + shipping?: { + /** required_address */ + address: { + city: string + country: string + line1: string + line2?: string + postal_code: string + state?: string + } + name: string + /** @enum {string} */ + service?: 'express' | 'priority' | 'standard' + /** @enum {string} */ + type?: 'bulk' | 'individual' + } + /** + * authorization_controls_param + * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + } + /** + * @description Whether authorizations can be approved on this card. Defaults to `inactive`. + * @enum {string} + */ + status?: 'active' | 'inactive' + /** + * @description The type of card to issue. Possible values are `physical` or `virtual`. + * @enum {string} + */ + type: 'physical' | 'virtual' + } + } + } + } + /**

Retrieves an Issuing Card object.

*/ + GetIssuingCardsCard: { + parameters: { + path: { + card: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingCardsCard: { + parameters: { + path: { + card: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason why the `status` of this card is `canceled`. + * @enum {string} + */ + cancellation_reason?: 'lost' | 'stolen' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * encrypted_pin_param + * @description The desired new PIN for this card. + */ + pin?: { + encrypted_number?: string + } + /** + * authorization_controls_param + * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + */ + spending_controls?: { + allowed_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + blocked_categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + spending_limits?: { + amount: number + categories?: ( + | 'ac_refrigeration_repair' + | 'accounting_bookkeeping_services' + | 'advertising_services' + | 'agricultural_cooperative' + | 'airlines_air_carriers' + | 'airports_flying_fields' + | 'ambulance_services' + | 'amusement_parks_carnivals' + | 'antique_reproductions' + | 'antique_shops' + | 'aquariums' + | 'architectural_surveying_services' + | 'art_dealers_and_galleries' + | 'artists_supply_and_craft_shops' + | 'auto_and_home_supply_stores' + | 'auto_body_repair_shops' + | 'auto_paint_shops' + | 'auto_service_shops' + | 'automated_cash_disburse' + | 'automated_fuel_dispensers' + | 'automobile_associations' + | 'automotive_parts_and_accessories_stores' + | 'automotive_tire_stores' + | 'bail_and_bond_payments' + | 'bakeries' + | 'bands_orchestras' + | 'barber_and_beauty_shops' + | 'betting_casino_gambling' + | 'bicycle_shops' + | 'billiard_pool_establishments' + | 'boat_dealers' + | 'boat_rentals_and_leases' + | 'book_stores' + | 'books_periodicals_and_newspapers' + | 'bowling_alleys' + | 'bus_lines' + | 'business_secretarial_schools' + | 'buying_shopping_services' + | 'cable_satellite_and_other_pay_television_and_radio' + | 'camera_and_photographic_supply_stores' + | 'candy_nut_and_confectionery_stores' + | 'car_and_truck_dealers_new_used' + | 'car_and_truck_dealers_used_only' + | 'car_rental_agencies' + | 'car_washes' + | 'carpentry_services' + | 'carpet_upholstery_cleaning' + | 'caterers' + | 'charitable_and_social_service_organizations_fundraising' + | 'chemicals_and_allied_products' + | 'child_care_services' + | 'childrens_and_infants_wear_stores' + | 'chiropodists_podiatrists' + | 'chiropractors' + | 'cigar_stores_and_stands' + | 'civic_social_fraternal_associations' + | 'cleaning_and_maintenance' + | 'clothing_rental' + | 'colleges_universities' + | 'commercial_equipment' + | 'commercial_footwear' + | 'commercial_photography_art_and_graphics' + | 'commuter_transport_and_ferries' + | 'computer_network_services' + | 'computer_programming' + | 'computer_repair' + | 'computer_software_stores' + | 'computers_peripherals_and_software' + | 'concrete_work_services' + | 'construction_materials' + | 'consulting_public_relations' + | 'correspondence_schools' + | 'cosmetic_stores' + | 'counseling_services' + | 'country_clubs' + | 'courier_services' + | 'court_costs' + | 'credit_reporting_agencies' + | 'cruise_lines' + | 'dairy_products_stores' + | 'dance_hall_studios_schools' + | 'dating_escort_services' + | 'dentists_orthodontists' + | 'department_stores' + | 'detective_agencies' + | 'digital_goods_applications' + | 'digital_goods_games' + | 'digital_goods_large_volume' + | 'digital_goods_media' + | 'direct_marketing_catalog_merchant' + | 'direct_marketing_combination_catalog_and_retail_merchant' + | 'direct_marketing_inbound_telemarketing' + | 'direct_marketing_insurance_services' + | 'direct_marketing_other' + | 'direct_marketing_outbound_telemarketing' + | 'direct_marketing_subscription' + | 'direct_marketing_travel' + | 'discount_stores' + | 'doctors' + | 'door_to_door_sales' + | 'drapery_window_covering_and_upholstery_stores' + | 'drinking_places' + | 'drug_stores_and_pharmacies' + | 'drugs_drug_proprietaries_and_druggist_sundries' + | 'dry_cleaners' + | 'durable_goods' + | 'duty_free_stores' + | 'eating_places_restaurants' + | 'educational_services' + | 'electric_razor_stores' + | 'electrical_parts_and_equipment' + | 'electrical_services' + | 'electronics_repair_shops' + | 'electronics_stores' + | 'elementary_secondary_schools' + | 'employment_temp_agencies' + | 'equipment_rental' + | 'exterminating_services' + | 'family_clothing_stores' + | 'fast_food_restaurants' + | 'financial_institutions' + | 'fines_government_administrative_entities' + | 'fireplace_fireplace_screens_and_accessories_stores' + | 'floor_covering_stores' + | 'florists' + | 'florists_supplies_nursery_stock_and_flowers' + | 'freezer_and_locker_meat_provisioners' + | 'fuel_dealers_non_automotive' + | 'funeral_services_crematories' + | 'furniture_home_furnishings_and_equipment_stores_except_appliances' + | 'furniture_repair_refinishing' + | 'furriers_and_fur_shops' + | 'general_services' + | 'gift_card_novelty_and_souvenir_shops' + | 'glass_paint_and_wallpaper_stores' + | 'glassware_crystal_stores' + | 'golf_courses_public' + | 'government_services' + | 'grocery_stores_supermarkets' + | 'hardware_equipment_and_supplies' + | 'hardware_stores' + | 'health_and_beauty_spas' + | 'hearing_aids_sales_and_supplies' + | 'heating_plumbing_a_c' + | 'hobby_toy_and_game_shops' + | 'home_supply_warehouse_stores' + | 'hospitals' + | 'hotels_motels_and_resorts' + | 'household_appliance_stores' + | 'industrial_supplies' + | 'information_retrieval_services' + | 'insurance_default' + | 'insurance_underwriting_premiums' + | 'intra_company_purchases' + | 'jewelry_stores_watches_clocks_and_silverware_stores' + | 'landscaping_services' + | 'laundries' + | 'laundry_cleaning_services' + | 'legal_services_attorneys' + | 'luggage_and_leather_goods_stores' + | 'lumber_building_materials_stores' + | 'manual_cash_disburse' + | 'marinas_service_and_supplies' + | 'masonry_stonework_and_plaster' + | 'massage_parlors' + | 'medical_and_dental_labs' + | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' + | 'medical_services' + | 'membership_organizations' + | 'mens_and_boys_clothing_and_accessories_stores' + | 'mens_womens_clothing_stores' + | 'metal_service_centers' + | 'miscellaneous' + | 'miscellaneous_apparel_and_accessory_shops' + | 'miscellaneous_auto_dealers' + | 'miscellaneous_business_services' + | 'miscellaneous_food_stores' + | 'miscellaneous_general_merchandise' + | 'miscellaneous_general_services' + | 'miscellaneous_home_furnishing_specialty_stores' + | 'miscellaneous_publishing_and_printing' + | 'miscellaneous_recreation_services' + | 'miscellaneous_repair_shops' + | 'miscellaneous_specialty_retail' + | 'mobile_home_dealers' + | 'motion_picture_theaters' + | 'motor_freight_carriers_and_trucking' + | 'motor_homes_dealers' + | 'motor_vehicle_supplies_and_new_parts' + | 'motorcycle_shops_and_dealers' + | 'motorcycle_shops_dealers' + | 'music_stores_musical_instruments_pianos_and_sheet_music' + | 'news_dealers_and_newsstands' + | 'non_fi_money_orders' + | 'non_fi_stored_value_card_purchase_load' + | 'nondurable_goods' + | 'nurseries_lawn_and_garden_supply_stores' + | 'nursing_personal_care' + | 'office_and_commercial_furniture' + | 'opticians_eyeglasses' + | 'optometrists_ophthalmologist' + | 'orthopedic_goods_prosthetic_devices' + | 'osteopaths' + | 'package_stores_beer_wine_and_liquor' + | 'paints_varnishes_and_supplies' + | 'parking_lots_garages' + | 'passenger_railways' + | 'pawn_shops' + | 'pet_shops_pet_food_and_supplies' + | 'petroleum_and_petroleum_products' + | 'photo_developing' + | 'photographic_photocopy_microfilm_equipment_and_supplies' + | 'photographic_studios' + | 'picture_video_production' + | 'piece_goods_notions_and_other_dry_goods' + | 'plumbing_heating_equipment_and_supplies' + | 'political_organizations' + | 'postal_services_government_only' + | 'precious_stones_and_metals_watches_and_jewelry' + | 'professional_services' + | 'public_warehousing_and_storage' + | 'quick_copy_repro_and_blueprint' + | 'railroads' + | 'real_estate_agents_and_managers_rentals' + | 'record_stores' + | 'recreational_vehicle_rentals' + | 'religious_goods_stores' + | 'religious_organizations' + | 'roofing_siding_sheet_metal' + | 'secretarial_support_services' + | 'security_brokers_dealers' + | 'service_stations' + | 'sewing_needlework_fabric_and_piece_goods_stores' + | 'shoe_repair_hat_cleaning' + | 'shoe_stores' + | 'small_appliance_repair' + | 'snowmobile_dealers' + | 'special_trade_services' + | 'specialty_cleaning' + | 'sporting_goods_stores' + | 'sporting_recreation_camps' + | 'sports_and_riding_apparel_stores' + | 'sports_clubs_fields' + | 'stamp_and_coin_stores' + | 'stationary_office_supplies_printing_and_writing_paper' + | 'stationery_stores_office_and_school_supply_stores' + | 'swimming_pools_sales' + | 't_ui_travel_germany' + | 'tailors_alterations' + | 'tax_payments_government_agencies' + | 'tax_preparation_services' + | 'taxicabs_limousines' + | 'telecommunication_equipment_and_telephone_sales' + | 'telecommunication_services' + | 'telegraph_services' + | 'tent_and_awning_shops' + | 'testing_laboratories' + | 'theatrical_ticket_agencies' + | 'timeshares' + | 'tire_retreading_and_repair' + | 'tolls_bridge_fees' + | 'tourist_attractions_and_exhibits' + | 'towing_services' + | 'trailer_parks_campgrounds' + | 'transportation_services' + | 'travel_agencies_tour_operators' + | 'truck_stop_iteration' + | 'truck_utility_trailer_rentals' + | 'typesetting_plate_making_and_related_services' + | 'typewriter_stores' + | 'u_s_federal_government_agencies_or_departments' + | 'uniforms_commercial_clothing' + | 'used_merchandise_and_secondhand_stores' + | 'utilities' + | 'variety_stores' + | 'veterinary_services' + | 'video_amusement_game_supplies' + | 'video_game_arcades' + | 'video_tape_rental_stores' + | 'vocational_trade_schools' + | 'watch_jewelry_repair' + | 'welding_repair' + | 'wholesale_clubs' + | 'wig_and_toupee_stores' + | 'wires_money_orders' + | 'womens_accessory_and_specialty_shops' + | 'womens_ready_to_wear_stores' + | 'wrecking_and_salvage_yards' + )[] + /** @enum {string} */ + interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' + }[] + } + /** + * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + * @enum {string} + */ + status?: 'active' | 'canceled' | 'inactive' + } + } + } + } + /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingDisputes: { + parameters: { + query: { + /** Select Issuing disputes that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Select Issuing disputes with the given status. */ + status?: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' + /** Select the Issuing dispute for the given transaction. */ + transaction?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.dispute'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

*/ + PostIssuingDisputes: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * evidence_param + * @description Evidence provided for the dispute. + */ + evidence?: { + canceled?: + | { + additional_documentation?: string | '' + canceled_at?: number | '' + cancellation_policy_provided?: boolean | '' + cancellation_reason?: string + expected_at?: number | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + /** @enum {string} */ + return_status?: '' | 'merchant_rejected' | 'successful' + returned_at?: number | '' + } + | '' + duplicate?: + | { + additional_documentation?: string | '' + card_statement?: string | '' + cash_receipt?: string | '' + check_image?: string | '' + explanation?: string + original_transaction?: string + } + | '' + fraudulent?: + | { + additional_documentation?: string | '' + explanation?: string + } + | '' + merchandise_not_as_described?: + | { + additional_documentation?: string | '' + explanation?: string + received_at?: number | '' + return_description?: string + /** @enum {string} */ + return_status?: '' | 'merchant_rejected' | 'successful' + returned_at?: number | '' + } + | '' + not_received?: + | { + additional_documentation?: string | '' + expected_at?: number | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + } + | '' + other?: + | { + additional_documentation?: string | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + } + | '' + /** @enum {string} */ + reason?: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' + service_not_as_described?: + | { + additional_documentation?: string | '' + canceled_at?: number | '' + cancellation_reason?: string + explanation?: string + received_at?: number | '' + } + | '' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The ID of the issuing transaction to create a dispute for. */ + transaction: string + } + } + } + } + /**

Retrieves an Issuing Dispute object.

*/ + GetIssuingDisputesDispute: { + parameters: { + path: { + dispute: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

*/ + PostIssuingDisputesDispute: { + parameters: { + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * evidence_param + * @description Evidence provided for the dispute. + */ + evidence?: { + canceled?: + | { + additional_documentation?: string | '' + canceled_at?: number | '' + cancellation_policy_provided?: boolean | '' + cancellation_reason?: string + expected_at?: number | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + /** @enum {string} */ + return_status?: '' | 'merchant_rejected' | 'successful' + returned_at?: number | '' + } + | '' + duplicate?: + | { + additional_documentation?: string | '' + card_statement?: string | '' + cash_receipt?: string | '' + check_image?: string | '' + explanation?: string + original_transaction?: string + } + | '' + fraudulent?: + | { + additional_documentation?: string | '' + explanation?: string + } + | '' + merchandise_not_as_described?: + | { + additional_documentation?: string | '' + explanation?: string + received_at?: number | '' + return_description?: string + /** @enum {string} */ + return_status?: '' | 'merchant_rejected' | 'successful' + returned_at?: number | '' + } + | '' + not_received?: + | { + additional_documentation?: string | '' + expected_at?: number | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + } + | '' + other?: + | { + additional_documentation?: string | '' + explanation?: string + product_description?: string + /** @enum {string} */ + product_type?: '' | 'merchandise' | 'service' + } + | '' + /** @enum {string} */ + reason?: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' + service_not_as_described?: + | { + additional_documentation?: string | '' + canceled_at?: number | '' + cancellation_reason?: string + explanation?: string + received_at?: number | '' + } + | '' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

*/ + PostIssuingDisputesDisputeSubmit: { + parameters: { + path: { + dispute: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.dispute'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingSettlements: { + parameters: { + query: { + /** Only return issuing settlements that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.settlement'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves an Issuing Settlement object.

*/ + GetIssuingSettlementsSettlement: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + settlement: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.settlement'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingSettlementsSettlement: { + parameters: { + path: { + settlement: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.settlement'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetIssuingTransactions: { + parameters: { + query: { + /** Only return transactions that belong to the given card. */ + card?: string + /** Only return transactions that belong to the given cardholder. */ + cardholder?: string + /** Only return transactions that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return transactions that have the given type. One of `capture` or `refund`. */ + type?: 'capture' | 'refund' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['issuing.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves an Issuing Transaction object.

*/ + GetIssuingTransactionsTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostIssuingTransactionsTransaction: { + parameters: { + path: { + transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Mandate object.

*/ + GetMandatesMandate: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['mandate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ + GetOrderReturns: { + parameters: { + query: { + /** Date this return was created. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The order to retrieve returns for. */ + order?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['order_return'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ + GetOrderReturnsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order_return'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ + GetOrders: { + parameters: { + query: { + /** Date this order was created. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return orders for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return orders with the given IDs. */ + ids?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ + status?: string + /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ + status_transitions?: { + canceled?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + fulfilled?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + paid?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + returned?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + } + /** Only return orders with the given upstream order IDs. */ + upstream_ids?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['order'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new order object.

*/ + PostOrders: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ + customer?: string + /** @description The email address of the customer placing the order. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of items constituting the order. An order can have up to 25 items. */ + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * customer_shipping + * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + } + } + } + } + /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ + GetOrdersId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostOrdersId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ + coupon?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ + selected_shipping_method?: string + /** + * shipping_tracking_params + * @description Tracking information once the order has been fulfilled. + */ + shipping?: { + carrier: string + tracking_number: string + } + /** + * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). + * @enum {string} + */ + status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' + } + } + } + } + /**

Pay an order by providing a source to create a payment.

*/ + PostOrdersIdPay: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + application_fee?: number + /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ + customer?: string + /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ + source?: string + } + } + } + } + /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ + PostOrdersIdReturns: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order_return'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description List of items to return. */ + items?: + | { + amount?: number + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + | '' + } + } + } + } + /**

Returns a list of PaymentIntents.

*/ + GetPaymentIntents: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return PaymentIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a PaymentIntent object.

+ * + *

After the PaymentIntent is created, attach a payment method and confirm + * to continue the payment. You can read more about the different payment flows + * available via the Payment Intents API here.

+ * + *

When confirm=true is used during creation, it is equivalent to creating + * and confirming the PaymentIntent in the same call. You may use any parameters + * available in the confirm API when confirm=true + * is supplied.

+ */ + PostPaymentIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean + } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + mandate?: string + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + off_session?: boolean | ('one_off' | 'recurring') + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ + payment_method?: string + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + reference?: string + } + | '' + alipay?: { [key: string]: unknown } | '' + au_becs_debit?: { [key: string]: unknown } | '' + bacs_debit?: { [key: string]: unknown } | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + boleto?: + | { + expires_after_days?: number + } + | '' + card?: + | { + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card_present?: { [key: string]: unknown } | '' + eps?: { [key: string]: unknown } | '' + fpx?: { [key: string]: unknown } | '' + giropay?: { [key: string]: unknown } | '' + grabpay?: { [key: string]: unknown } | '' + ideal?: { [key: string]: unknown } | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-DE' + | 'en-AT' + | 'en-BE' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-FR' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'sv-FI' + | 'sv-SE' + } + | '' + oxxo?: + | { + expires_after_days?: number + } + | '' + p24?: + | { + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + } + | '' + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ + return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean + } + } + } + } + /** + *

Retrieves the details of a PaymentIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

+ */ + GetPaymentIntentsIntent: { + parameters: { + query: { + /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates properties on a PaymentIntent object without confirming.

+ * + *

Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the payment_method will + * always require you to confirm the PaymentIntent again. If you prefer to + * update and confirm at the same time, we recommend updating properties via + * the confirm API instead.

+ */ + PostPaymentIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | '' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + reference?: string + } + | '' + alipay?: { [key: string]: unknown } | '' + au_becs_debit?: { [key: string]: unknown } | '' + bacs_debit?: { [key: string]: unknown } | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + boleto?: + | { + expires_after_days?: number + } + | '' + card?: + | { + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card_present?: { [key: string]: unknown } | '' + eps?: { [key: string]: unknown } | '' + fpx?: { [key: string]: unknown } | '' + giropay?: { [key: string]: unknown } | '' + grabpay?: { [key: string]: unknown } | '' + ideal?: { [key: string]: unknown } | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-DE' + | 'en-AT' + | 'en-BE' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-FR' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'sv-FI' + | 'sv-SE' + } + | '' + oxxo?: + | { + expires_after_days?: number + } + | '' + p24?: + | { + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + } + | '' + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + | '' + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string + } + } + } + } + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ */ + PostPaymentIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

+ */ + PostPaymentIntentsIntentCapture: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } + } + } + } + } + /** + *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

+ * + *

If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the requires_action status and + * suggest additional actions via next_action. If payment fails, + * the PaymentIntent will transition to the requires_payment_method status. If + * payment succeeds, the PaymentIntent will transition to the succeeded + * status (or requires_capture, if capture_method is set to manual).

+ * + *

If the confirmation_method is automatic, payment may be attempted + * using our client SDKs + * and the PaymentIntent’s client_secret. + * After next_actions are handled by the client, no additional + * confirmation is required to complete the payment.

+ * + *

If the confirmation_method is manual, all payment attempts must be + * initiated using a secret key. + * If any actions are required for the payment, the PaymentIntent will + * return to the requires_confirmation state + * after those actions are completed. Your server needs to then + * explicitly re-confirm the PaymentIntent to initiate the next payment + * attempt. Read the expanded documentation + * to learn more about manual confirmation.

+ */ + PostPaymentIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: boolean | ('one_off' | 'recurring') + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + reference?: string + } + | '' + alipay?: { [key: string]: unknown } | '' + au_becs_debit?: { [key: string]: unknown } | '' + bacs_debit?: { [key: string]: unknown } | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + boleto?: + | { + expires_after_days?: number + } + | '' + card?: + | { + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card_present?: { [key: string]: unknown } | '' + eps?: { [key: string]: unknown } | '' + fpx?: { [key: string]: unknown } | '' + giropay?: { [key: string]: unknown } | '' + grabpay?: { [key: string]: unknown } | '' + ideal?: { [key: string]: unknown } | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-DE' + | 'en-AT' + | 'en-BE' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-FR' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'sv-FI' + | 'sv-SE' + } + | '' + oxxo?: + | { + expires_after_days?: number + } + | '' + p24?: + | { + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + } + | '' + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' + /** + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + | '' + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean + } + } + } + } + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your payment links.

*/ + GetPaymentLinks: { + parameters: { + query: { + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ + active?: boolean + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_link'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a payment link.

*/ + PostPaymentLinks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection?: 'auto' | 'required' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + price: string + quantity: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string + /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: 'card'[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean + } + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + trial_period_days?: number + } + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number + destination: string + } + } + } + } + } + /**

Retrieve a payment link.

*/ + GetPaymentLinksPaymentLink: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + payment_link: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a payment link.

*/ + PostPaymentLinksPaymentLink: { + parameters: { + path: { + payment_link: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_link'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ + active?: boolean + /** + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection?: 'auto' | 'required' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + id: string + quantity?: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { [key: string]: string } + /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: 'card'[] | '' + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: + | { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + | '' + } + } + } + } + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetPaymentLinksPaymentLinkLineItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + payment_link: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + GetPaymentMethods: { + parameters: { + query: { + /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + PostPaymentMethods: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + afterpay_clearpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + alipay?: { [key: string]: unknown } + /** + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: { [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: + | { + cvc?: string + exp_month: number + exp_year: number + number: string + } + | { + token: string + } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: { [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: { [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: { [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: { [key: string]: unknown } + } + } + } + } + /**

Retrieves a PaymentMethod object.

*/ + GetPaymentMethodsPaymentMethod: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + PostPaymentMethodsPaymentMethod: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /** + *

Attaches a PaymentMethod object to a Customer.

+ * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent + * or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the + * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. + * See Optimizing cards for future payments for more information about setting up future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + PostPaymentMethodsPaymentMethodAttach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Detaches a PaymentMethod object from a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + GetPayouts: { + parameters: { + query: { + arrival_date?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The ID of an external account - only return payouts sent to this external account. */ + destination?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payout'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

+ * + *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

+ * + *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

+ */ + PostPayouts: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} + */ + method?: 'instant' | 'standard' + /** + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ + statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ + GetPayoutsPayout: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ + PostPayoutsPayout: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ + PostPayoutsPayoutCancel: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + PostPayoutsPayoutReverse: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Returns a list of your plans.

*/ + GetPlans: { + parameters: { + query: { + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return plans for the given product. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['plan'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + PostPlans: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + active?: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string + /** + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + product?: + | { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } + | string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' + } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' + } + } + } + } + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ + PostPlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the plan is currently available for new subscriptions. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + } + } + } + } + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + DeletePlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your prices.

*/ + GetPrices: { + parameters: { + query: { + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return prices for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return the price with these lookup_keys, if any exist. */ + lookup_keys?: string[] + /** Only return prices for the given product. */ + product?: string + /** Only return prices with these recurring fields. */ + recurring?: { + /** @enum {string} */ + interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return prices of type `recurring` or `one_time`. */ + type?: 'one_time' | 'recurring' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['price'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + PostPrices: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['price'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** @description The ID of the product that this price will belong to. */ + product?: string + /** + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. + */ + product_data?: { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } + /** + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. + */ + recurring?: { + /** @enum {string} */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' + } + /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string + } + } + } + } + /**

Retrieves the price with the given ID.

*/ + GetPricesPrice: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + price: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['price'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + PostPricesPrice: { + parameters: { + path: { + price: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['price'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + } + } + } + } + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + GetProducts: { + parameters: { + query: { + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return products with the given IDs. */ + ids?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return products that can be shipped (i.e., physical, not digital products). */ + shippable?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return products with the given url. */ + url?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['product'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new product object.

*/ + PostProducts: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['product'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name: string + /** + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string + } + } + } + } + /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ + GetProductsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['product'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostProductsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['product'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] | '' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + name?: string + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + tax_code?: string | '' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string + } + } + } + } + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + DeleteProductsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_product'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your promotion codes.

*/ + GetPromotionCodes: { + parameters: { + query: { + /** Filter promotion codes by whether they are active. */ + active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + code?: string + /** Only return promotion codes for this coupon. */ + coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return promotion codes that are restricted to this customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['promotion_code'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + PostPromotionCodes: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['promotion_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. */ + active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string + /** @description The coupon for this promotion code. */ + coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + first_time_transaction?: boolean + minimum_amount?: number + minimum_amount_currency?: string + } + } + } + } + } + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + GetPromotionCodesPromotionCode: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + promotion_code: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['promotion_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + PostPromotionCodesPromotionCode: { + parameters: { + path: { + promotion_code: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['promotion_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of your quotes.

*/ + GetQuotes: { + parameters: { + query: { + /** The ID of the customer whose quotes will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the quote. */ + status?: 'accepted' | 'canceled' | 'draft' | 'open' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['quote'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + PostQuotes: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean + quote: string + } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + GetQuotesQuote: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A quote models prices and services for a customer.

*/ + PostQuotesQuote: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string + /** @description A header that will be displayed on the quote PDF. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + id?: string + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' + } + } + } + } + /**

Accepts the specified quote.

*/ + PostQuotesQuoteAccept: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Cancels the quote.

*/ + PostQuotesQuoteCancel: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ + GetQuotesQuoteComputedUpfrontLineItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Finalizes the quote.

*/ + PostQuotesQuoteFinalize: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + } + } + } + } + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetQuotesQuoteLineItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Download the PDF for a finalized quote

*/ + GetQuotesQuotePdf: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/pdf': string + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

*/ + GetRadarEarlyFraudWarnings: { + parameters: { + query: { + /** Only return early fraud warnings for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.early_fraud_warning'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieves the details of an early fraud warning that has previously been created.

+ * + *

Please refer to the early fraud warning object reference for more details.

+ */ + GetRadarEarlyFraudWarningsEarlyFraudWarning: { + parameters: { + path: { + early_fraud_warning: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.early_fraud_warning'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueListItems: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ + value?: string + /** Identifier for the parent value list this item belongs to. */ + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + PostRadarValueListItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string + } + } + } + } + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + DeleteRadarValueListItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueLists: { + parameters: { + query: { + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.value_list'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + PostRadarValueLists: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} + */ + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + } + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ + GetRecipients: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + type?: 'corporation' | 'individual' + /** Only return recipients that are verified or unverified. */ + verified?: boolean + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['recipient'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a new Recipient object and verifies the recipient’s identity. + * Also verifies the recipient’s bank account information or debit card, if either is provided.

+ */ + PostRecipients: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['recipient'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ + bank_account?: string + /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ + card?: string + /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string + /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + name: string + /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string + /** @description Type of the recipient: either `individual` or `corporation`. */ + type: string + } + } + } + } + /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ + GetRecipientsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['recipient'] | components['schemas']['deleted_recipient'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified recipient by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged.

+ * + *

If you update the name or tax ID, the identity verification will automatically be rerun. + * If you update the bank account, the bank account validation will automatically be rerun.

+ */ + PostRecipientsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['recipient'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ + bank_account?: string + /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ + card?: string + /** @description ID of the card to set as the recipient's new default for payouts. */ + default_card?: string + /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string + /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ + email?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + name?: string + /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string + } + } + } + } + /**

Permanently deletes a recipient. It cannot be undone.

*/ + DeleteRecipientsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_recipient'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + GetRefunds: { + parameters: { + query: { + /** Only return refunds for the charge specified by this charge ID. */ + charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create a refund.

*/ + PostRefunds: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + amount?: number + charge?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

*/ + GetReportingReportRuns: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ + PostReportingReportRuns: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + /** Format: unix-time */ + interval_end?: number + /** Format: unix-time */ + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Timbuktu' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/Buenos_Aires' + | 'America/Argentina/Catamarca' + | 'America/Argentina/ComodRivadavia' + | 'America/Argentina/Cordoba' + | 'America/Argentina/Jujuy' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Mendoza' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Atikokan' + | 'America/Atka' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Ensenada' + | 'America/Fort_Nelson' + | 'America/Fort_Wayne' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Indianapolis' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Louisville' + | 'America/Kentucky/Monticello' + | 'America/Knox_IN' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Acre' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Rosario' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Shiprock' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Virgin' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/South_Pole' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Ashkhabad' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Chongqing' + | 'Asia/Chungking' + | 'Asia/Colombo' + | 'Asia/Dacca' + | 'Asia/Damascus' + | 'Asia/Dhaka' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Harbin' + | 'Asia/Hebron' + | 'Asia/Ho_Chi_Minh' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Asia/Istanbul' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Kashgar' + | 'Asia/Kathmandu' + | 'Asia/Katmandu' + | 'Asia/Khandyga' + | 'Asia/Kolkata' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Kuwait' + | 'Asia/Macao' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Muscat' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Phnom_Penh' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qatar' + | 'Asia/Qostanay' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Riyadh' + | 'Asia/Saigon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Shanghai' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Tel_Aviv' + | 'Asia/Thimbu' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ujung_Pandang' + | 'Asia/Ulaanbaatar' + | 'Asia/Ulan_Bator' + | 'Asia/Urumqi' + | 'Asia/Ust-Nera' + | 'Asia/Vientiane' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yangon' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faeroe' + | 'Atlantic/Faroe' + | 'Atlantic/Jan_Mayen' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/St_Helena' + | 'Atlantic/Stanley' + | 'Australia/ACT' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Canberra' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/LHI' + | 'Australia/Lindeman' + | 'Australia/Lord_Howe' + | 'Australia/Melbourne' + | 'Australia/NSW' + | 'Australia/North' + | 'Australia/Perth' + | 'Australia/Queensland' + | 'Australia/South' + | 'Australia/Sydney' + | 'Australia/Tasmania' + | 'Australia/Victoria' + | 'Australia/West' + | 'Australia/Yancowinna' + | 'Brazil/Acre' + | 'Brazil/DeNoronha' + | 'Brazil/East' + | 'Brazil/West' + | 'CET' + | 'CST6CDT' + | 'Canada/Atlantic' + | 'Canada/Central' + | 'Canada/Eastern' + | 'Canada/Mountain' + | 'Canada/Newfoundland' + | 'Canada/Pacific' + | 'Canada/Saskatchewan' + | 'Canada/Yukon' + | 'Chile/Continental' + | 'Chile/EasterIsland' + | 'Cuba' + | 'EET' + | 'EST' + | 'EST5EDT' + | 'Egypt' + | 'Eire' + | 'Etc/GMT' + | 'Etc/GMT+0' + | 'Etc/GMT+1' + | 'Etc/GMT+10' + | 'Etc/GMT+11' + | 'Etc/GMT+12' + | 'Etc/GMT+2' + | 'Etc/GMT+3' + | 'Etc/GMT+4' + | 'Etc/GMT+5' + | 'Etc/GMT+6' + | 'Etc/GMT+7' + | 'Etc/GMT+8' + | 'Etc/GMT+9' + | 'Etc/GMT-0' + | 'Etc/GMT-1' + | 'Etc/GMT-10' + | 'Etc/GMT-11' + | 'Etc/GMT-12' + | 'Etc/GMT-13' + | 'Etc/GMT-14' + | 'Etc/GMT-2' + | 'Etc/GMT-3' + | 'Etc/GMT-4' + | 'Etc/GMT-5' + | 'Etc/GMT-6' + | 'Etc/GMT-7' + | 'Etc/GMT-8' + | 'Etc/GMT-9' + | 'Etc/GMT0' + | 'Etc/Greenwich' + | 'Etc/UCT' + | 'Etc/UTC' + | 'Etc/Universal' + | 'Etc/Zulu' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/Belfast' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Bratislava' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Busingen' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Dublin' + | 'Europe/Gibraltar' + | 'Europe/Guernsey' + | 'Europe/Helsinki' + | 'Europe/Isle_of_Man' + | 'Europe/Istanbul' + | 'Europe/Jersey' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Ljubljana' + | 'Europe/London' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Mariehamn' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Nicosia' + | 'Europe/Oslo' + | 'Europe/Paris' + | 'Europe/Podgorica' + | 'Europe/Prague' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/San_Marino' + | 'Europe/Sarajevo' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Skopje' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Tiraspol' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vaduz' + | 'Europe/Vatican' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zagreb' + | 'Europe/Zaporozhye' + | 'Europe/Zurich' + | 'Factory' + | 'GB' + | 'GB-Eire' + | 'GMT' + | 'GMT+0' + | 'GMT-0' + | 'GMT0' + | 'Greenwich' + | 'HST' + | 'Hongkong' + | 'Iceland' + | 'Indian/Antananarivo' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Comoro' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Mayotte' + | 'Indian/Reunion' + | 'Iran' + | 'Israel' + | 'Jamaica' + | 'Japan' + | 'Kwajalein' + | 'Libya' + | 'MET' + | 'MST' + | 'MST7MDT' + | 'Mexico/BajaNorte' + | 'Mexico/BajaSur' + | 'Mexico/General' + | 'NZ' + | 'NZ-CHAT' + | 'Navajo' + | 'PRC' + | 'PST8PDT' + | 'Pacific/Apia' + | 'Pacific/Auckland' + | 'Pacific/Bougainville' + | 'Pacific/Chatham' + | 'Pacific/Chuuk' + | 'Pacific/Easter' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Johnston' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Kwajalein' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Midway' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Pago_Pago' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Pohnpei' + | 'Pacific/Ponape' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Saipan' + | 'Pacific/Samoa' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Truk' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | 'Pacific/Yap' + | 'Poland' + | 'Portugal' + | 'ROC' + | 'ROK' + | 'Singapore' + | 'Turkey' + | 'UCT' + | 'US/Alaska' + | 'US/Aleutian' + | 'US/Arizona' + | 'US/Central' + | 'US/East-Indiana' + | 'US/Eastern' + | 'US/Hawaii' + | 'US/Indiana-Starke' + | 'US/Michigan' + | 'US/Mountain' + | 'US/Pacific' + | 'US/Pacific-New' + | 'US/Samoa' + | 'UTC' + | 'Universal' + | 'W-SU' + | 'WET' + | 'Zulu' + } + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetReviews: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['review'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + GetSetupAttempts: { + parameters: { + query: { + /** + * A filter on the list, based on the object `created` field. The value + * can be a string with an integer Unix timestamp, or it can be a + * dictionary with a number of different query options. + */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** + * Only return SetupAttempts created by the SetupIntent specified by + * this ID. + */ + setup_intent: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_attempt'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + PostSetupIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + } + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + } + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_param */ + card?: { + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + PostSetupIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + GetShippingRates: { + parameters: { + query: { + /** Only return shipping rates that are active or inactive. */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return shipping rates for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + PostShippingRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number + currency: string + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + GetShippingRatesShippingRateToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + PostShippingRatesShippingRateToken: { + parameters: { + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of scheduled query runs.

*/ + GetSigmaScheduledQueryRuns: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['scheduled_query_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + GetSkus: { + parameters: { + query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: { [key: string]: string } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return SKUs with the given IDs. */ + ids?: string[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + } + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + } + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + metadata?: { [key: string]: string } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** @enum {string} */ + usage?: 'reusable' | 'single_use' + } + } + } + } + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSource: { + parameters: { + query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

*/ + GetSourcesSourceSourceTransactions: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['source_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + } + /**

Returns a list of your subscription items for a given subscription.

*/ + GetSubscriptionItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The ID of the subscription whose items will be retrieved. */ + subscription: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + PostSubscriptionItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the plan or quantity of an item on a current subscription.

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + } + } + } + } + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['usage_record_summary'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: 'now' | number + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ + PostSubscriptionSchedules: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + /** Format: unix-time */ + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + /** Format: unix-time */ + trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: number | 'now' + } + } + } + } + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + end_date?: number | 'now' + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: number | 'now' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + trial_end?: number | 'now' + }[] + /** + * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + } + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + } + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + } + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + GetSubscriptions: { + parameters: { + query: { + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_end?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_start?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter for subscriptions that contain this recurring price ID. */ + price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ + PostSubscriptions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. + */ + automatic_tax?: { + enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number + } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | '' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. + * + * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + * + * Prorations can be disabled by passing `none`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } + } + } + } + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + GetTaxCodes: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['tax_code'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + GetTaxCodesId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + GetTaxRates: { + parameters: { + query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active?: boolean + /** Optional range for filtering created date. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ + inclusive?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['tax_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new tax rate.

*/ + PostTaxRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } + } + /**

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + tax_rate: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { + parameters: { + path: { + tax_rate: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } + } + /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ + PostTerminalConnectionTokens: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.connection_token'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string + } + } + } + } + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

+ */ + PostTerminalLocations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * create_location_address_param + * @description The full address of the location. + */ + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description A name for the location. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description A name for the location. */ + display_name?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { + parameters: { + query: { + /** Filters readers by device type */ + device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A location ID to filter the response list to only readers at the specific location */ + location?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A status filter to filter readers to only offline or online readers */ + status?: 'offline' | 'online' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description A list of readers */ + data: components['schemas']['terminal.reader'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new Reader object.

*/ + PostTerminalReaders: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.reader'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. */ + location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string + } + } + } + } + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + reader: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalReadersReader: { + parameters: { + path: { + reader: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The new label of the reader. */ + label?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { + parameters: { + path: { + reader: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.reader'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a single-use token that represents a bank account’s details. + * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

+ */ + PostTokens: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['token'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * connect_js_account_token_specs + * @description Information for the account this token will represent. + */ + account?: { + /** @enum {string} */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + ownership_declaration_shown_and_signed?: boolean + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + routing_number?: string + } + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + currency?: string + cvc?: string + exp_month: string + exp_year: string + name?: string + number: string + } + | string + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + cvc_update?: { + cvc: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] + } + } + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + nationality?: string + phone?: string + political_exposure?: string + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + /** + * pii_token_specs + * @description The PII this token will represent. + */ + pii?: { + id_number?: string + } + } + } + } + } + /**

Retrieves the token with the given ID.

*/ + GetTokensToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['token'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of top-ups.

*/ + GetTopups: { + parameters: { + query: { + /** A positive integer representing how much to transfer. */ + amount?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + status?: 'canceled' | 'failed' | 'pending' | 'succeeded' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Top up the balance of an account

*/ + PostTopups: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string + } + } + } + } + /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ + GetTopupsTopup: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + PostTopupsTopupCancel: { + parameters: { + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + GetTransfers: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transfers for the destination specified by this account ID. */ + destination?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return transfers with the specified transfer group. */ + transfer_group?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ + PostTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer in %s representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } + } + } + } + /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ + GetTransfersIdReversals: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

When you create a new reversal, you must specify a transfer to create it on.

+ * + *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

+ * + *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

+ */ + PostTransfersIdReversals: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean + } + } + } + } + /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ + GetTransfersTransfer: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts only metadata as an argument.

+ */ + PostTransfersTransfer: { + parameters: { + path: { + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + GetTransfersTransferReversalsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Returns a list of your webhook endpoints.

*/ + GetWebhookEndpoints: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['webhook_endpoint'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ + PostWebhookEndpoints: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['webhook_endpoint'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + * @enum {string} + */ + api_version?: + | '2011-01-01' + | '2011-06-21' + | '2011-06-28' + | '2011-08-01' + | '2011-09-15' + | '2011-11-17' + | '2012-02-23' + | '2012-03-25' + | '2012-06-18' + | '2012-06-28' + | '2012-07-09' + | '2012-09-24' + | '2012-10-26' + | '2012-11-07' + | '2013-02-11' + | '2013-02-13' + | '2013-07-05' + | '2013-08-12' + | '2013-08-13' + | '2013-10-29' + | '2013-12-03' + | '2014-01-31' + | '2014-03-13' + | '2014-03-28' + | '2014-05-19' + | '2014-06-13' + | '2014-06-17' + | '2014-07-22' + | '2014-07-26' + | '2014-08-04' + | '2014-08-20' + | '2014-09-08' + | '2014-10-07' + | '2014-11-05' + | '2014-11-20' + | '2014-12-08' + | '2014-12-17' + | '2014-12-22' + | '2015-01-11' + | '2015-01-26' + | '2015-02-10' + | '2015-02-16' + | '2015-02-18' + | '2015-03-24' + | '2015-04-07' + | '2015-06-15' + | '2015-07-07' + | '2015-07-13' + | '2015-07-28' + | '2015-08-07' + | '2015-08-19' + | '2015-09-03' + | '2015-09-08' + | '2015-09-23' + | '2015-10-01' + | '2015-10-12' + | '2015-10-16' + | '2016-02-03' + | '2016-02-19' + | '2016-02-22' + | '2016-02-23' + | '2016-02-29' + | '2016-03-07' + | '2016-06-15' + | '2016-07-06' + | '2016-10-19' + | '2017-01-27' + | '2017-02-14' + | '2017-04-06' + | '2017-05-25' + | '2017-06-05' + | '2017-08-15' + | '2017-12-14' + | '2018-01-23' + | '2018-02-05' + | '2018-02-06' + | '2018-02-28' + | '2018-05-21' + | '2018-07-27' + | '2018-08-23' + | '2018-09-06' + | '2018-09-24' + | '2018-10-31' + | '2018-11-08' + | '2019-02-11' + | '2019-02-19' + | '2019-03-14' + | '2019-05-16' + | '2019-08-14' + | '2019-09-09' + | '2019-10-08' + | '2019-10-17' + | '2019-11-05' + | '2019-12-03' + | '2020-03-02' + | '2020-08-27' + /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ + connect?: boolean + /** @description An optional description of what the webhook is used for. */ + description?: string + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events: ( + | '*' + | 'account.application.authorized' + | 'account.application.deauthorized' + | 'account.external_account.created' + | 'account.external_account.deleted' + | 'account.external_account.updated' + | 'account.updated' + | 'application_fee.created' + | 'application_fee.refund.updated' + | 'application_fee.refunded' + | 'balance.available' + | 'billing_portal.configuration.created' + | 'billing_portal.configuration.updated' + | 'capability.updated' + | 'charge.captured' + | 'charge.dispute.closed' + | 'charge.dispute.created' + | 'charge.dispute.funds_reinstated' + | 'charge.dispute.funds_withdrawn' + | 'charge.dispute.updated' + | 'charge.expired' + | 'charge.failed' + | 'charge.pending' + | 'charge.refund.updated' + | 'charge.refunded' + | 'charge.succeeded' + | 'charge.updated' + | 'checkout.session.async_payment_failed' + | 'checkout.session.async_payment_succeeded' + | 'checkout.session.completed' + | 'checkout.session.expired' + | 'coupon.created' + | 'coupon.deleted' + | 'coupon.updated' + | 'credit_note.created' + | 'credit_note.updated' + | 'credit_note.voided' + | 'customer.created' + | 'customer.deleted' + | 'customer.discount.created' + | 'customer.discount.deleted' + | 'customer.discount.updated' + | 'customer.source.created' + | 'customer.source.deleted' + | 'customer.source.expiring' + | 'customer.source.updated' + | 'customer.subscription.created' + | 'customer.subscription.deleted' + | 'customer.subscription.pending_update_applied' + | 'customer.subscription.pending_update_expired' + | 'customer.subscription.trial_will_end' + | 'customer.subscription.updated' + | 'customer.tax_id.created' + | 'customer.tax_id.deleted' + | 'customer.tax_id.updated' + | 'customer.updated' + | 'file.created' + | 'identity.verification_session.canceled' + | 'identity.verification_session.created' + | 'identity.verification_session.processing' + | 'identity.verification_session.redacted' + | 'identity.verification_session.requires_input' + | 'identity.verification_session.verified' + | 'invoice.created' + | 'invoice.deleted' + | 'invoice.finalization_failed' + | 'invoice.finalized' + | 'invoice.marked_uncollectible' + | 'invoice.paid' + | 'invoice.payment_action_required' + | 'invoice.payment_failed' + | 'invoice.payment_succeeded' + | 'invoice.sent' + | 'invoice.upcoming' + | 'invoice.updated' + | 'invoice.voided' + | 'invoiceitem.created' + | 'invoiceitem.deleted' + | 'invoiceitem.updated' + | 'issuing_authorization.created' + | 'issuing_authorization.request' + | 'issuing_authorization.updated' + | 'issuing_card.created' + | 'issuing_card.updated' + | 'issuing_cardholder.created' + | 'issuing_cardholder.updated' + | 'issuing_dispute.closed' + | 'issuing_dispute.created' + | 'issuing_dispute.funds_reinstated' + | 'issuing_dispute.submitted' + | 'issuing_dispute.updated' + | 'issuing_transaction.created' + | 'issuing_transaction.updated' + | 'mandate.updated' + | 'order.created' + | 'order.payment_failed' + | 'order.payment_succeeded' + | 'order.updated' + | 'order_return.created' + | 'payment_intent.amount_capturable_updated' + | 'payment_intent.canceled' + | 'payment_intent.created' + | 'payment_intent.payment_failed' + | 'payment_intent.processing' + | 'payment_intent.requires_action' + | 'payment_intent.succeeded' + | 'payment_link.created' + | 'payment_link.updated' + | 'payment_method.attached' + | 'payment_method.automatically_updated' + | 'payment_method.detached' + | 'payment_method.updated' + | 'payout.canceled' + | 'payout.created' + | 'payout.failed' + | 'payout.paid' + | 'payout.updated' + | 'person.created' + | 'person.deleted' + | 'person.updated' + | 'plan.created' + | 'plan.deleted' + | 'plan.updated' + | 'price.created' + | 'price.deleted' + | 'price.updated' + | 'product.created' + | 'product.deleted' + | 'product.updated' + | 'promotion_code.created' + | 'promotion_code.updated' + | 'quote.accepted' + | 'quote.canceled' + | 'quote.created' + | 'quote.finalized' + | 'radar.early_fraud_warning.created' + | 'radar.early_fraud_warning.updated' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'reporting.report_run.failed' + | 'reporting.report_run.succeeded' + | 'reporting.report_type.updated' + | 'review.closed' + | 'review.opened' + | 'setup_intent.canceled' + | 'setup_intent.created' + | 'setup_intent.requires_action' + | 'setup_intent.setup_failed' + | 'setup_intent.succeeded' + | 'sigma.scheduled_query_run.created' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated' + | 'source.canceled' + | 'source.chargeable' + | 'source.failed' + | 'source.mandate_notification' + | 'source.refund_attributes_required' + | 'source.transaction.created' + | 'source.transaction.updated' + | 'subscription_schedule.aborted' + | 'subscription_schedule.canceled' + | 'subscription_schedule.completed' + | 'subscription_schedule.created' + | 'subscription_schedule.expiring' + | 'subscription_schedule.released' + | 'subscription_schedule.updated' + | 'tax_rate.created' + | 'tax_rate.updated' + | 'topup.canceled' + | 'topup.created' + | 'topup.failed' + | 'topup.reversed' + | 'topup.succeeded' + | 'transfer.created' + | 'transfer.failed' + | 'transfer.paid' + | 'transfer.reversed' + | 'transfer.updated' + )[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The URL of the webhook endpoint. */ + url: string + } + } + } + } + /**

Retrieves the webhook endpoint with the given ID.

*/ + GetWebhookEndpointsWebhookEndpoint: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + webhook_endpoint: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['webhook_endpoint'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ + PostWebhookEndpointsWebhookEndpoint: { + parameters: { + path: { + webhook_endpoint: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['webhook_endpoint'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description An optional description of what the webhook is used for. */ + description?: string + /** @description Disable the webhook endpoint if set to true. */ + disabled?: boolean + /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ + enabled_events?: ( + | '*' + | 'account.application.authorized' + | 'account.application.deauthorized' + | 'account.external_account.created' + | 'account.external_account.deleted' + | 'account.external_account.updated' + | 'account.updated' + | 'application_fee.created' + | 'application_fee.refund.updated' + | 'application_fee.refunded' + | 'balance.available' + | 'billing_portal.configuration.created' + | 'billing_portal.configuration.updated' + | 'capability.updated' + | 'charge.captured' + | 'charge.dispute.closed' + | 'charge.dispute.created' + | 'charge.dispute.funds_reinstated' + | 'charge.dispute.funds_withdrawn' + | 'charge.dispute.updated' + | 'charge.expired' + | 'charge.failed' + | 'charge.pending' + | 'charge.refund.updated' + | 'charge.refunded' + | 'charge.succeeded' + | 'charge.updated' + | 'checkout.session.async_payment_failed' + | 'checkout.session.async_payment_succeeded' + | 'checkout.session.completed' + | 'checkout.session.expired' + | 'coupon.created' + | 'coupon.deleted' + | 'coupon.updated' + | 'credit_note.created' + | 'credit_note.updated' + | 'credit_note.voided' + | 'customer.created' + | 'customer.deleted' + | 'customer.discount.created' + | 'customer.discount.deleted' + | 'customer.discount.updated' + | 'customer.source.created' + | 'customer.source.deleted' + | 'customer.source.expiring' + | 'customer.source.updated' + | 'customer.subscription.created' + | 'customer.subscription.deleted' + | 'customer.subscription.pending_update_applied' + | 'customer.subscription.pending_update_expired' + | 'customer.subscription.trial_will_end' + | 'customer.subscription.updated' + | 'customer.tax_id.created' + | 'customer.tax_id.deleted' + | 'customer.tax_id.updated' + | 'customer.updated' + | 'file.created' + | 'identity.verification_session.canceled' + | 'identity.verification_session.created' + | 'identity.verification_session.processing' + | 'identity.verification_session.redacted' + | 'identity.verification_session.requires_input' + | 'identity.verification_session.verified' + | 'invoice.created' + | 'invoice.deleted' + | 'invoice.finalization_failed' + | 'invoice.finalized' + | 'invoice.marked_uncollectible' + | 'invoice.paid' + | 'invoice.payment_action_required' + | 'invoice.payment_failed' + | 'invoice.payment_succeeded' + | 'invoice.sent' + | 'invoice.upcoming' + | 'invoice.updated' + | 'invoice.voided' + | 'invoiceitem.created' + | 'invoiceitem.deleted' + | 'invoiceitem.updated' + | 'issuing_authorization.created' + | 'issuing_authorization.request' + | 'issuing_authorization.updated' + | 'issuing_card.created' + | 'issuing_card.updated' + | 'issuing_cardholder.created' + | 'issuing_cardholder.updated' + | 'issuing_dispute.closed' + | 'issuing_dispute.created' + | 'issuing_dispute.funds_reinstated' + | 'issuing_dispute.submitted' + | 'issuing_dispute.updated' + | 'issuing_transaction.created' + | 'issuing_transaction.updated' + | 'mandate.updated' + | 'order.created' + | 'order.payment_failed' + | 'order.payment_succeeded' + | 'order.updated' + | 'order_return.created' + | 'payment_intent.amount_capturable_updated' + | 'payment_intent.canceled' + | 'payment_intent.created' + | 'payment_intent.payment_failed' + | 'payment_intent.processing' + | 'payment_intent.requires_action' + | 'payment_intent.succeeded' + | 'payment_link.created' + | 'payment_link.updated' + | 'payment_method.attached' + | 'payment_method.automatically_updated' + | 'payment_method.detached' + | 'payment_method.updated' + | 'payout.canceled' + | 'payout.created' + | 'payout.failed' + | 'payout.paid' + | 'payout.updated' + | 'person.created' + | 'person.deleted' + | 'person.updated' + | 'plan.created' + | 'plan.deleted' + | 'plan.updated' + | 'price.created' + | 'price.deleted' + | 'price.updated' + | 'product.created' + | 'product.deleted' + | 'product.updated' + | 'promotion_code.created' + | 'promotion_code.updated' + | 'quote.accepted' + | 'quote.canceled' + | 'quote.created' + | 'quote.finalized' + | 'radar.early_fraud_warning.created' + | 'radar.early_fraud_warning.updated' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'reporting.report_run.failed' + | 'reporting.report_run.succeeded' + | 'reporting.report_type.updated' + | 'review.closed' + | 'review.opened' + | 'setup_intent.canceled' + | 'setup_intent.created' + | 'setup_intent.requires_action' + | 'setup_intent.setup_failed' + | 'setup_intent.succeeded' + | 'sigma.scheduled_query_run.created' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated' + | 'source.canceled' + | 'source.chargeable' + | 'source.failed' + | 'source.mandate_notification' + | 'source.refund_attributes_required' + | 'source.transaction.created' + | 'source.transaction.updated' + | 'subscription_schedule.aborted' + | 'subscription_schedule.canceled' + | 'subscription_schedule.completed' + | 'subscription_schedule.created' + | 'subscription_schedule.expiring' + | 'subscription_schedule.released' + | 'subscription_schedule.updated' + | 'tax_rate.created' + | 'tax_rate.updated' + | 'topup.canceled' + | 'topup.created' + | 'topup.failed' + | 'topup.reversed' + | 'topup.succeeded' + | 'transfer.created' + | 'transfer.failed' + | 'transfer.paid' + | 'transfer.reversed' + | 'transfer.updated' + )[] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The URL of the webhook endpoint. */ + url?: string + } + } + } + } + /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ + DeleteWebhookEndpointsWebhookEndpoint: { + parameters: { + path: { + webhook_endpoint: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_webhook_endpoint'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } +} + +export interface external {} diff --git a/test/v3/index.test.js b/test/v3/index.test.js index bf7fc8b30..efa5e9cac 100644 --- a/test/v3/index.test.js +++ b/test/v3/index.test.js @@ -71,6 +71,17 @@ describe("cli", () => { const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); expect(generated).to.equal(expected); }); + + it(`reads ${schema} spec (v3) from file (alphabetize)`, async () => { + const filename = schema.replace(/\.(json|yaml)/, ".alphabetized.ts"); + + execSync(`${cmd} specs/${schema} -o generated/${filename} --prettier-config fixtures/.prettierrc --alphabetize`, { + cwd, + }); + const generated = fs.readFileSync(new URL(`./generated/${filename}`, cwd), "utf8"); + const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); + expect(generated).to.equal(expected); + }); }); it("reads spec (v3) from remote resource", async () => { From 950bca407c0698dbbbe0d07bf6ab55a89e3b23cb Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Sat, 24 Sep 2022 15:48:09 -0500 Subject: [PATCH 3/5] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 118c86ff9..c64fc0aed 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ npx openapi-typescript schema.yaml | `--support-array-length` | | `false` | (optional) Generate tuples using array minItems / maxItems | | `--make-paths-enum` | `-pe` | `false` | (optional) Generate an enum of endpoint paths | | `--path-params-as-types` | | `false` | (optional) Substitute path parameter names with their respective types | -| `--alphabetized` | | `false` | (optional) Sort types alphabetically | +| `--alphabetize` | | `false` | (optional) Sort types alphabetically | | `--raw-schema` | | `false` | Generate TS types from partial schema (e.g. having `components.schema` at the top level) | | `--version` | | | Force OpenAPI version with `--version 3` or `--version 2` (required for `--raw-schema` when version is unknown) | From 73945ba04cae9ce69098bedfacaf7d1827076b99 Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Sun, 9 Oct 2022 03:33:21 -0500 Subject: [PATCH 4/5] Rewrite tests to test for alphabetization of specific object types --- src/transform/parameters.ts | 6 +- src/transform/request.ts | 2 +- src/transform/responses.ts | 6 +- src/utils.ts | 2 +- test/core/operation.test.js | 97 + test/core/parameters.test.js | 140 + test/core/paths.test.js | 114 + test/core/request.test.js | 57 + test/core/schema.test.js | 51 + .../expected/falsey-example.alphabetized.ts | 38 - test/v2/expected/manifold.alphabetized.ts | 1114 - test/v2/expected/null-in-enum.alphabetized.ts | 44 - test/v2/expected/petstore.alphabetized.ts | 445 - .../reference-to-properties.alphabetized.ts | 36 - test/v2/expected/stripe.alphabetized.ts | 29467 ----------- test/v2/index.test.js | 11 - .../v3/expected/all-of-string.alphabetized.ts | 30 - test/v3/expected/any-of.alphabetized.ts | 33 - test/v3/expected/consts-enums.alphabetized.ts | 35 - .../v3/expected/consts-object.alphabetized.ts | 28 - .../expected/falsey-example.alphabetized.ts | 41 - test/v3/expected/github.alphabetized.ts | 42903 --------------- test/v3/expected/jsdoc.alphabetized.ts | 151 - test/v3/expected/jsdoc2.alphabetized.ts | 50 - test/v3/expected/manifold.alphabetized.ts | 1214 - test/v3/expected/null-in-enum.alphabetized.ts | 44 - test/v3/expected/one-of-empty.alphabetized.ts | 30 - .../petstore-openapitools.alphabetized.ts | 521 - test/v3/expected/petstore.alphabetized.ts | 490 - .../reference-to-properties.alphabetized.ts | 35 - test/v3/expected/stripe.alphabetized.ts | 44038 ---------------- test/v3/index.test.js | 11 - 32 files changed, 467 insertions(+), 120817 deletions(-) delete mode 100644 test/v2/expected/falsey-example.alphabetized.ts delete mode 100644 test/v2/expected/manifold.alphabetized.ts delete mode 100644 test/v2/expected/null-in-enum.alphabetized.ts delete mode 100644 test/v2/expected/petstore.alphabetized.ts delete mode 100644 test/v2/expected/reference-to-properties.alphabetized.ts delete mode 100644 test/v2/expected/stripe.alphabetized.ts delete mode 100644 test/v3/expected/all-of-string.alphabetized.ts delete mode 100644 test/v3/expected/any-of.alphabetized.ts delete mode 100644 test/v3/expected/consts-enums.alphabetized.ts delete mode 100644 test/v3/expected/consts-object.alphabetized.ts delete mode 100644 test/v3/expected/falsey-example.alphabetized.ts delete mode 100644 test/v3/expected/github.alphabetized.ts delete mode 100644 test/v3/expected/jsdoc.alphabetized.ts delete mode 100644 test/v3/expected/jsdoc2.alphabetized.ts delete mode 100644 test/v3/expected/manifold.alphabetized.ts delete mode 100644 test/v3/expected/null-in-enum.alphabetized.ts delete mode 100644 test/v3/expected/one-of-empty.alphabetized.ts delete mode 100644 test/v3/expected/petstore-openapitools.alphabetized.ts delete mode 100644 test/v3/expected/petstore.alphabetized.ts delete mode 100644 test/v3/expected/reference-to-properties.alphabetized.ts delete mode 100644 test/v3/expected/stripe.alphabetized.ts diff --git a/src/transform/parameters.ts b/src/transform/parameters.ts index 3fdc0c3d3..f5912e075 100644 --- a/src/transform/parameters.ts +++ b/src/transform/parameters.ts @@ -1,5 +1,5 @@ import type { GlobalContext, ParameterObject, ReferenceObject } from "../types.js"; -import { comment, tsReadonly } from "../utils.js"; +import { comment, getEntries, tsReadonly } from "../utils.js"; import { transformSchemaObj } from "./schema.js"; interface TransformParametersOptions extends GlobalContext { @@ -57,9 +57,9 @@ export function transformParametersArray( } // transform output - for (const [paramIn, paramGroup] of Object.entries(mappedParams)) { + for (const [paramIn, paramGroup] of getEntries(mappedParams, ctx)) { output += ` ${readonly}${paramIn}: {\n`; // open in - for (const [paramName, paramObj] of Object.entries(paramGroup)) { + for (const [paramName, paramObj] of getEntries(paramGroup, ctx)) { let paramComment = ""; if (paramObj.deprecated) paramComment += `@deprecated `; if (paramObj.description) paramComment += paramObj.description; diff --git a/src/transform/request.ts b/src/transform/request.ts index eae4ffef8..77ed8757f 100644 --- a/src/transform/request.ts +++ b/src/transform/request.ts @@ -20,7 +20,7 @@ export function transformRequestBodyObj(requestBody: RequestBody, ctx: GlobalCon if (requestBody.content && Object.keys(requestBody.content).length) { output += ` ${readonly}content: {\n`; // open content - for (const [k, v] of Object.entries(requestBody.content)) { + for (const [k, v] of getEntries(requestBody.content, ctx)) { output += ` ${readonly}"${k}": ${transformSchemaObj(v.schema, { ...ctx, required: new Set() })};\n`; } output += ` }\n`; // close content diff --git a/src/transform/responses.ts b/src/transform/responses.ts index 571f1b5b0..9b27b5f4c 100644 --- a/src/transform/responses.ts +++ b/src/transform/responses.ts @@ -47,10 +47,10 @@ export function transformResponsesObj(responsesObj: Record, ctx: Gl switch (ctx.version) { case 3: { output += ` ${readonly}content: {\n`; // open content - for (const contentType of Object.keys(response.content)) { - const contentResponse = response.content[contentType] as any; + // TODO: proper type definitions for this + for (const [contentType, contentResponse] of getEntries(response.content, ctx)) { const responseType = - contentResponse && contentResponse?.schema + "schema" in contentResponse ? transformSchemaObj(contentResponse.schema, { ...ctx, required: new Set() }) : "unknown"; output += ` ${readonly}"${contentType}": ${responseType};\n`; diff --git a/src/utils.ts b/src/utils.ts index 7215dddf1..335c31f28 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -288,6 +288,6 @@ export function replaceKeys(obj: Record): Record { export function getEntries(obj: ArrayLike | Record, options: GlobalContext) { const entries = Object.entries(obj); - if (options.alphabetize) entries.sort(([a], [b]) => a.localeCompare(b, "en")); + if (options.alphabetize) entries.sort(([a], [b]) => a.localeCompare(b, "en", { numeric: true })); return entries; } diff --git a/test/core/operation.test.js b/test/core/operation.test.js index 4431fba61..4aefaf895 100644 --- a/test/core/operation.test.js +++ b/test/core/operation.test.js @@ -187,4 +187,101 @@ describe("parameters", () => { }`); }); + + describe("with alphabetize", () => { + function createOperationTransform(schema) { + return transformOperationObj(schema, { + ...defaults, + alphabetize: true, + version: 3, + pathItem: { + parameters: [ + { + in: "path", + name: "p2", + schema: { + type: "string", + }, + }, + { + in: "path", + name: "p3", + schema: { + type: "string", + }, + }, + ], + }, + }); + } + + it("sorts content types", () => { + const actual = createOperationTransform({ + requestBody: { + content: { + "font/woff2": { + schema: { type: "string" }, + }, + "font/otf": { + schema: { type: "string" }, + }, + "font/sfnt": { + schema: { type: "string" }, + }, + "font/ttf": { + schema: { type: "string" }, + }, + "font/woff": { + schema: { type: "string" }, + }, + }, + }, + }); + expect(actual.trim()).to.equal(`parameters: { + path: { + "p2"?: string; + "p3"?: string; + } + + } + requestBody: { + content: { + "font/otf": string; + "font/sfnt": string; + "font/ttf": string; + "font/woff": string; + "font/woff2": string; + } + }`); + }); + + it("sorts operation parameters", () => { + const actual = createOperationTransform({ + parameters: [ + { + in: "path", + name: "p2", + schema: { + type: "number", + }, + }, + { + in: "path", + name: "p1", + schema: { + type: "string", + }, + }, + ], + }); + expect(actual.trim()).to.equal(`parameters: { + path: { + "p1"?: string; + "p2"?: number; + "p3"?: string; + } + + }`); + }); + }); }); diff --git a/test/core/parameters.test.js b/test/core/parameters.test.js index 4628a1245..d8da18ce8 100644 --- a/test/core/parameters.test.js +++ b/test/core/parameters.test.js @@ -67,6 +67,58 @@ describe("transformParametersArray()", () => { ); }); + it("basic (alphabetize)", () => { + const schema = [ + { in: "query", name: "delta", required: true, type: "string" }, + { in: "query", name: "charlie", required: true, type: "string" }, + { in: "query", name: "alpha", required: true, type: "string" }, + { in: "query", name: "bravo", required: true, type: "string" }, + ]; + + const actual = transformParametersArray(schema, { + ...defaults, + version: 2, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "alpha": string; + "bravo": string; + "charlie": string; + "delta": string; + }`); + }); + + it("numeric (alphabetize)", () => { + const schema = [ + { in: "query", name: "1000", required: true, type: "string" }, + { in: "query", name: "123", required: true, type: "string" }, + { in: "query", name: "1001", required: true, type: "string" }, + { in: "query", name: "111", required: true, type: "string" }, + ]; + + const actual = transformParametersArray(schema, { + ...defaults, + version: 2, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "111": string; + "123": string; + "1000": string; + "1001": string; + }`); + }); + const refSchema = [ { $ref: 'parameters["per_page"]' }, { $ref: 'parameters["page"]' }, @@ -107,6 +159,24 @@ describe("transformParametersArray()", () => { readonly "per_page": parameters["per_page"]; readonly "page"?: parameters["page"]; readonly "since"?: parameters["since"]; + }`); + }); + + it("$ref (alphabetize)", () => { + const actual = transformParametersArray(refSchema, { + ...defaults, + version: 2, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "page"?: parameters["page"]; + "per_page": parameters["per_page"]; + "since"?: parameters["since"]; }`); }); }); @@ -171,6 +241,58 @@ describe("transformParametersArray()", () => { ); }); + it("basic (alphabetize)", () => { + const schema = [ + { in: "query", name: "delta", required: true, schema: { type: "string" } }, + { in: "query", name: "charlie", required: true, schema: { type: "string" } }, + { in: "query", name: "alpha", required: true, schema: { type: "string" } }, + { in: "query", name: "bravo", required: true, schema: { type: "string" } }, + ]; + + const actual = transformParametersArray(schema, { + ...defaults, + version: 3, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "alpha": string; + "bravo": string; + "charlie": string; + "delta": string; + }`); + }); + + it("numeric (alphabetize)", () => { + const schema = [ + { in: "query", name: "1000", required: true, schema: { type: "string" } }, + { in: "query", name: "123", required: true, schema: { type: "string" } }, + { in: "query", name: "1001", required: true, schema: { type: "string" } }, + { in: "query", name: "111", required: true, schema: { type: "string" } }, + ]; + + const actual = transformParametersArray(schema, { + ...defaults, + version: 3, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "111": string; + "123": string; + "1000": string; + "1001": string; + }`); + }); + const refSchema = [ { $ref: 'components["parameters"]["per_page"]' }, { $ref: 'components["parameters"]["page"]' }, @@ -214,6 +336,24 @@ describe("transformParametersArray()", () => { }`); }); + it("$ref (alphabetize)", () => { + const actual = transformParametersArray(refSchema, { + ...defaults, + version: 3, + alphabetize: true, + globalParameters: { + per_page: { in: "query", name: "per_page", required: true, type: "number" }, + page: { in: "query", name: "page", type: "number" }, + since: { in: "query", name: "since", type: "string" }, + }, + }).trim(); + expect(actual).to.equal(`query: { + "page"?: components["parameters"]["page"]; + "per_page": components["parameters"]["per_page"]; + "since"?: components["parameters"]["since"]; + }`); + }); + it("nullable", () => { const schema = [ { in: "query", name: "nullableString", schema: { type: "string", nullable: true } }, diff --git a/test/core/paths.test.js b/test/core/paths.test.js index d868533f3..71925f712 100644 --- a/test/core/paths.test.js +++ b/test/core/paths.test.js @@ -14,6 +14,9 @@ const defaults = { operations: {}, rawSchema: false, version: 3, // both 2 and 3 should generate the same + commentHeader: "", + contentNever: false, + makePathsEnum: false, }; describe("transformPathsObj", () => { @@ -525,4 +528,115 @@ describe("transformPathsObj", () => { };`) ); }); + + describe("alphabetize", () => { + function assertSchema(actual, expected) { + const result = format(transform(actual, { ...defaults, alphabetize: true })); + expect(result).to.equal(format(expected)); + } + + it("parameters", () => { + const actual = { + "/contact": { + post: { + parameters: [ + { name: "q", in: "query", required: true, schema: { type: "string" } }, + { name: "p", in: "query", schema: { type: "integer" } }, + ], + }, + }, + }; + + const expected = ` + "/contact": { + post: { + parameters: { + query: { + p?: number; + q: string; + }; + }; + }; + }; + `; + + assertSchema(actual, expected); + }); + + it("response codes", () => { + const actual = { + "/contact": { + post: { + responses: { + 500: {}, + 200: {}, + 400: {}, + 40: {}, + }, + }, + }, + }; + + const expected = ` + "/contact": { + post: { + responses: { + 40: unknown; + 200: unknown; + 400: unknown; + 500: unknown; + }; + }; + }; + `; + + assertSchema(actual, expected); + }); + + it("response properties", () => { + const actual = { + "/contact": { + post: { + responses: { + 200: { + content: { + "application/json": { + schema: { + type: "object", + properties: { + lastName: { type: "string" }, + firstName: { type: "string" }, + age: { type: "integer" }, + }, + additionalProperties: false, + }, + }, + }, + }, + }, + }, + }, + }; + + const expected = ` + "/contact": { + post: { + responses: { + 200: { + content: { + "application/json": { + age?: number; + firstName?: string; + lastName?: string; + }; + }; + }; + } + } + } + `; + + assertSchema(actual, expected); + }); + }); }); diff --git a/test/core/request.test.js b/test/core/request.test.js index 30c3244ac..3058bf7d6 100644 --- a/test/core/request.test.js +++ b/test/core/request.test.js @@ -56,6 +56,63 @@ describe("requestBodies", () => { ); }); + it("basic (alphabetize)", () => { + const schema = { + SupportAnimal: { + description: "Support Animal request body", + content: { + "application/json": { + schema: { + type: "string", + }, + }, + }, + }, + Pet: { + description: "Pet request body", + content: { + "application/json": { + schema: { + type: "string", + }, + }, + }, + }, + Mount: { + description: "Mount request body", + content: { + "application/json": { + schema: { + type: "string", + }, + }, + }, + }, + }; + + const actual = format(transformRequestBodies(schema, { ...defaults, alphabetize: true, version: 2 })); + expect(actual).to.equal( + format(`/** Mount request body */ + Mount: { + content: { + "application/json": string; + }; + }; + /** Pet request body */ + Pet: { + content: { + "application/json": string; + }; + }; + /** Support Animal request body */ + SupportAnimal: { + content: { + "application/json": string; + }; + };`) + ); + }); + const schemaHyphen = { "Pet-example": { description: "Pet-example request body", diff --git a/test/core/schema.test.js b/test/core/schema.test.js index 6764389ba..3cbe70a1b 100644 --- a/test/core/schema.test.js +++ b/test/core/schema.test.js @@ -179,6 +179,57 @@ describe("SchemaObject", () => { ); }); + describe("alphabetize", () => { + it("object", () => { + const opts = { ...defaults, alphabetize: true }; + expect(transform(objStd, opts)).to.equal( + `{\n"object"?: {\n"number"?: components["schemas"]["object_ref"];\n"string"?: string;\n\n};\n\n}` + ); + expect(transform(objUnknown, opts)).to.equal(`{ [key: string]: unknown }`); + expect(transform({}, opts)).to.equal(`unknown`); + expect(transform(objNullable, opts)).to.equal(`({\n"string"?: string;\n\n}) | null`); + expect(transform(objRequired, opts)).to.equal(`{\n"optional"?: boolean;\n"required": string;\n\n}`); + }); + + it("array", () => { + const opts = { ...defaults, alphabetize: true }; + expect(transform({ type: "array", items: { type: "string" } }, opts)).to.equal(`(string)[]`); + expect(transform({ type: "array", items: { type: "number" } }, opts)).to.equal(`(number)[]`); + expect(transform({ type: "array", items: { type: "boolean" } }, opts)).to.equal(`(boolean)[]`); + expect( + transform( + { type: "array", items: { type: "array", items: { type: "array", items: { type: "number" } } } }, + opts + ) + ).to.equal(`(((number)[])[])[]`); + expect(transform({ type: "array", items: { $ref: 'components["schemas"]["ArrayItem"]' } }, opts)).to.equal( + `(components["schemas"]["ArrayItem"])[]` + ); + expect(transform({ items: { $ref: 'components["schemas"]["ArrayItem"]' } }, opts)).to.equal( + `(components["schemas"]["ArrayItem"])[]` + ); + expect(transform({ type: "array", items: { type: "string" }, nullable: true }, opts)).to.equal( + `((string)[]) | null` + ); + // enums should not be alphabetized, because the implicit order of the + // values can be significant. + expect(transform({ type: "array", items: { enum: ["vanilla", "chocolate"] } }, opts)).to.equal( + `(('vanilla') | ('chocolate'))[]` + ); + // non-enum arrays probably should be alphabetized but are not. It + // would take a more significant rewrite of schema.ts to make that + // possible, and I'm not sure that it makes much difference. Primary + // use-case for alphabetize is to ensure types are stable when checked + // into git. I doubt array declarations will shuffle positions, even + // when the docs are generated dynamically. + /* + expect(transform({ type: "array", items: [{ type: "string" }, { type: "number" }] }, opts)).to.equal( + `[number, string]` + ); + */ + }); + }); + it("enum", () => { const enumBasic = ["Totoro", "Sats'uki", "Mei"]; // note: also tests quotes in enum expect( diff --git a/test/v2/expected/falsey-example.alphabetized.ts b/test/v2/expected/falsey-example.alphabetized.ts deleted file mode 100644 index e38b5ff93..000000000 --- a/test/v2/expected/falsey-example.alphabetized.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - parameters: { - query: { - search: string - } - } - responses: { - 200: unknown - } - } - } -} - -export interface definitions { - TestSchema: { - /** - * @default 0 - * @example 0 - */ - count?: number - /** - * @default false - * @example false - */ - isEnabled?: boolean - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v2/expected/manifold.alphabetized.ts b/test/v2/expected/manifold.alphabetized.ts deleted file mode 100644 index 3780682c3..000000000 --- a/test/v2/expected/manifold.alphabetized.ts +++ /dev/null @@ -1,1114 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/internal/products': { - get: { - parameters: { - query: { - /** - * Base32 encoded 18 byte identifier of the provider that these - * products must belong to. - */ - provider_id?: string - /** Filter results to only include those that have this label. */ - label?: parameters['LabelFilter'] - /** Return only products matching at least one of the tags. */ - tags?: string[] - /** Return product listings without plan information */ - include_plans?: boolean - } - } - responses: { - /** A product. */ - 200: { - schema: definitions['ExpandedProduct'][] - } - /** Invalid provider_id supplied */ - 400: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/plans/': { - get: { - parameters: { - query: { - /** Return the plans that are associated with this product. */ - product_id: string[] - /** Filter results to only include those that have this label. */ - label?: parameters['LabelFilter'] - } - } - responses: { - /** A list of plans for the given product. */ - 200: { - schema: definitions['ExpandedPlan'][] - } - /** Invalid Parameters Provided */ - 400: { - schema: definitions['Error'] - } - /** Could not find product */ - 404: { - schema: definitions['Error'] - } - /** Unexpected error */ - 500: { - schema: definitions['Error'] - } - } - } - post: { - parameters: { - body: { - /** Plan create request */ - body: definitions['CreatePlan'] - } - } - responses: { - /** Complete plan object */ - 201: { - schema: definitions['Plan'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Forbidden */ - 403: { - schema: definitions['Error'] - } - /** Plan already exists with that label */ - 409: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/plans/{id}': { - get: { - parameters: { - path: { - /** - * ID of the plan to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** A plan. */ - 200: { - schema: definitions['ExpandedPlan'] - } - /** Invalid Plan ID Provided */ - 400: { - schema: definitions['Error'] - } - /** Unknown plan error */ - 404: { - schema: definitions['Error'] - } - /** Unexpected error */ - default: { - schema: definitions['Error'] - } - } - } - patch: { - parameters: { - path: { - /** - * ID of the plan to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - body: { - /** Plan update request */ - body: definitions['UpdatePlan'] - } - } - responses: { - /** Complete product plan */ - 200: { - schema: definitions['Plan'] - } - /** Invalid Plan ID */ - 400: { - schema: definitions['Error'] - } - /** Plan not found error */ - 404: { - schema: definitions['Error'] - } - /** Unexpected error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/products/': { - get: { - parameters: { - query: { - /** - * Base32 encoded 18 byte identifier of the provider that these - * products must belong to. - */ - provider_id?: string - /** Filter results to only include those that have this label. */ - label?: parameters['LabelFilter'] - /** Return only products matching at least one of the tags. */ - tags?: string[] - } - } - responses: { - /** A product. */ - 200: { - schema: definitions['Product'][] - } - /** Invalid provider_id supplied */ - 400: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - post: { - parameters: { - body: { - /** Product create request */ - body: definitions['CreateProduct'] - } - } - responses: { - /** Complete product object */ - 201: { - schema: definitions['Product'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Forbidden */ - 403: { - schema: definitions['Error'] - } - /** Product already exists with that label */ - 409: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/products/{id}': { - get: { - parameters: { - path: { - /** - * ID of the product to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** A product. */ - 200: { - schema: definitions['Product'] - } - /** Invalid Product ID */ - 400: { - schema: definitions['Error'] - } - /** Product not found error */ - 404: { - schema: definitions['Error'] - } - /** Unexpected error */ - 500: { - schema: definitions['Error'] - } - } - } - patch: { - parameters: { - path: { - /** - * ID of the product to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - body: { - /** Product update request */ - body: definitions['UpdateProduct'] - } - } - responses: { - /** Complete product object */ - 200: { - schema: definitions['Product'] - } - /** Invalid Product ID */ - 400: { - schema: definitions['Error'] - } - /** Product not found error */ - 404: { - schema: definitions['Error'] - } - /** Unexpected error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/providers/': { - get: { - parameters: { - query: { - /** Filter results to only include those that have this label. */ - label?: parameters['LabelFilter'] - } - } - responses: { - /** A list of providers. */ - 200: { - schema: definitions['Provider'][] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - post: { - parameters: { - body: { - /** Provider create request */ - body: definitions['CreateProvider'] - } - } - responses: { - /** Complete provider object */ - 201: { - schema: definitions['Provider'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Forbidden */ - 403: { - schema: definitions['Error'] - } - /** Provider already exists with that label */ - 409: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/providers/{id}': { - get: { - parameters: { - path: { - /** ID of the provider to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** A provider. */ - 200: { - schema: definitions['Provider'] - } - /** Unknown provider error */ - 404: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - patch: { - parameters: { - path: { - /** ID of the provider to update, stored as a base32 encoded 18 byte identifier. */ - id: string - } - body: { - /** Provider update request */ - body: definitions['UpdateProvider'] - } - } - responses: { - /** Complete provider object */ - 200: { - schema: definitions['Provider'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Forbidden */ - 403: { - schema: definitions['Error'] - } - /** Provider not found */ - 404: { - schema: definitions['Error'] - } - /** Provider already exists with that label */ - 409: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/regions/': { - get: { - parameters: { - query: { - /** Filter results to only include the regions that have this location. */ - location?: string - /** - * Filter results to only include the regions that are on this - * platform. - */ - platform?: string - } - } - responses: { - /** A list of regions. */ - 200: { - schema: definitions['Region'][] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - post: { - parameters: { - body: { - /** Region create request */ - body: definitions['CreateRegion'] - } - } - responses: { - /** Complete region object */ - 201: { - schema: definitions['Region'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Region already exists for that platform and location */ - 409: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } - '/regions/{id}': { - get: { - parameters: { - path: { - /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** A region. */ - 200: { - schema: definitions['Region'] - } - /** Provided Region ID is Invalid */ - 400: { - schema: definitions['Error'] - } - /** Region could not be found */ - 404: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - patch: { - parameters: { - path: { - /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - body: { - /** Region update request */ - body: definitions['UpdateRegion'] - } - } - responses: { - /** Complete region object */ - 200: { - schema: definitions['Region'] - } - /** Invalid request provided */ - 400: { - schema: definitions['Error'] - } - /** Unexpected Error */ - 500: { - schema: definitions['Error'] - } - } - } - } -} - -export interface definitions { - CreatePlan: { - body: definitions['PlanBody'] - } - CreateProduct: { - body: definitions['ProductBody'] - } - CreateProvider: { - body: definitions['ProviderBody'] - } - CreateRegion: { - body: definitions['RegionBody'] - } - /** @description Unexpected error */ - Error: { - /** @description Explanation of the errors */ - message: string[] - /** @description The error type */ - type: string - } - ExpandedFeature: definitions['FeatureType'] & { - value: definitions['FeatureValueDetails'] - /** @description The string value set for the feature on the plan, this should only be used if the value property is null. */ - value_string: string - } - ExpandedPlan: { - body: definitions['ExpandedPlanBody'] - id: definitions['ID'] - /** @enum {string} */ - type: 'plan' - /** @enum {integer} */ - version: 1 - } - ExpandedPlanBody: definitions['PlanBody'] & { - /** @description A boolean flag that indicates if a plan has customizable features. */ - customizable?: boolean - /** @description Plan cost using its default features plus base cost. */ - defaultCost?: number - /** @description An array of feature definitions for the plan, as defined on the Product. */ - expanded_features: definitions['ExpandedFeature'][] - /** @description A boolean flag that indicates if a plan is free or not based on it's cost and features. */ - free: boolean - } - ExpandedProduct: { - body: definitions['ProductBody'] - id: definitions['ID'] - plans?: definitions['ExpandedPlan'][] - provider: definitions['Provider'] - /** @enum {string} */ - type: 'product' - /** @enum {integer} */ - version: 1 - } - /** - * @description Optional container for additional details relating to numeric features. - * This is required if the feature is measurable and numeric. - */ - FeatureNumericDetails: { - cost_ranges?: definitions['FeatureNumericRange'][] - /** - * @description Sets the increment at which numbers can be selected if customizable, by - * default this is 1; for example, setting this to 8 would only allow integers - * in increments of 8 ( 0, 8, 16, ... ). This property is not used if the - * feature is measurable; except if it is set to 0, setting the increment to 0 - * means this numeric details has no scale, and will not be or customizable. - * Some plans may not have a measureable or customizable feature. - * - * @default 1 - */ - increment?: number - /** @description Maximum value that can be set by a user if customizable */ - max?: number - /** - * @description Minimum value that can be set by a user if customizable - * @default 0 - */ - min?: number - /** @description Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ - suffix?: string - } - FeatureNumericRange: { - /** - * @description An integer in 10,000,000ths of cents, will be multiplied by the - * numeric value set in the feature to determine the cost. - * - * @default 0 - */ - cost_multiple?: number - /** - * @description Defines the end of the range ( inclusive ), from the previous, or 0; - * where the cost_multiple starts taking effect. If set to -1 this defines the - * range to infinity, or the maximum integer the system can handle - * ( whichever comes first ). - */ - limit?: number - } - /** - * @description A feature type represents the different aspects of a product that are - * offered, these features can manifest differently depending on the plan. - */ - FeatureType: { - /** - * @description This sets whether or not the feature can be customized by a consumer. - * @default false - */ - customizable?: boolean - /** - * @description This sets whether or not the feature can be downgraded by the consumer after the - * resource has provisioned. Downgrading means setting a lower value or selecting a - * lower element in the list. - * - * @default false - */ - downgradable?: boolean - label: definitions['Label'] - /** - * @description Sets if this feature’s value is trackable from the provider, - * this only really affects numeric constraints. - * - * @default false - */ - measurable?: boolean - name: definitions['Name'] - /** @enum {string} */ - type: 'boolean' | 'string' | 'number' - /** - * @description This sets whether or not the feature can be upgraded by the consumer after the - * resource has provisioned. Upgrading means setting a higher value or selecting a - * higher element in the list. - * - * @default false - */ - upgradable?: boolean - values?: definitions['FeatureValuesList'] - } - FeatureValue: { - feature: definitions['Label'] - value: definitions['FeatureValueLabel'] - } - FeatureValueDetails: { - /** - * @description The cost that will be added to the monthly plan cost when this value - * is selected or is default for the plan. - * Cost is deprecated in favor of the `price.cost` field. - * - * @default 0 - */ - cost?: number - label: definitions['FeatureValueLabel'] - name: definitions['Name'] - numeric_details?: definitions['FeatureNumericDetails'] - /** - * @description Price describes the cost of a feature. It should be preferred over - * the `cost` property. - */ - price?: { - /** - * @description Cost is the price in cents that will be added to plan's base cost - * when this value is selected or is default for the plan. - * Number features should use the cost range instead. - * - * @default 0 - */ - cost?: number - /** @description Description explains how a feature is calculated to the user. */ - description?: string - /** - * @description Price describes how the feature cost should be calculated. - * - * @example { - * "feature_multiplies_base_cost": "(* plan#base_cost feature-a#multiply_factor)", - * "feature_multiplies_feature_cost": "(* feature-b#cost feature-a#multiply_factor)", - * "feature_multiplies_numeric_value": "(* feature-c#number feature-a#multiply_factor)", - * "feature_multiplies_total_cost": "(* plan#total_cost feature-a#multiply_factor)", - * "feature_nested_formulas": "(+ (- (* feature-a#cost feature-b#multiply_factor) 500) plan#partial_cost)" - * } - */ - formula?: definitions['PriceFormula'] - /** - * @description When a feature is used to multiply the cost of the plan or of - * another feature, multiply factor is used for calculation. - * A feature cannot have both a cost and a multiply factor. - * - * @default 0 - */ - multiply_factor?: number - } - } - /** @description A machine readable unique label, which is url safe. */ - FeatureValueLabel: string - /** - * @description A list of allowable values for the feature. - * To define values for a boolean feature type, only `true` is required, - * using the label `true`, name and numeric_details will be ignored. - * If the feature is set measurable it is expected that these all have a - * `numeric_details` definition, and the plan will determine which - * `numeric_details` set is used based on it's setting. - */ - FeatureValuesList: definitions['FeatureValueDetails'][] - /** @description A flexible identifier for internal or external entities. */ - FlexID: string - /** - * Format: base32ID - * @description A base32 encoded 18 byte identifier. - */ - ID: string - /** @description A machine readable unique label, which is url safe. */ - Label: string - /** @description A location of where a potential resource can be provisioned. */ - Location: string - /** - * Format: url - * @description Logo used for Provider and Product listings. - * - * Must be square (same width and height) and minimum 400px. Maximum of 800px. - */ - LogoURL: string - /** @description A name of an entity which is displayed to a human. */ - Name: string - /** @description A flexible identifier for internal or external entities. */ - OptionalFlexID: string - /** - * Format: base32ID - * @description A base32 encoded 18 byte identifier. - */ - OptionalID: string - /** @description A machine readable unique label, which is url safe. */ - OptionalLabel: string - /** - * Format: url - * @description Logo used for Provider and Product listings. - * - * Must be square (same width and height) and minimum 400px. Maximum of 800px. - */ - OptionalLogoURL: string - /** @description A name of an entity which is displayed to a human. */ - OptionalName: string - Plan: { - body: definitions['PlanBody'] - id: definitions['ID'] - /** @enum {string} */ - type: 'plan' - /** @enum {integer} */ - version: 1 - } - PlanBody: { - /** @description Dollar value in cents. */ - cost: number - /** @description Array of Feature Values */ - features: definitions['FeatureValue'][] - label: definitions['Label'] - name: definitions['Name'] - product_id: definitions['ID'] - provider_id: definitions['ID'] - /** @description Array of Region IDs */ - regions: definitions['ID'][] - resizable_to?: definitions['PlanResizeList'] - state: definitions['PlanState'] - /** - * @description The number of days a user gets as a free trial when subscribing to - * this plan. Trials are valid only once per product; changing plans - * or adding an additional subscription will not start a new trial. - */ - trial_days?: number - } - /** @description Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ - PlanResizeList: definitions['ID'][] - /** @enum {string} */ - PlanState: 'hidden' | 'available' | 'grandfathered' | 'unlisted' - /** @description A name of a platform which is used to provision resources. */ - Platform: string - /** - * @description Describes how a feature cost should be calculated. An empty - * string defaults to the normal price calculation using the value cost. - * Formula uses Reverse Polish notation for statements. It supports - * addition, subtraction and multiplication operations. Operations must be - * grouped with parenthesis. - * Number literals can be used for formulas. Eg: "(- feature-a#cost 500)" - * will remove 5 dollars from the cost of feature a. - * Multiplication operation supports either a cost multiplied by a - * factor or a number multiplied by a factor. - * In a plan formula the following keywords are available: - * - `plan#base_cost` is the base cost of a plan in cents - * - `plan#partial_cost` is the base cost plus its feature costs calculated - * so far. Feature formulas are calculated in the order they are defined, - * so features can refer to another feature values or the partial_cost of - * the plan. - * - `this-feature-label#multiply_factor` is the multiply_factor of this - * feature as a float number. - * - `another-feature-label#cost` is the cost of a feature matching the label - * in cents. - * - `another-feature-label#number` is the numeric value of a number feature - * In a feature formula, plan base cost and total cost cannot be used - */ - PriceFormula: string - Product: { - body: definitions['ProductBody'] - id: definitions['ID'] - /** @enum {string} */ - type: 'product' - /** @enum {integer} */ - version: 1 - } - ProductBody: { - billing: { - /** @enum {string} */ - currency: 'usd' - /** @enum {string} */ - type: 'monthly-prorated' | 'monthly-anniversary' | 'annual-anniversary' - } - /** Format: url */ - documentation_url: string - feature_types: definitions['FeatureType'][] - images: definitions['ProductImageURL'][] - integration: { - /** Format: url */ - base_url: string - features: definitions['ProductIntegrationFeatures'] - provisioning: definitions['ProductProvisioning'] - /** Format: url */ - sso_url?: string - /** @enum {string} */ - version: 'v1' - } - /** @description Product labels are globally unique and contain the provider name. */ - label: definitions['Label'] - listing: definitions['ProductListing'] - logo_url: definitions['LogoURL'] - name: definitions['Name'] - provider_id: definitions['ID'] - /** @description A list of getting started steps for the product */ - setup_steps?: string[] - state: definitions['ProductState'] - /** Format: email */ - support_email: string - /** @description 140 character sentence positioning the product. */ - tagline: string - tags?: definitions['ProductTags'] - /** - * @description URL to this Product's Terms of Service. If provided is true, then - * a url must be set. Otherwise, provided is false. - */ - terms: { - provided: boolean - /** Format: url */ - url?: string - } - /** @description A list of value propositions of the product. */ - value_props: definitions['ValueProp'][] - } - /** - * Format: url - * @description Image URL used for Product listings. - * - * Minimum 660px wide, 400px high. - */ - ProductImageURL: string - /** @default {} */ - ProductIntegrationFeatures: { - /** - * @description Indicates whether or not this product supports resource transitions to - * manifold by access_code. - */ - access_code?: boolean - /** - * @description Describes the credential type that is supported by this product. - * - * * `none`: The product does not support providing any credentials - * * `single`: Only one credential is supported at the same time. - * * `multiple`: Multiple credentials are supported at the same time. - * * `unknown`: The credential type is unknown. - * - * @default multiple - * @enum {string} - */ - credential?: 'none' | 'single' | 'multiple' | 'unknown' - /** - * @description Represents whether or not this product supports changing - * the plan of a resource. - */ - plan_change?: boolean - /** - * @description Describes how the region for a resource is specified, if - * unspecified, then regions have no impact on this - * resource. - * - * @enum {string} - */ - region?: 'user-specified' | 'unspecified' - /** - * @description Represents whether or not this product supports Single - * Sign On - */ - sso?: boolean - } - /** @default {} */ - ProductListing: { - /** - * @description When true, the product will be displayed in product listings alongside - * other products. When false the product will be excluded from listings, - * but can still be provisioned directly if it's label is known. - * Any pages that display information about the product when not listed, - * should indicate to webcrawlers that the content should not be indexed. - * - * @default false - */ - listed?: boolean - /** - * @description Object to hold various flags for marketing purposes only. These are values - * that need to be stored, but should not affect decision making in code. If - * we find ourselves in a position where we think they should, we should - * consider refactoring our listing definition. - * - * @default {} - */ - marketing?: { - /** - * @description Indicates whether or not the product is in `Beta` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - beta?: boolean - /** - * @description Indicates whether or not the product is in `New` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - featured?: boolean - /** - * @description Indicates whether or not the product is in `New` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - new?: boolean - } - /** - * @description When true, everyone can see the product when requested. When false it will - * not be visible to anyone except those on the provider team. - * - * @default false - */ - public?: boolean - } - /** - * @description Provider Only, implies that the product should only be provisionable by the - * provider; so members of the provider team, no one else should be allowed. - * Pre-Order, should not be used yet. But in the future it should allow people to - * pre-provision a resource for when it does go live. - * Public, means the resource is live and everyone should be able to provision it. - * - * @enum {string} - */ - ProductProvisioning: 'provider-only' | 'pre-order' | 'public' - /** @enum {string} */ - ProductState: 'available' | 'hidden' | 'grandfathered' | 'new' | 'upcoming' - /** @description List of tags for product categorization and search */ - ProductTags: definitions['Label'][] - Provider: { - body: definitions['ProviderBody'] - id: definitions['ID'] - /** @enum {string} */ - type: 'provider' - /** @enum {integer} */ - version: 1 - } - ProviderBody: { - /** Format: url */ - documentation_url?: string - label: definitions['Label'] - logo_url?: definitions['LogoURL'] - name: definitions['Name'] - owner_id?: definitions['OptionalFlexID'] - /** Format: email */ - support_email?: string - team_id?: definitions['OptionalID'] - } - Region: { - body: definitions['RegionBody'] - id: definitions['ID'] - /** @enum {string} */ - type: 'region' - /** @enum {integer} */ - version: 1 - } - RegionBody: { - location: definitions['Location'] - name: string - platform: definitions['Platform'] - priority: number - } - UpdatePlan: { - body: definitions['UpdatePlanBody'] - id: definitions['ID'] - } - UpdatePlanBody: { - /** @description Dollar value in cents */ - cost?: number - /** @description Array of Feature Values */ - features?: definitions['FeatureValue'][] - /** @description Used in conjuction with resizable_to to set or unset the list */ - has_resize_constraints?: boolean - label?: definitions['Label'] - name?: definitions['Name'] - /** @description Array of Region IDs */ - regions?: definitions['ID'][] - resizable_to?: definitions['PlanResizeList'] - state?: definitions['PlanState'] - /** - * @description The number of days a user gets as a free trial when subscribing to - * this plan. Trials are valid only once per product; changing plans - * or adding an additional subscription will not start a new trial. - */ - trial_days?: number - } - UpdateProduct: { - body: definitions['UpdateProductBody'] - id: definitions['ID'] - } - UpdateProductBody: { - /** Format: url */ - documentation_url?: string - feature_types?: definitions['FeatureType'][] - images?: definitions['ProductImageURL'][] - integration?: { - /** Format: url */ - base_url?: string - /** @default {} */ - features?: { - access_code?: boolean - /** - * @default multiple - * @enum {string} - */ - credential?: 'none' | 'single' | 'multiple' | 'unknown' - plan_change?: boolean - sso?: boolean - } - provisioning?: definitions['ProductProvisioning'] - /** Format: url */ - sso_url?: string - /** @enum {string} */ - version?: 'v1' - } - label?: definitions['Label'] - listing?: definitions['ProductListing'] - logo_url?: definitions['LogoURL'] - name?: definitions['Name'] - /** @description An array of platform ids to restrict this product for. */ - platform_ids?: definitions['ID'][] - /** @description A list of getting started steps for the product */ - setup_steps?: string[] - /** Format: email */ - support_email?: string - /** @description 140 character sentence positioning the product. */ - tagline?: string - tags?: definitions['ProductTags'] - /** - * @description URL to this Product's Terms of Service. If provided is true, then - * a url must be set. Otherwise, provided is false. - */ - terms_url?: string - /** @description A list of value propositions of the product. */ - value_props?: definitions['ValueProp'][] - } - UpdateProvider: { - body: definitions['UpdateProviderBody'] - id: definitions['ID'] - } - UpdateProviderBody: { - /** Format: url */ - documentation_url?: string - label?: definitions['OptionalLabel'] - logo_url?: definitions['OptionalLogoURL'] - name?: definitions['OptionalName'] - owner_id?: definitions['OptionalFlexID'] - /** Format: email */ - support_email?: string - team_id?: definitions['OptionalID'] - } - UpdateRegion: { - name: string - } - ValueProp: { - /** @description Body of a value proposition. */ - body: string - /** @description Heading of a value proposition. */ - header: string - } -} - -export interface parameters { - /** - * Format: label - * @description Filter results to only include those that have this label. - */ - LabelFilter: string -} - -export interface operations {} - -export interface external {} diff --git a/test/v2/expected/null-in-enum.alphabetized.ts b/test/v2/expected/null-in-enum.alphabetized.ts deleted file mode 100644 index dca956c09..000000000 --- a/test/v2/expected/null-in-enum.alphabetized.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - post: operations['addTest'] - } -} - -export interface definitions { - /** @description Enum with null and nullable */ - MyType: { - /** @enum {string|null} */ - myField?: ('foo' | 'bar' | null) | null - } - /** @description Enum with null */ - MyTypeMixed: { - /** @enum {string} */ - myField?: 'foo' | 2 | false | null - } - /** @description Enum with null */ - MyTypeNotNullable: { - /** @enum {string} */ - myField?: 'foo' | 'bar' | null - } - /** @description Enum with null */ - MyTypeNotNullableNotNull: { - /** @enum {string} */ - myField?: 'foo' | 'bar' - } -} - -export interface operations { - addTest: { - responses: { - /** OK */ - 200: unknown - } - } -} - -export interface external {} diff --git a/test/v2/expected/petstore.alphabetized.ts b/test/v2/expected/petstore.alphabetized.ts deleted file mode 100644 index 7e4348cfb..000000000 --- a/test/v2/expected/petstore.alphabetized.ts +++ /dev/null @@ -1,445 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/pet': { - put: operations['updatePet'] - post: operations['addPet'] - } - '/pet/{petId}': { - /** Returns a single pet */ - get: operations['getPetById'] - post: operations['updatePetWithForm'] - delete: operations['deletePet'] - } - '/pet/{petId}/uploadImage': { - post: operations['uploadFile'] - } - '/pet/findByStatus': { - /** Multiple status values can be provided with comma separated strings */ - get: operations['findPetsByStatus'] - } - '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - get: operations['findPetsByTags'] - } - '/store/inventory': { - /** Returns a map of status codes to quantities */ - get: operations['getInventory'] - } - '/store/order': { - post: operations['placeOrder'] - } - '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ - get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ - delete: operations['deleteOrder'] - } - '/user': { - /** This can only be done by the logged in user. */ - post: operations['createUser'] - } - '/user/{username}': { - get: operations['getUserByName'] - /** This can only be done by the logged in user. */ - put: operations['updateUser'] - /** This can only be done by the logged in user. */ - delete: operations['deleteUser'] - } - '/user/createWithArray': { - post: operations['createUsersWithArrayInput'] - } - '/user/createWithList': { - post: operations['createUsersWithListInput'] - } - '/user/login': { - get: operations['loginUser'] - } - '/user/logout': { - get: operations['logoutUser'] - } -} - -export interface definitions { - ApiResponse: { - /** Format: int32 */ - code?: number - message?: string - type?: string - } - Category: { - /** Format: int64 */ - id?: number - name?: string - } - Order: { - /** @default false */ - complete?: boolean - /** Format: int64 */ - id?: number - /** Format: int64 */ - petId?: number - /** Format: int32 */ - quantity?: number - /** Format: date-time */ - shipDate?: string - /** - * @description Order Status - * @enum {string} - */ - status?: 'placed' | 'approved' | 'delivered' - } - Pet: { - category?: definitions['Category'] - /** Format: int64 */ - id?: number - /** @example doggie */ - name: string - photoUrls: string[] - /** - * @description pet status in the store - * @enum {string} - */ - status?: 'available' | 'pending' | 'sold' - tags?: definitions['Tag'][] - } - Tag: { - /** Format: int64 */ - id?: number - name?: string - } - User: { - email?: string - firstName?: string - /** Format: int64 */ - id?: number - lastName?: string - password?: string - phone?: string - username?: string - /** - * Format: int32 - * @description User Status - */ - userStatus?: number - } -} - -export interface operations { - updatePet: { - parameters: { - body: { - /** Pet object that needs to be added to the store */ - body: definitions['Pet'] - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - /** Validation exception */ - 405: unknown - } - } - addPet: { - parameters: { - body: { - /** Pet object that needs to be added to the store */ - body: definitions['Pet'] - } - } - responses: { - /** Invalid input */ - 405: unknown - } - } - /** Returns a single pet */ - getPetById: { - parameters: { - path: { - /** ID of pet to return */ - petId: number - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['Pet'] - } - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - } - } - updatePetWithForm: { - parameters: { - path: { - /** ID of pet that needs to be updated */ - petId: number - } - formData: { - /** Updated name of the pet */ - name?: string - /** Updated status of the pet */ - status?: string - } - } - responses: { - /** Invalid input */ - 405: unknown - } - } - deletePet: { - parameters: { - header: { - api_key?: string - } - path: { - /** Pet id to delete */ - petId: number - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - } - } - uploadFile: { - parameters: { - path: { - /** ID of pet to update */ - petId: number - } - formData: { - /** Additional data to pass to server */ - additionalMetadata?: string - /** file to upload */ - file?: unknown - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['ApiResponse'] - } - } - } - /** Multiple status values can be provided with comma separated strings */ - findPetsByStatus: { - parameters: { - query: { - /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['Pet'][] - } - /** Invalid status value */ - 400: unknown - } - } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - findPetsByTags: { - parameters: { - query: { - /** Tags to filter by */ - tags: string[] - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['Pet'][] - } - /** Invalid tag value */ - 400: unknown - } - } - /** Returns a map of status codes to quantities */ - getInventory: { - parameters: {} - responses: { - /** successful operation */ - 200: { - schema: { [key: string]: number } - } - } - } - placeOrder: { - parameters: { - body: { - /** order placed for purchasing the pet */ - body: definitions['Order'] - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['Order'] - } - /** Invalid Order */ - 400: unknown - } - } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ - getOrderById: { - parameters: { - path: { - /** ID of pet that needs to be fetched */ - orderId: number - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['Order'] - } - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ - deleteOrder: { - parameters: { - path: { - /** ID of the order that needs to be deleted */ - orderId: number - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - createUser: { - parameters: { - body: { - /** Created user object */ - body: definitions['User'] - } - } - responses: { - /** successful operation */ - default: unknown - } - } - getUserByName: { - parameters: { - path: { - /** The name that needs to be fetched. Use user1 for testing. */ - username: string - } - } - responses: { - /** successful operation */ - 200: { - schema: definitions['User'] - } - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - updateUser: { - parameters: { - path: { - /** name that need to be updated */ - username: string - } - body: { - /** Updated user object */ - body: definitions['User'] - } - } - responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - deleteUser: { - parameters: { - path: { - /** The name that needs to be deleted */ - username: string - } - } - responses: { - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - createUsersWithArrayInput: { - parameters: { - body: { - /** List of user object */ - body: definitions['User'][] - } - } - responses: { - /** successful operation */ - default: unknown - } - } - createUsersWithListInput: { - parameters: { - body: { - /** List of user object */ - body: definitions['User'][] - } - } - responses: { - /** successful operation */ - default: unknown - } - } - loginUser: { - parameters: { - query: { - /** The user name for login */ - username: string - /** The password for login in clear text */ - password: string - } - } - responses: { - /** successful operation */ - 200: { - headers: {} - schema: string - } - /** Invalid username/password supplied */ - 400: unknown - } - } - logoutUser: { - parameters: {} - responses: { - /** successful operation */ - default: unknown - } - } -} - -export interface external {} diff --git a/test/v2/expected/reference-to-properties.alphabetized.ts b/test/v2/expected/reference-to-properties.alphabetized.ts deleted file mode 100644 index 050d2b3c7..000000000 --- a/test/v2/expected/reference-to-properties.alphabetized.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/pet': { - post: operations['addPet'] - } -} - -export interface definitions { - Pet: { - /** Format: int64 */ - id?: number - /** @example doggie */ - name: string - } -} - -export interface operations { - addPet: { - parameters: { - body: { - body: { - name?: definitions['Pet']['name'] - } - } - } - responses: { - 200: unknown - } - } -} - -export interface external {} diff --git a/test/v2/expected/stripe.alphabetized.ts b/test/v2/expected/stripe.alphabetized.ts deleted file mode 100644 index a9197b8d4..000000000 --- a/test/v2/expected/stripe.alphabetized.ts +++ /dev/null @@ -1,29467 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/v1/3d_secure': { - /**

Initiate 3D Secure authentication.

*/ - post: operations['Post3dSecure'] - } - '/v1/3d_secure/{three_d_secure}': { - /**

Retrieves a 3D Secure object.

*/ - get: operations['Get3dSecureThreeDSecure'] - } - '/v1/account': { - /**

Retrieves the details of an account.

*/ - get: operations['GetAccount'] - /** - *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - post: operations['PostAccount'] - /** - *

With Connect, you can delete Custom or Express accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - delete: operations['DeleteAccount'] - } - '/v1/account_links': { - /**

Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect their user to in order to take them through the Connect Onboarding flow.

*/ - post: operations['PostAccountLinks'] - } - '/v1/account/bank_accounts': { - /**

Create an external account for a given account.

*/ - post: operations['PostAccountBankAccounts'] - } - '/v1/account/bank_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountBankAccountsId'] - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountBankAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountBankAccountsId'] - } - '/v1/account/capabilities': { - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - get: operations['GetAccountCapabilities'] - } - '/v1/account/capabilities/{capability}': { - /**

Retrieves information about the specified Account Capability.

*/ - get: operations['GetAccountCapabilitiesCapability'] - /**

Updates an existing Account Capability.

*/ - post: operations['PostAccountCapabilitiesCapability'] - } - '/v1/account/external_accounts': { - /**

List external accounts for an account.

*/ - get: operations['GetAccountExternalAccounts'] - /**

Create an external account for a given account.

*/ - post: operations['PostAccountExternalAccounts'] - } - '/v1/account/external_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountExternalAccountsId'] - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountExternalAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountExternalAccountsId'] - } - '/v1/account/login_links': { - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - post: operations['PostAccountLoginLinks'] - } - '/v1/account/logout': { - /** - *

Invalidates all sessions for a light account, for a platform to use during platform logout.

- * - *

You may only log out Express accounts connected to your platform.

- */ - put: operations['PutAccountLogout'] - } - '/v1/account/people': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountPeople'] - /**

Creates a new person.

*/ - post: operations['PostAccountPeople'] - } - '/v1/account/people/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountPeoplePerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountPeoplePerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountPeoplePerson'] - } - '/v1/account/persons': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountPersons'] - /**

Creates a new person.

*/ - post: operations['PostAccountPersons'] - } - '/v1/account/persons/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountPersonsPerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountPersonsPerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountPersonsPerson'] - } - '/v1/accounts': { - /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ - get: operations['GetAccounts'] - /** - *

With Connect, you can create Stripe accounts for your users. - * To do this, you’ll first need to register your platform.

- * - *

For Standard accounts, parameters other than country, email, and type - * are used to prefill the account application that we ask the account holder to complete.

- */ - post: operations['PostAccounts'] - } - '/v1/accounts/{account}': { - /**

Retrieves the details of an account.

*/ - get: operations['GetAccountsAccount'] - /** - *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - post: operations['PostAccountsAccount'] - /** - *

With Connect, you can delete Custom or Express accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - delete: operations['DeleteAccountsAccount'] - } - '/v1/accounts/{account}/bank_accounts': { - /**

Create an external account for a given account.

*/ - post: operations['PostAccountsAccountBankAccounts'] - } - '/v1/accounts/{account}/bank_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountsAccountBankAccountsId'] - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountsAccountBankAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountsAccountBankAccountsId'] - } - '/v1/accounts/{account}/capabilities': { - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - get: operations['GetAccountsAccountCapabilities'] - } - '/v1/accounts/{account}/capabilities/{capability}': { - /**

Retrieves information about the specified Account Capability.

*/ - get: operations['GetAccountsAccountCapabilitiesCapability'] - /**

Updates an existing Account Capability.

*/ - post: operations['PostAccountsAccountCapabilitiesCapability'] - } - '/v1/accounts/{account}/external_accounts': { - /**

List external accounts for an account.

*/ - get: operations['GetAccountsAccountExternalAccounts'] - /**

Create an external account for a given account.

*/ - post: operations['PostAccountsAccountExternalAccounts'] - } - '/v1/accounts/{account}/external_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountsAccountExternalAccountsId'] - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountsAccountExternalAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountsAccountExternalAccountsId'] - } - '/v1/accounts/{account}/login_links': { - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - post: operations['PostAccountsAccountLoginLinks'] - } - '/v1/accounts/{account}/logout': { - /** - *

Invalidates all sessions for a light account, for a platform to use during platform logout.

- * - *

You may only log out Express accounts connected to your platform.

- */ - put: operations['PutAccountsAccountLogout'] - } - '/v1/accounts/{account}/people': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountsAccountPeople'] - /**

Creates a new person.

*/ - post: operations['PostAccountsAccountPeople'] - } - '/v1/accounts/{account}/people/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountsAccountPeoplePerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountsAccountPeoplePerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountsAccountPeoplePerson'] - } - '/v1/accounts/{account}/persons': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountsAccountPersons'] - /**

Creates a new person.

*/ - post: operations['PostAccountsAccountPersons'] - } - '/v1/accounts/{account}/persons/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountsAccountPersonsPerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountsAccountPersonsPerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountsAccountPersonsPerson'] - } - '/v1/accounts/{account}/reject': { - /** - *

With Connect, you may flag accounts as suspicious.

- * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

- */ - post: operations['PostAccountsAccountReject'] - } - '/v1/apple_pay/domains': { - /**

List apple pay domains.

*/ - get: operations['GetApplePayDomains'] - /**

Create an apple pay domain.

*/ - post: operations['PostApplePayDomains'] - } - '/v1/apple_pay/domains/{domain}': { - /**

Retrieve an apple pay domain.

*/ - get: operations['GetApplePayDomainsDomain'] - /**

Delete an apple pay domain.

*/ - delete: operations['DeleteApplePayDomainsDomain'] - } - '/v1/application_fees': { - /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ - get: operations['GetApplicationFees'] - } - '/v1/application_fees/{fee}/refunds/{id}': { - /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ - get: operations['GetApplicationFeesFeeRefundsId'] - /** - *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - post: operations['PostApplicationFeesFeeRefundsId'] - } - '/v1/application_fees/{id}': { - /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ - get: operations['GetApplicationFeesId'] - } - '/v1/application_fees/{id}/refund': { - post: operations['PostApplicationFeesIdRefund'] - } - '/v1/application_fees/{id}/refunds': { - /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - get: operations['GetApplicationFeesIdRefunds'] - /** - *

Refunds an application fee that has previously been collected but not yet refunded. - * Funds will be refunded to the Stripe account from which the fee was originally collected.

- * - *

You can optionally refund only part of an application fee. - * You can do so multiple times, until the entire fee has been refunded.

- * - *

Once entirely refunded, an application fee can’t be refunded again. - * This method will raise an error when called on an already-refunded application fee, - * or when trying to refund more money than is left on an application fee.

- */ - post: operations['PostApplicationFeesIdRefunds'] - } - '/v1/balance': { - /** - *

Retrieves the current account balance, based on the authentication that was used to make the request. - * For a sample request, see Accounting for negative balances.

- */ - get: operations['GetBalance'] - } - '/v1/balance_transactions': { - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - get: operations['GetBalanceTransactions'] - } - '/v1/balance_transactions/{id}': { - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - get: operations['GetBalanceTransactionsId'] - } - '/v1/balance/history': { - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - get: operations['GetBalanceHistory'] - } - '/v1/balance/history/{id}': { - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - get: operations['GetBalanceHistoryId'] - } - '/v1/billing_portal/sessions': { - /**

Creates a session of the self-serve Portal.

*/ - post: operations['PostBillingPortalSessions'] - } - '/v1/bitcoin/receivers': { - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - get: operations['GetBitcoinReceivers'] - } - '/v1/bitcoin/receivers/{id}': { - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - get: operations['GetBitcoinReceiversId'] - } - '/v1/bitcoin/receivers/{receiver}/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinReceiversReceiverTransactions'] - } - '/v1/bitcoin/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinTransactions'] - } - '/v1/charges': { - /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ - get: operations['GetCharges'] - /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ - post: operations['PostCharges'] - } - '/v1/charges/{charge}': { - /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ - get: operations['GetChargesCharge'] - /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostChargesCharge'] - } - '/v1/charges/{charge}/capture': { - /** - *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

- * - *

Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

- */ - post: operations['PostChargesChargeCapture'] - } - '/v1/charges/{charge}/dispute': { - /**

Retrieve a dispute for a specified charge.

*/ - get: operations['GetChargesChargeDispute'] - post: operations['PostChargesChargeDispute'] - } - '/v1/charges/{charge}/dispute/close': { - post: operations['PostChargesChargeDisputeClose'] - } - '/v1/charges/{charge}/refund': { - /** - *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

- * - *

Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged.

- * - *

You can optionally refund only part of a charge. - * You can do so multiple times, until the entire charge has been refunded.

- * - *

Once entirely refunded, a charge can’t be refunded again. - * This method will raise an error when called on an already-refunded charge, - * or when trying to refund more money than is left on a charge.

- */ - post: operations['PostChargesChargeRefund'] - } - '/v1/charges/{charge}/refunds': { - /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - get: operations['GetChargesChargeRefunds'] - /**

Create a refund.

*/ - post: operations['PostChargesChargeRefunds'] - } - '/v1/charges/{charge}/refunds/{refund}': { - /**

Retrieves the details of an existing refund.

*/ - get: operations['GetChargesChargeRefundsRefund'] - /**

Update a specified refund.

*/ - post: operations['PostChargesChargeRefundsRefund'] - } - '/v1/checkout/sessions': { - /**

Returns a list of Checkout Sessions.

*/ - get: operations['GetCheckoutSessions'] - /**

Creates a Session object.

*/ - post: operations['PostCheckoutSessions'] - } - '/v1/checkout/sessions/{session}': { - /**

Retrieves a Session object.

*/ - get: operations['GetCheckoutSessionsSession'] - } - '/v1/country_specs': { - /**

Lists all Country Spec objects available in the API.

*/ - get: operations['GetCountrySpecs'] - } - '/v1/country_specs/{country}': { - /**

Returns a Country Spec for a given Country code.

*/ - get: operations['GetCountrySpecsCountry'] - } - '/v1/coupons': { - /**

Returns a list of your coupons.

*/ - get: operations['GetCoupons'] - /** - *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

- * - *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

- */ - post: operations['PostCoupons'] - } - '/v1/coupons/{coupon}': { - /**

Retrieves the coupon with the given ID.

*/ - get: operations['GetCouponsCoupon'] - /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ - post: operations['PostCouponsCoupon'] - /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ - delete: operations['DeleteCouponsCoupon'] - } - '/v1/credit_notes': { - /**

Returns a list of credit notes.

*/ - get: operations['GetCreditNotes'] - /** - *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - * in any combination of the following:

- * - *
    - *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • - *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • - *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • - *
- * - *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

- * - *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount - * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

- */ - post: operations['PostCreditNotes'] - } - '/v1/credit_notes/{credit_note}/lines': { - /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetCreditNotesCreditNoteLines'] - } - '/v1/credit_notes/{id}': { - /**

Retrieves the credit note object with the given identifier.

*/ - get: operations['GetCreditNotesId'] - /**

Updates an existing credit note.

*/ - post: operations['PostCreditNotesId'] - } - '/v1/credit_notes/{id}/void': { - /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ - post: operations['PostCreditNotesIdVoid'] - } - '/v1/credit_notes/preview': { - /**

Get a preview of a credit note without creating it.

*/ - get: operations['GetCreditNotesPreview'] - } - '/v1/credit_notes/preview/lines': { - /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetCreditNotesPreviewLines'] - } - '/v1/customers': { - /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ - get: operations['GetCustomers'] - /**

Creates a new customer object.

*/ - post: operations['PostCustomers'] - } - '/v1/customers/{customer}': { - /**

Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.

*/ - get: operations['GetCustomersCustomer'] - /** - *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

- * - *

This request accepts mostly the same arguments as the customer creation call.

- */ - post: operations['PostCustomersCustomer'] - /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ - delete: operations['DeleteCustomersCustomer'] - } - '/v1/customers/{customer}/balance_transactions': { - /**

Returns a list of transactions that updated the customer’s balance.

*/ - get: operations['GetCustomersCustomerBalanceTransactions'] - /**

Creates an immutable transaction that updates the customer’s balance.

*/ - post: operations['PostCustomersCustomerBalanceTransactions'] - } - '/v1/customers/{customer}/balance_transactions/{transaction}': { - /**

Retrieves a specific transaction that updated the customer’s balance.

*/ - get: operations['GetCustomersCustomerBalanceTransactionsTransaction'] - /**

Most customer balance transaction fields are immutable, but you may update its description and metadata.

*/ - post: operations['PostCustomersCustomerBalanceTransactionsTransaction'] - } - '/v1/customers/{customer}/bank_accounts': { - /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ - get: operations['GetCustomersCustomerBankAccounts'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerBankAccounts'] - } - '/v1/customers/{customer}/bank_accounts/{id}': { - /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ - get: operations['GetCustomersCustomerBankAccountsId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerBankAccountsId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerBankAccountsId'] - } - '/v1/customers/{customer}/bank_accounts/{id}/verify': { - /**

Verify a specified bank account for a given customer.

*/ - post: operations['PostCustomersCustomerBankAccountsIdVerify'] - } - '/v1/customers/{customer}/cards': { - /** - *

You can see a list of the cards belonging to a customer. - * Note that the 10 most recent sources are always available on the Customer object. - * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

- */ - get: operations['GetCustomersCustomerCards'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerCards'] - } - '/v1/customers/{customer}/cards/{id}': { - /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ - get: operations['GetCustomersCustomerCardsId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerCardsId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerCardsId'] - } - '/v1/customers/{customer}/discount': { - get: operations['GetCustomersCustomerDiscount'] - /**

Removes the currently applied discount on a customer.

*/ - delete: operations['DeleteCustomersCustomerDiscount'] - } - '/v1/customers/{customer}/sources': { - /**

List sources for a specified customer.

*/ - get: operations['GetCustomersCustomerSources'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerSources'] - } - '/v1/customers/{customer}/sources/{id}': { - /**

Retrieve a specified source for a given customer.

*/ - get: operations['GetCustomersCustomerSourcesId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerSourcesId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerSourcesId'] - } - '/v1/customers/{customer}/sources/{id}/verify': { - /**

Verify a specified bank account for a given customer.

*/ - post: operations['PostCustomersCustomerSourcesIdVerify'] - } - '/v1/customers/{customer}/subscriptions': { - /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ - get: operations['GetCustomersCustomerSubscriptions'] - /**

Creates a new subscription on an existing customer.

*/ - post: operations['PostCustomersCustomerSubscriptions'] - } - '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}': { - /**

Retrieves the subscription with the given ID.

*/ - get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedId'] - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - post: operations['PostCustomersCustomerSubscriptionsSubscriptionExposedId'] - /** - *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedId'] - } - '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount': { - get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] - /**

Removes the currently applied discount on a customer.

*/ - delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] - } - '/v1/customers/{customer}/tax_ids': { - /**

Returns a list of tax IDs for a customer.

*/ - get: operations['GetCustomersCustomerTaxIds'] - /**

Creates a new TaxID object for a customer.

*/ - post: operations['PostCustomersCustomerTaxIds'] - } - '/v1/customers/{customer}/tax_ids/{id}': { - /**

Retrieves the TaxID object with the given identifier.

*/ - get: operations['GetCustomersCustomerTaxIdsId'] - /**

Deletes an existing TaxID object.

*/ - delete: operations['DeleteCustomersCustomerTaxIdsId'] - } - '/v1/disputes': { - /**

Returns a list of your disputes.

*/ - get: operations['GetDisputes'] - } - '/v1/disputes/{dispute}': { - /**

Retrieves the dispute with the given ID.

*/ - get: operations['GetDisputesDispute'] - /** - *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

- * - *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

- */ - post: operations['PostDisputesDispute'] - } - '/v1/disputes/{dispute}/close': { - /** - *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

- * - *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

- */ - post: operations['PostDisputesDisputeClose'] - } - '/v1/ephemeral_keys': { - /**

Creates a short-lived API key for a given resource.

*/ - post: operations['PostEphemeralKeys'] - } - '/v1/ephemeral_keys/{key}': { - /**

Invalidates a short-lived API key for a given resource.

*/ - delete: operations['DeleteEphemeralKeysKey'] - } - '/v1/events': { - /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ - get: operations['GetEvents'] - } - '/v1/events/{id}': { - /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ - get: operations['GetEventsId'] - } - '/v1/exchange_rates': { - /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ - get: operations['GetExchangeRates'] - } - '/v1/exchange_rates/{currency}': { - /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ - get: operations['GetExchangeRatesCurrency'] - } - '/v1/file_links': { - /**

Returns a list of file links.

*/ - get: operations['GetFileLinks'] - /**

Creates a new file link object.

*/ - post: operations['PostFileLinks'] - } - '/v1/file_links/{link}': { - /**

Retrieves the file link with the given ID.

*/ - get: operations['GetFileLinksLink'] - /**

Updates an existing file link object. Expired links can no longer be updated.

*/ - post: operations['PostFileLinksLink'] - } - '/v1/files': { - /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ - get: operations['GetFiles'] - /** - *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

- * - *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

- */ - post: operations['PostFiles'] - } - '/v1/files/{file}': { - /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ - get: operations['GetFilesFile'] - } - '/v1/invoiceitems': { - /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ - get: operations['GetInvoiceitems'] - /**

Creates an item to be added to a draft invoice. If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ - post: operations['PostInvoiceitems'] - } - '/v1/invoiceitems/{invoiceitem}': { - /**

Retrieves the invoice item with the given ID.

*/ - get: operations['GetInvoiceitemsInvoiceitem'] - /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ - post: operations['PostInvoiceitemsInvoiceitem'] - /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ - delete: operations['DeleteInvoiceitemsInvoiceitem'] - } - '/v1/invoices': { - /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ - get: operations['GetInvoices'] - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.

*/ - post: operations['PostInvoices'] - } - '/v1/invoices/{invoice}': { - /**

Retrieves the invoice with the given ID.

*/ - get: operations['GetInvoicesInvoice'] - /** - *

Draft invoices are fully editable. Once an invoice is finalized, - * monetary values, as well as collection_method, become uneditable.

- * - *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, - * sending reminders for, or automatically reconciling invoices, pass - * auto_advance=false.

- */ - post: operations['PostInvoicesInvoice'] - /**

Permanently deletes a draft invoice. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized, it must be voided.

*/ - delete: operations['DeleteInvoicesInvoice'] - } - '/v1/invoices/{invoice}/finalize': { - /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ - post: operations['PostInvoicesInvoiceFinalize'] - } - '/v1/invoices/{invoice}/lines': { - /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetInvoicesInvoiceLines'] - } - '/v1/invoices/{invoice}/mark_uncollectible': { - /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ - post: operations['PostInvoicesInvoiceMarkUncollectible'] - } - '/v1/invoices/{invoice}/pay': { - /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ - post: operations['PostInvoicesInvoicePay'] - } - '/v1/invoices/{invoice}/send': { - /** - *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

- * - *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

- */ - post: operations['PostInvoicesInvoiceSend'] - } - '/v1/invoices/{invoice}/void': { - /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ - post: operations['PostInvoicesInvoiceVoid'] - } - '/v1/invoices/upcoming': { - /** - *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.

- * - *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

- * - *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

- */ - get: operations['GetInvoicesUpcoming'] - } - '/v1/invoices/upcoming/lines': { - /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetInvoicesUpcomingLines'] - } - '/v1/issuer_fraud_records': { - /**

Returns a list of issuer fraud records.

*/ - get: operations['GetIssuerFraudRecords'] - } - '/v1/issuer_fraud_records/{issuer_fraud_record}': { - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - get: operations['GetIssuerFraudRecordsIssuerFraudRecord'] - } - '/v1/issuing/authorizations': { - /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingAuthorizations'] - } - '/v1/issuing/authorizations/{authorization}': { - /**

Retrieves an Issuing Authorization object.

*/ - get: operations['GetIssuingAuthorizationsAuthorization'] - /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingAuthorizationsAuthorization'] - } - '/v1/issuing/authorizations/{authorization}/approve': { - /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ - post: operations['PostIssuingAuthorizationsAuthorizationApprove'] - } - '/v1/issuing/authorizations/{authorization}/decline': { - /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ - post: operations['PostIssuingAuthorizationsAuthorizationDecline'] - } - '/v1/issuing/cardholders': { - /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingCardholders'] - /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ - post: operations['PostIssuingCardholders'] - } - '/v1/issuing/cardholders/{cardholder}': { - /**

Retrieves an Issuing Cardholder object.

*/ - get: operations['GetIssuingCardholdersCardholder'] - /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingCardholdersCardholder'] - } - '/v1/issuing/cards': { - /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingCards'] - /**

Creates an Issuing Card object.

*/ - post: operations['PostIssuingCards'] - } - '/v1/issuing/cards/{card}': { - /**

Retrieves an Issuing Card object.

*/ - get: operations['GetIssuingCardsCard'] - /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingCardsCard'] - } - '/v1/issuing/disputes': { - /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingDisputes'] - /**

Creates an Issuing Dispute object.

*/ - post: operations['PostIssuingDisputes'] - } - '/v1/issuing/disputes/{dispute}': { - /**

Retrieves an Issuing Dispute object.

*/ - get: operations['GetIssuingDisputesDispute'] - /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingDisputesDispute'] - } - '/v1/issuing/settlements': { - /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingSettlements'] - } - '/v1/issuing/settlements/{settlement}': { - /**

Retrieves an Issuing Settlement object.

*/ - get: operations['GetIssuingSettlementsSettlement'] - /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingSettlementsSettlement'] - } - '/v1/issuing/transactions': { - /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingTransactions'] - } - '/v1/issuing/transactions/{transaction}': { - /**

Retrieves an Issuing Transaction object.

*/ - get: operations['GetIssuingTransactionsTransaction'] - /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingTransactionsTransaction'] - } - '/v1/mandates/{mandate}': { - /**

Retrieves a Mandate object.

*/ - get: operations['GetMandatesMandate'] - } - '/v1/order_returns': { - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - get: operations['GetOrderReturns'] - } - '/v1/order_returns/{id}': { - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - get: operations['GetOrderReturnsId'] - } - '/v1/orders': { - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - get: operations['GetOrders'] - /**

Creates a new order object.

*/ - post: operations['PostOrders'] - } - '/v1/orders/{id}': { - /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ - get: operations['GetOrdersId'] - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostOrdersId'] - } - '/v1/orders/{id}/pay': { - /**

Pay an order by providing a source to create a payment.

*/ - post: operations['PostOrdersIdPay'] - } - '/v1/orders/{id}/returns': { - /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ - post: operations['PostOrdersIdReturns'] - } - '/v1/payment_intents': { - /**

Returns a list of PaymentIntents.

*/ - get: operations['GetPaymentIntents'] - /** - *

Creates a PaymentIntent object.

- * - *

After the PaymentIntent is created, attach a payment method and confirm - * to continue the payment. You can read more about the different payment flows - * available via the Payment Intents API here.

- * - *

When confirm=true is used during creation, it is equivalent to creating - * and confirming the PaymentIntent in the same call. You may use any parameters - * available in the confirm API when confirm=true - * is supplied.

- */ - post: operations['PostPaymentIntents'] - } - '/v1/payment_intents/{intent}': { - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - get: operations['GetPaymentIntentsIntent'] - /** - *

Updates properties on a PaymentIntent object without confirming.

- * - *

Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to - * update and confirm at the same time, we recommend updating properties via - * the confirm API instead.

- */ - post: operations['PostPaymentIntentsIntent'] - } - '/v1/payment_intents/{intent}/cancel': { - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status='requires_capture', the remaining amount_capturable will automatically be refunded.

- */ - post: operations['PostPaymentIntentsIntentCancel'] - } - '/v1/payment_intents/{intent}/capture': { - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled exactly seven days after they are created.

- * - *

Learn more about separate authorization and capture.

- */ - post: operations['PostPaymentIntentsIntentCapture'] - } - '/v1/payment_intents/{intent}/confirm': { - /** - *

Confirm that your customer intends to pay with current or provided - * payment method. Upon confirmation, the PaymentIntent will attempt to initiate - * a payment.

- * - *

If the selected payment method requires additional authentication steps, the - * PaymentIntent will transition to the requires_action status and - * suggest additional actions via next_action. If payment fails, - * the PaymentIntent will transition to the requires_payment_method status. If - * payment succeeds, the PaymentIntent will transition to the succeeded - * status (or requires_capture, if capture_method is set to manual).

- * - *

If the confirmation_method is automatic, payment may be attempted - * using our client SDKs - * and the PaymentIntent’s client_secret. - * After next_actions are handled by the client, no additional - * confirmation is required to complete the payment.

- * - *

If the confirmation_method is manual, all payment attempts must be - * initiated using a secret key. - * If any actions are required for the payment, the PaymentIntent will - * return to the requires_confirmation state - * after those actions are completed. Your server needs to then - * explicitly re-confirm the PaymentIntent to initiate the next payment - * attempt. Read the expanded documentation - * to learn more about manual confirmation.

- */ - post: operations['PostPaymentIntentsIntentConfirm'] - } - '/v1/payment_methods': { - /**

Returns a list of PaymentMethods for a given Customer

*/ - get: operations['GetPaymentMethods'] - /**

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

*/ - post: operations['PostPaymentMethods'] - } - '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ - get: operations['GetPaymentMethodsPaymentMethod'] - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - post: operations['PostPaymentMethodsPaymentMethod'] - } - '/v1/payment_methods/{payment_method}/attach': { - /** - *

Attaches a PaymentMethod object to a Customer.

- * - *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent - * or a PaymentIntent with setup_future_usage. - * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the - * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. - * See Optimizing cards for future payments for more information about setting up future payments.

- * - *

To use this PaymentMethod as the default for invoice or subscription payments, - * set invoice_settings.default_payment_method, - * on the Customer to the PaymentMethod’s ID.

- */ - post: operations['PostPaymentMethodsPaymentMethodAttach'] - } - '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ - post: operations['PostPaymentMethodsPaymentMethodDetach'] - } - '/v1/payouts': { - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - get: operations['GetPayouts'] - /** - *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

- * - *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

- * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

- */ - post: operations['PostPayouts'] - } - '/v1/payouts/{payout}': { - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - get: operations['GetPayoutsPayout'] - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - post: operations['PostPayoutsPayout'] - } - '/v1/payouts/{payout}/cancel': { - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - post: operations['PostPayoutsPayoutCancel'] - } - '/v1/plans': { - /**

Returns a list of your plans.

*/ - get: operations['GetPlans'] - /**

You can create plans using the API, or in the Stripe Dashboard.

*/ - post: operations['PostPlans'] - } - '/v1/plans/{plan}': { - /**

Retrieves the plan with the given ID.

*/ - get: operations['GetPlansPlan'] - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - post: operations['PostPlansPlan'] - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - delete: operations['DeletePlansPlan'] - } - '/v1/products': { - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - get: operations['GetProducts'] - /**

Creates a new product object.

*/ - post: operations['PostProducts'] - } - '/v1/products/{id}': { - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - get: operations['GetProductsId'] - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostProductsId'] - /**

Delete a product. Deleting a product with type=good is only possible if it has no SKUs associated with it. Deleting a product with type=service is only possible if it has no plans associated with it.

*/ - delete: operations['DeleteProductsId'] - } - '/v1/radar/early_fraud_warnings': { - /**

Returns a list of early fraud warnings.

*/ - get: operations['GetRadarEarlyFraudWarnings'] - } - '/v1/radar/early_fraud_warnings/{early_fraud_warning}': { - /** - *

Retrieves the details of an early fraud warning that has previously been created.

- * - *

Please refer to the early fraud warning object reference for more details.

- */ - get: operations['GetRadarEarlyFraudWarningsEarlyFraudWarning'] - } - '/v1/radar/value_list_items': { - /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetRadarValueListItems'] - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - post: operations['PostRadarValueListItems'] - } - '/v1/radar/value_list_items/{item}': { - /**

Retrieves a ValueListItem object.

*/ - get: operations['GetRadarValueListItemsItem'] - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - delete: operations['DeleteRadarValueListItemsItem'] - } - '/v1/radar/value_lists': { - /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetRadarValueLists'] - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - post: operations['PostRadarValueLists'] - } - '/v1/radar/value_lists/{value_list}': { - /**

Retrieves a ValueList object.

*/ - get: operations['GetRadarValueListsValueList'] - /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ - post: operations['PostRadarValueListsValueList'] - /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ - delete: operations['DeleteRadarValueListsValueList'] - } - '/v1/recipients': { - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - get: operations['GetRecipients'] - /** - *

Creates a new Recipient object and verifies the recipient’s identity. - * Also verifies the recipient’s bank account information or debit card, if either is provided.

- */ - post: operations['PostRecipients'] - } - '/v1/recipients/{id}': { - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - get: operations['GetRecipientsId'] - /** - *

Updates the specified recipient by setting the values of the parameters passed. - * Any parameters not provided will be left unchanged.

- * - *

If you update the name or tax ID, the identity verification will automatically be rerun. - * If you update the bank account, the bank account validation will automatically be rerun.

- */ - post: operations['PostRecipientsId'] - /**

Permanently deletes a recipient. It cannot be undone.

*/ - delete: operations['DeleteRecipientsId'] - } - '/v1/refunds': { - /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ - get: operations['GetRefunds'] - /**

Create a refund.

*/ - post: operations['PostRefunds'] - } - '/v1/refunds/{refund}': { - /**

Retrieves the details of an existing refund.

*/ - get: operations['GetRefundsRefund'] - /** - *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - post: operations['PostRefundsRefund'] - } - '/v1/reporting/report_runs': { - /**

Returns a list of Report Runs, with the most recent appearing first. (Requires a live-mode API key.)

*/ - get: operations['GetReportingReportRuns'] - /**

Creates a new object and begin running the report. (Requires a live-mode API key.)

*/ - post: operations['PostReportingReportRuns'] - } - '/v1/reporting/report_runs/{report_run}': { - /**

Retrieves the details of an existing Report Run. (Requires a live-mode API key.)

*/ - get: operations['GetReportingReportRunsReportRun'] - } - '/v1/reporting/report_types': { - /**

Returns a full list of Report Types. (Requires a live-mode API key.)

*/ - get: operations['GetReportingReportTypes'] - } - '/v1/reporting/report_types/{report_type}': { - /**

Retrieves the details of a Report Type. (Requires a live-mode API key.)

*/ - get: operations['GetReportingReportTypesReportType'] - } - '/v1/reviews': { - /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetReviews'] - } - '/v1/reviews/{review}': { - /**

Retrieves a Review object.

*/ - get: operations['GetReviewsReview'] - } - '/v1/reviews/{review}/approve': { - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - post: operations['PostReviewsReviewApprove'] - } - '/v1/setup_intents': { - /**

Returns a list of SetupIntents.

*/ - get: operations['GetSetupIntents'] - /** - *

Creates a SetupIntent object.

- * - *

After the SetupIntent is created, attach a payment method and confirm - * to collect any required permissions to charge the payment method later.

- */ - post: operations['PostSetupIntents'] - } - '/v1/setup_intents/{intent}': { - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - get: operations['GetSetupIntentsIntent'] - /**

Updates a SetupIntent object.

*/ - post: operations['PostSetupIntentsIntent'] - } - '/v1/setup_intents/{intent}/cancel': { - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - post: operations['PostSetupIntentsIntentCancel'] - } - '/v1/setup_intents/{intent}/confirm': { - /** - *

Confirm that your customer intends to set up the current or - * provided payment method. For example, you would confirm a SetupIntent - * when a customer hits the “Save” button on a payment method management - * page on your website.

- * - *

If the selected payment method does not require any additional - * steps from the customer, the SetupIntent will transition to the - * succeeded status.

- * - *

Otherwise, it will transition to the requires_action status and - * suggest additional actions via next_action. If setup fails, - * the SetupIntent will transition to the - * requires_payment_method status.

- */ - post: operations['PostSetupIntentsIntentConfirm'] - } - '/v1/sigma/scheduled_query_runs': { - /**

Returns a list of scheduled query runs.

*/ - get: operations['GetSigmaScheduledQueryRuns'] - } - '/v1/sigma/scheduled_query_runs/{scheduled_query_run}': { - /**

Retrieves the details of an scheduled query run.

*/ - get: operations['GetSigmaScheduledQueryRunsScheduledQueryRun'] - } - '/v1/skus': { - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - get: operations['GetSkus'] - /**

Creates a new SKU associated with a product.

*/ - post: operations['PostSkus'] - } - '/v1/skus/{id}': { - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - get: operations['GetSkusId'] - /** - *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

- */ - post: operations['PostSkusId'] - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - delete: operations['DeleteSkusId'] - } - '/v1/sources': { - /**

Creates a new source object.

*/ - post: operations['PostSources'] - } - '/v1/sources/{source}': { - /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ - get: operations['GetSourcesSource'] - /** - *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

- */ - post: operations['PostSourcesSource'] - } - '/v1/sources/{source}/mandate_notifications/{mandate_notification}': { - /**

Retrieves a new Source MandateNotification.

*/ - get: operations['GetSourcesSourceMandateNotificationsMandateNotification'] - } - '/v1/sources/{source}/source_transactions': { - /**

List source transactions for a given source.

*/ - get: operations['GetSourcesSourceSourceTransactions'] - } - '/v1/sources/{source}/source_transactions/{source_transaction}': { - /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ - get: operations['GetSourcesSourceSourceTransactionsSourceTransaction'] - } - '/v1/sources/{source}/verify': { - /**

Verify a given source.

*/ - post: operations['PostSourcesSourceVerify'] - } - '/v1/subscription_items': { - /**

Returns a list of your subscription items for a given subscription.

*/ - get: operations['GetSubscriptionItems'] - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - post: operations['PostSubscriptionItems'] - } - '/v1/subscription_items/{item}': { - /**

Retrieves the invoice item with the given ID.

*/ - get: operations['GetSubscriptionItemsItem'] - /**

Updates the plan or quantity of an item on a current subscription.

*/ - post: operations['PostSubscriptionItemsItem'] - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - delete: operations['DeleteSubscriptionItemsItem'] - } - '/v1/subscription_items/{subscription_item}/usage_record_summaries': { - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the billing plan’s month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - get: operations['GetSubscriptionItemsSubscriptionItemUsageRecordSummaries'] - } - '/v1/subscription_items/{subscription_item}/usage_records': { - /** - *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

- * - *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

- * - *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

- * - *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

- */ - post: operations['PostSubscriptionItemsSubscriptionItemUsageRecords'] - } - '/v1/subscription_schedules': { - /**

Retrieves the list of your subscription schedules.

*/ - get: operations['GetSubscriptionSchedules'] - /**

Creates a new subscription schedule object. Each customer can have up to 25 active or scheduled subscriptions.

*/ - post: operations['PostSubscriptionSchedules'] - } - '/v1/subscription_schedules/{schedule}': { - /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ - get: operations['GetSubscriptionSchedulesSchedule'] - /**

Updates an existing subscription schedule.

*/ - post: operations['PostSubscriptionSchedulesSchedule'] - } - '/v1/subscription_schedules/{schedule}/cancel': { - /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ - post: operations['PostSubscriptionSchedulesScheduleCancel'] - } - '/v1/subscription_schedules/{schedule}/release': { - /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ - post: operations['PostSubscriptionSchedulesScheduleRelease'] - } - '/v1/subscriptions': { - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - get: operations['GetSubscriptions'] - /**

Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.

*/ - post: operations['PostSubscriptions'] - } - '/v1/subscriptions/{subscription_exposed_id}': { - /**

Retrieves the subscription with the given ID.

*/ - get: operations['GetSubscriptionsSubscriptionExposedId'] - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - post: operations['PostSubscriptionsSubscriptionExposedId'] - /** - *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - delete: operations['DeleteSubscriptionsSubscriptionExposedId'] - } - '/v1/subscriptions/{subscription_exposed_id}/discount': { - /**

Removes the currently applied discount on a subscription.

*/ - delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] - } - '/v1/tax_rates': { - /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ - get: operations['GetTaxRates'] - /**

Creates a new tax rate.

*/ - post: operations['PostTaxRates'] - } - '/v1/tax_rates/{tax_rate}': { - /**

Retrieves a tax rate with the given ID

*/ - get: operations['GetTaxRatesTaxRate'] - /**

Updates an existing tax rate.

*/ - post: operations['PostTaxRatesTaxRate'] - } - '/v1/terminal/connection_tokens': { - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - post: operations['PostTerminalConnectionTokens'] - } - '/v1/terminal/locations': { - /**

Returns a list of Location objects.

*/ - get: operations['GetTerminalLocations'] - /**

Creates a new Location object.

*/ - post: operations['PostTerminalLocations'] - } - '/v1/terminal/locations/{location}': { - /**

Retrieves a Location object.

*/ - get: operations['GetTerminalLocationsLocation'] - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostTerminalLocationsLocation'] - /**

Deletes a Location object.

*/ - delete: operations['DeleteTerminalLocationsLocation'] - } - '/v1/terminal/readers': { - /**

Returns a list of Reader objects.

*/ - get: operations['GetTerminalReaders'] - /**

Creates a new Reader object.

*/ - post: operations['PostTerminalReaders'] - } - '/v1/terminal/readers/{reader}': { - /**

Retrieves a Reader object.

*/ - get: operations['GetTerminalReadersReader'] - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostTerminalReadersReader'] - /**

Deletes a Reader object.

*/ - delete: operations['DeleteTerminalReadersReader'] - } - '/v1/tokens': { - /** - *

Creates a single-use token that represents a bank account’s details. - * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

- */ - post: operations['PostTokens'] - } - '/v1/tokens/{token}': { - /**

Retrieves the token with the given ID.

*/ - get: operations['GetTokensToken'] - } - '/v1/topups': { - /**

Returns a list of top-ups.

*/ - get: operations['GetTopups'] - /**

Top up the balance of an account

*/ - post: operations['PostTopups'] - } - '/v1/topups/{topup}': { - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - get: operations['GetTopupsTopup'] - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - post: operations['PostTopupsTopup'] - } - '/v1/topups/{topup}/cancel': { - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - post: operations['PostTopupsTopupCancel'] - } - '/v1/transfers': { - /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ - get: operations['GetTransfers'] - /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ - post: operations['PostTransfers'] - } - '/v1/transfers/{id}/reversals': { - /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ - get: operations['GetTransfersIdReversals'] - /** - *

When you create a new reversal, you must specify a transfer to create it on.

- * - *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

- * - *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

- */ - post: operations['PostTransfersIdReversals'] - } - '/v1/transfers/{transfer}': { - /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ - get: operations['GetTransfersTransfer'] - /** - *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts only metadata as an argument.

- */ - post: operations['PostTransfersTransfer'] - } - '/v1/transfers/{transfer}/reversals/{id}': { - /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ - get: operations['GetTransfersTransferReversalsId'] - /** - *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata and description as arguments.

- */ - post: operations['PostTransfersTransferReversalsId'] - } - '/v1/webhook_endpoints': { - /**

Returns a list of your webhook endpoints.

*/ - get: operations['GetWebhookEndpoints'] - /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ - post: operations['PostWebhookEndpoints'] - } - '/v1/webhook_endpoints/{webhook_endpoint}': { - /**

Retrieves the webhook endpoint with the given ID.

*/ - get: operations['GetWebhookEndpointsWebhookEndpoint'] - /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ - post: operations['PostWebhookEndpointsWebhookEndpoint'] - /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ - delete: operations['DeleteWebhookEndpointsWebhookEndpoint'] - } -} - -export interface definitions { - /** - * Account - * @description This is an object representing a Stripe account. You can retrieve it to see - * properties on the account like its current e-mail address or if the account is - * enabled yet to make live charges. - * - * Some properties, marked below, are available only to platforms that want to - * [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts). - */ - account: { - business_profile?: definitions['account_business_profile'] - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - capabilities?: definitions['account_capabilities'] - /** @description Whether the account can create live charges. */ - charges_enabled?: boolean - company?: definitions['legal_entity_company'] - /** @description The account's country. */ - country?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created?: number - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** @description Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. */ - details_submitted?: boolean - /** @description The primary user's email address. */ - email?: string - /** - * ExternalAccountList - * @description External accounts (bank accounts and debit cards) currently attached to this account - */ - external_accounts?: { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: definitions['bank_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Unique identifier for the object. */ - id: string - individual?: definitions['person'] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account' - /** @description Whether Stripe can send payouts to this account. */ - payouts_enabled?: boolean - requirements?: definitions['account_requirements'] - settings?: definitions['account_settings'] - tos_acceptance?: definitions['account_tos_acceptance'] - /** - * @description The Stripe account type. Can be `standard`, `express`, or `custom`. - * @enum {string} - */ - type?: 'custom' | 'express' | 'standard' - } - /** AccountBrandingSettings */ - account_branding_settings: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. */ - icon?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. */ - logo?: string - /** @description A CSS hex color value representing the primary branding color for this account */ - primary_color?: string - /** @description A CSS hex color value representing the secondary branding color for this account */ - secondary_color?: string - } - /** AccountBusinessProfile */ - account_business_profile: { - /** @description [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. */ - mcc?: string - /** @description The customer-facing business name. */ - name?: string - /** @description Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ - product_description?: string - support_address?: definitions['address'] - /** @description A publicly available email address for sending support issues to. */ - support_email?: string - /** @description A publicly available phone number to call with support issues. */ - support_phone?: string - /** @description A publicly available website for handling support issues. */ - support_url?: string - /** @description The business's publicly available website. */ - url?: string - } - /** AccountCapabilities */ - account_capabilities: { - /** - * @description The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. - * @enum {string} - */ - au_becs_debit_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards - * @enum {string} - */ - card_issuing?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. - * @enum {string} - */ - card_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. - * @enum {string} - */ - jcb_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the legacy payments capability of the account. - * @enum {string} - */ - legacy_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the tax reporting 1099-K (US) capability of the account. - * @enum {string} - */ - tax_reporting_us_1099_k?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the tax reporting 1099-MISC (US) capability of the account. - * @enum {string} - */ - tax_reporting_us_1099_misc?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the transfers capability of the account, or whether your platform can transfer funds to the account. - * @enum {string} - */ - transfers?: 'active' | 'inactive' | 'pending' - } - /** AccountCapabilityRequirements */ - account_capability_requirements: { - /** @description The date the fields in `currently_due` must be collected by to keep the capability enabled for the account. */ - current_deadline?: number - /** @description The fields that need to be collected to keep the capability enabled. If not collected by the `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. */ - currently_due: string[] - /** @description If the capability is disabled, this string describes why. Possible values are `requirement.fields_needed`, `pending.onboarding`, `pending.review`, `rejected_fraud`, or `rejected.other`. */ - disabled_reason?: string - /** @description The fields that need to be collected again because validation or verification failed for some reason. */ - errors: definitions['account_requirements_error'][] - /** @description The fields that need to be collected assuming all volume thresholds are reached. As they become required, these fields appear in `currently_due` as well, and the `current_deadline` is set. */ - eventually_due: string[] - /** @description The fields that weren't collected by the `current_deadline`. These fields need to be collected to enable the capability for the account. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ - pending_verification: string[] - } - /** AccountCardPaymentsSettings */ - account_card_payments_settings: { - decline_on?: definitions['account_decline_charge_on'] - /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ - statement_descriptor_prefix?: string - } - /** AccountDashboardSettings */ - account_dashboard_settings: { - /** @description The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ - display_name?: string - /** @description The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). */ - timezone?: string - } - /** AccountDeclineChargeOn */ - account_decline_charge_on: { - /** @description Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. */ - avs_failure: boolean - /** @description Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. */ - cvc_failure: boolean - } - /** - * AccountLink - * @description Account Links are the means by which a Connect platform grants a connected account permission to access - * Stripe-hosted applications, such as Connect Onboarding. - * - * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding). - */ - account_link: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The timestamp at which this account link will expire. */ - expires_at: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account_link' - /** @description The URL for the account link. */ - url: string - } - /** AccountPaymentsSettings */ - account_payments_settings: { - /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. */ - statement_descriptor?: string - /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) */ - statement_descriptor_kana?: string - /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ - statement_descriptor_kanji?: string - } - /** AccountPayoutSettings */ - account_payout_settings: { - /** @description A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `true` for Express accounts and `false` for Custom accounts. */ - debit_negative_balances: boolean - schedule: definitions['transfer_schedule'] - /** @description The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. */ - statement_descriptor?: string - } - /** AccountRequirements */ - account_requirements: { - /** @description The date the fields in `currently_due` must be collected by to keep payouts enabled for the account. These fields might block payouts sooner if the next threshold is reached before these fields are collected. */ - current_deadline?: number - /** @description The fields that need to be collected to keep the account enabled. If not collected by the `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ - currently_due?: string[] - /** @description If the account is disabled, this string describes why the account can’t create charges or receive payouts. Can be `requirements.past_due`, `requirements.pending_verification`, `rejected.fraud`, `rejected.terms_of_service`, `rejected.listed`, `rejected.other`, `listed`, `under_review`, or `other`. */ - disabled_reason?: string - /** @description The fields that need to be collected again because validation or verification failed for some reason. */ - errors?: definitions['account_requirements_error'][] - /** @description The fields that need to be collected assuming all volume thresholds are reached. As they become required, these fields appear in `currently_due` as well, and the `current_deadline` is set. */ - eventually_due?: string[] - /** @description The fields that weren't collected by the `current_deadline`. These fields need to be collected to re-enable the account. */ - past_due?: string[] - /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ - pending_verification?: string[] - } - /** AccountRequirementsError */ - account_requirements_error: { - /** - * @description The code for the type of error. - * @enum {string} - */ - code: - | 'invalid_address_city_state_postal_code' - | 'invalid_street_address' - | 'invalid_value_other' - | 'verification_document_address_mismatch' - | 'verification_document_address_missing' - | 'verification_document_corrupt' - | 'verification_document_country_not_supported' - | 'verification_document_dob_mismatch' - | 'verification_document_duplicate_type' - | 'verification_document_expired' - | 'verification_document_failed_copy' - | 'verification_document_failed_greyscale' - | 'verification_document_failed_other' - | 'verification_document_failed_test_mode' - | 'verification_document_fraudulent' - | 'verification_document_id_number_mismatch' - | 'verification_document_id_number_missing' - | 'verification_document_incomplete' - | 'verification_document_invalid' - | 'verification_document_manipulated' - | 'verification_document_missing_back' - | 'verification_document_missing_front' - | 'verification_document_name_mismatch' - | 'verification_document_name_missing' - | 'verification_document_nationality_mismatch' - | 'verification_document_not_readable' - | 'verification_document_not_uploaded' - | 'verification_document_photo_mismatch' - | 'verification_document_too_large' - | 'verification_document_type_not_supported' - | 'verification_failed_address_match' - | 'verification_failed_business_iec_number' - | 'verification_failed_document_match' - | 'verification_failed_id_number_match' - | 'verification_failed_keyed_identity' - | 'verification_failed_keyed_match' - | 'verification_failed_name_match' - | 'verification_failed_other' - /** @description An informative message that indicates the error type and provides additional details about the error. */ - reason: string - /** @description The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ - requirement: string - } - /** AccountSettings */ - account_settings: { - branding: definitions['account_branding_settings'] - card_payments: definitions['account_card_payments_settings'] - dashboard: definitions['account_dashboard_settings'] - payments: definitions['account_payments_settings'] - payouts?: definitions['account_payout_settings'] - } - /** AccountTOSAcceptance */ - account_tos_acceptance: { - /** @description The Unix timestamp marking when the Stripe Services Agreement was accepted by the account representative */ - date?: number - /** @description The IP address from which the Stripe Services Agreement was accepted by the account representative */ - ip?: string - /** @description The user agent of the browser from which the Stripe Services Agreement was accepted by the account representative */ - user_agent?: string - } - /** Address */ - address: { - /** @description City, district, suburb, town, or village. */ - city?: string - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description Address line 1 (e.g., street, PO Box, or company name). */ - line1?: string - /** @description Address line 2 (e.g., apartment, suite, unit, or building). */ - line2?: string - /** @description ZIP or postal code. */ - postal_code?: string - /** @description State, county, province, or region. */ - state?: string - } - /** AlipayAccount */ - alipay_account: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: string - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } - /** APIErrors */ - api_errors: { - /** @description For card errors, the ID of the failed charge. */ - charge?: string - /** @description For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ - code?: string - /** @description For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. */ - decline_code?: string - /** @description A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ - doc_url?: string - /** @description A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ - message?: string - /** @description If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */ - param?: string - payment_intent?: definitions['payment_intent'] - payment_method?: definitions['payment_method'] - setup_intent?: definitions['setup_intent'] - source?: definitions['bank_account'] - /** - * @description The type of error returned. One of `api_connection_error`, `api_error`, `authentication_error`, `card_error`, `idempotency_error`, `invalid_request_error`, or `rate_limit_error` - * @enum {string} - */ - type: - | 'api_connection_error' - | 'api_error' - | 'authentication_error' - | 'card_error' - | 'idempotency_error' - | 'invalid_request_error' - | 'rate_limit_error' - } - /** ApplePayDomain */ - apple_pay_domain: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - domain_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'apple_pay_domain' - } - /** Application */ - application: { - /** @description Unique identifier for the object. */ - id: string - /** @description The name of the application. */ - name?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'application' - } - /** PlatformFee */ - application_fee: { - /** @description ID of the Stripe account this fee was taken from. */ - account: string - /** @description Amount earned, in %s. */ - amount: number - /** @description Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ - amount_refunded: number - /** @description ID of the Connect application that earned the fee. */ - application: string - /** @description Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ - balance_transaction?: string - /** @description ID of the charge that the application fee was taken from. */ - charge: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'application_fee' - /** @description ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ - originating_transaction?: string - /** @description Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ - refunded: boolean - /** - * FeeRefundList - * @description A list of refunds that have been applied to the fee. - */ - refunds: { - /** @description Details about each object. */ - data: definitions['fee_refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** - * Balance - * @description This is an object representing your Stripe balance. You can retrieve it to see - * the balance currently on your Stripe account. - * - * You can also retrieve the balance history, which contains a list of - * [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance - * (charges, payouts, and so forth). - * - * The available and pending amounts for each currency are broken down further by - * payment source types. - * - * Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). - */ - balance: { - /** @description Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property. */ - available: definitions['balance_amount'][] - /** @description Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property. */ - connect_reserved?: definitions['balance_amount'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'balance' - /** @description Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. */ - pending: definitions['balance_amount'][] - } - /** BalanceAmount */ - balance_amount: { - /** @description Balance amount. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - source_types?: definitions['balance_amount_by_source_type'] - } - /** BalanceAmountBySourceType */ - balance_amount_by_source_type: { - /** @description Amount for bank account. */ - bank_account?: number - /** @description Amount for card. */ - card?: number - /** @description Amount for FPX. */ - fpx?: number - } - /** - * BalanceTransaction - * @description Balance transactions represent funds moving through your Stripe account. - * They're created for every type of transaction that comes into or flows out of your Stripe account balance. - * - * Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types). - */ - balance_transaction: { - /** @description Gross amount of the transaction, in %s. */ - amount: number - /** @description The date the transaction's net funds will become available in the Stripe balance. */ - available_on: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. */ - exchange_rate?: number - /** @description Fees (in %s) paid for this transaction. */ - fee: number - /** @description Detailed breakdown of fees (in %s) paid for this transaction. */ - fee_details: definitions['fee'][] - /** @description Unique identifier for the object. */ - id: string - /** @description Net amount of the transaction, in %s. */ - net: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'balance_transaction' - /** @description [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. */ - reporting_category: string - /** @description The Stripe object to which this transaction is related. */ - source?: string - /** @description If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ - status: string - /** - * @description Transaction type: `adjustment`, `advance`, `advance_funding`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. - * @enum {string} - */ - type: - | 'adjustment' - | 'advance' - | 'advance_funding' - | 'application_fee' - | 'application_fee_refund' - | 'charge' - | 'connect_collection_transfer' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_transaction' - | 'payment' - | 'payment_failure_refund' - | 'payment_refund' - | 'payout' - | 'payout_cancel' - | 'payout_failure' - | 'refund' - | 'refund_failure' - | 'reserve_transaction' - | 'reserved_funds' - | 'stripe_fee' - | 'stripe_fx_fee' - | 'tax_fee' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_cancel' - | 'transfer_failure' - | 'transfer_refund' - } - /** - * BankAccount - * @description These bank accounts are payment methods on `Customer` objects. - * - * On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer - * destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). - * They can be bank accounts or debit cards as well, and are documented in the links above. - * - * Related guide: [Processing ACH & Bank Transfers](https://stripe.com/docs/payments/ach-bank-transfers). - */ - bank_account: { - /** @description The ID of the account that the bank account is associated with. */ - account?: string - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** @description The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: string - /** @description Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ - bank_name?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country: string - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency: string - /** @description The ID of the customer that the bank account is associated with. */ - customer?: string - /** @description Whether this bank account is the default external account for its currency. */ - default_for_currency?: boolean - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Unique identifier for the object. */ - id: string - /** @description The last four digits of the bank account number. */ - last4: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - /** @description The routing transit number for the bank account. */ - routing_number?: string - /** - * @description For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. - * - * For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. - */ - status: string - } - /** billing_details */ - billing_details: { - address?: definitions['address'] - /** @description Email address. */ - email?: string - /** @description Full name. */ - name?: string - /** @description Billing phone number (including extension). */ - phone?: string - } - /** - * PortalSession - * @description A Session describes the instantiation of the self-serve portal for - * a particular customer. By visiting the self-serve portal's URL, the customer - * can manage their subscriptions and view their invoice payment history. For security reasons, - * Sessions are short-lived and will expire if the customer does not visit the URL. - * Create Sessions on-demand. - * - * Related guide: [self-serve Portal](https://stripe.com/docs/billing/subscriptions/integrating-self-serve). - */ - 'billing_portal.session': { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The ID of the customer for this session. */ - customer: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'billing_portal.session' - /** @description The URL to which Stripe should send customers when they click on the link to return to your website. */ - return_url: string - /** @description The short-lived URL of the session giving customers access to the self-serve portal. */ - url: string - } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: definitions['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean - } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } - /** - * AccountCapability - * @description This is an object representing a capability for a Stripe account. - * - * Related guide: [Capabilities Overview](https://stripe.com/docs/connect/capabilities-overview). - */ - capability: { - /** @description The account for which the capability enables functionality. */ - account: string - /** @description The identifier for the capability. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'capability' - /** @description Whether the capability has been requested. */ - requested: boolean - /** @description Time at which the capability was requested. Measured in seconds since the Unix epoch. */ - requested_at?: number - requirements?: definitions['account_capability_requirements'] - /** - * @description The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. - * @enum {string} - */ - status: 'active' | 'disabled' | 'inactive' | 'pending' | 'unrequested' - } - /** - * Card - * @description You can store multiple cards on a customer in order to charge the customer - * later. You can also store multiple debit cards on a recipient in order to - * transfer to those cards later. - * - * Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards). - */ - card: { - /** @description The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. */ - account?: string - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_zip_check?: string - /** @description A set of available payout methods for this card. Will be either `["standard"]` or `["standard", "instant"]`. Only values from this set should be passed as the `method` when creating a transfer. */ - available_payout_methods?: ('instant' | 'standard')[] - /** @description Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ - brand: string - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string - currency?: string - /** @description The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. */ - customer?: string - /** @description If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ - cvc_check?: string - /** @description Whether this card is the default external account for its currency. */ - default_for_currency?: boolean - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ - fingerprint?: string - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding: string - /** @description Unique identifier for the object. */ - id: string - /** @description The last four digits of the card. */ - last4: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description Cardholder name. */ - name?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: string - /** @description If the card number is tokenized, this is the method that was used. Can be `amex_express_checkout`, `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ - tokenization_method?: string - } - /** card_mandate_payment_method_details */ - card_mandate_payment_method_details: { [key: string]: unknown } - /** - * Charge - * @description To charge a credit or a debit card, you create a `Charge` object. You can - * retrieve and refund individual charges as well as list all charges. Charges - * are identified by a unique, random ID. - * - * Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). - */ - charge: { - /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ - amount_refunded: number - /** @description ID of the Connect application that created the charge. */ - application?: string - /** @description The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ - application_fee?: string - /** @description The amount of the application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ - application_fee_amount?: number - /** @description ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ - balance_transaction?: string - billing_details: definitions['billing_details'] - /** @description The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. */ - calculated_statement_descriptor?: string - /** @description If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ - captured: boolean - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the customer this charge is for if one exists. */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Whether the charge has been disputed. */ - disputed: boolean - /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ - failure_code?: string - /** @description Message to user further explaining reason for charge failure if available. */ - failure_message?: string - fraud_details?: definitions['charge_fraud_details'] - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice this charge is for if one exists. */ - invoice?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'charge' - /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ - on_behalf_of?: string - /** @description ID of the order this charge is for if one exists. */ - order?: string - outcome?: definitions['charge_outcome'] - /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ - paid: boolean - /** @description ID of the PaymentIntent associated with this charge, if one exists. */ - payment_intent?: string - /** @description ID of the payment method used in this charge. */ - payment_method?: string - payment_method_details?: definitions['payment_method_details'] - /** @description This is the email address that the receipt for this charge was sent to. */ - receipt_email?: string - /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ - receipt_number?: string - /** @description This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. */ - receipt_url?: string - /** @description Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ - refunded: boolean - /** - * RefundList - * @description A list of refunds that have been applied to the charge. - */ - refunds: { - /** @description Details about each object. */ - data: definitions['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description ID of the review associated with this charge if one exists. */ - review?: string - shipping?: definitions['shipping'] - /** @description The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ - source_transfer?: string - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** @description The status of the payment is either `succeeded`, `pending`, or `failed`. */ - status: string - /** @description ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ - transfer?: string - transfer_data?: definitions['charge_transfer_data'] - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - /** ChargeFraudDetails */ - charge_fraud_details: { - /** @description Assessments from Stripe. If set, the value is `fraudulent`. */ - stripe_report?: string - /** @description Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ - user_report?: string - } - /** ChargeOutcome */ - charge_outcome: { - /** @description Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. */ - network_status?: string - /** @description An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. */ - reason?: string - /** @description Stripe's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. */ - risk_level?: string - /** @description Stripe's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. */ - risk_score?: number - /** @description The ID of the Radar rule that matched the payment, if applicable. */ - rule?: string - /** @description A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ - seller_message?: string - /** @description Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. */ - type: string - } - /** ChargeTransferData */ - charge_transfer_data: { - /** @description The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ - amount?: number - /** @description ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ - destination: string - } - /** checkout_session_custom_display_item_description */ - checkout_session_custom_display_item_description: { - /** @description The description of the line item. */ - description?: string - /** @description The images of the line item. */ - images?: string[] - /** @description The name of the line item. */ - name: string - } - /** checkout_session_display_item */ - checkout_session_display_item: { - /** @description Amount for the display item. */ - amount?: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - custom?: definitions['checkout_session_custom_display_item_description'] - plan?: definitions['plan'] - /** @description Quantity of the display item being purchased. */ - quantity?: number - sku?: definitions['sku'] - /** @description The type of display item. One of `custom`, `plan` or `sku` */ - type?: string - } - /** - * Session - * @description A Checkout Session represents your customer's session as they pay for - * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout). - * We recommend creating a new Session each time your customer attempts to pay. - * - * Once payment is successful, the Checkout Session will contain a reference - * to the [Customer](https://stripe.com/docs/api/customers), and either the successful - * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active - * [Subscription](https://stripe.com/docs/api/subscriptions). - * - * You can create a Checkout Session on your server and pass its ID to the - * client to begin Checkout. - * - * Related guide: [Checkout Server Quickstart](https://stripe.com/docs/payments/checkout/api). - */ - 'checkout.session': { - /** - * @description The value (`auto` or `required`) for whether Checkout collected the - * customer's billing address. - */ - billing_address_collection?: string - /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string - /** - * @description A unique string to reference the Checkout Session. This can be a - * customer ID, a cart ID, or similar, and can be used to reconcile the - * session with your internal systems. - */ - client_reference_id?: string - /** - * @description The ID of the customer for this session. - * For Checkout Sessions in `payment` or `subscription` mode, Checkout - * will create a new customer object based on information provided - * during the session unless an existing customer was provided when - * the session was created. - */ - customer?: string - /** - * @description If provided, this value will be used when the Customer object is created. - * If not provided, customers will be asked to enter their email address. - * Use this parameter to prefill customer data if you already have an email - * on file. To access information about the customer once a session is - * complete, use the `customer` field. - */ - customer_email?: string - /** @description The line items, plans, or SKUs purchased by the customer. */ - display_items?: definitions['checkout_session_display_item'][] - /** - * @description Unique identifier for the object. Used to pass to `redirectToCheckout` - * in Stripe.js. - */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - * @enum {string} - */ - locale?: 'auto' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'it' | 'ja' | 'ms' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'sv' | 'zh' - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. - * @enum {string} - */ - mode?: 'payment' | 'setup' | 'subscription' - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'checkout.session' - /** @description The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ - payment_intent?: string - /** - * @description A list of the types of payment methods (e.g. card) this Checkout - * Session is allowed to accept. - */ - payment_method_types: string[] - /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - setup_intent?: string - shipping?: definitions['shipping'] - shipping_address_collection?: definitions['payment_pages_payment_page_resources_shipping_address_collection'] - /** - * @description Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - * in `subscription` or `setup` mode. - * @enum {string} - */ - submit_type?: 'auto' | 'book' | 'donate' | 'pay' - /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ - subscription?: string - /** - * @description The URL the customer will be directed to after the payment or - * subscription creation is successful. - */ - success_url: string - } - /** ConnectCollectionTransfer */ - connect_collection_transfer: { - /** @description Amount transferred, in %s. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the account that funds are being collected for. */ - destination: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'connect_collection_transfer' - } - /** - * CountrySpec - * @description Stripe needs to collect certain pieces of information about each account - * created. These requirements can differ depending on the account's country. The - * Country Specs API makes these rules available to your integration. - * - * You can also view the information from this API call as [an online - * guide](/docs/connect/required-verification-information). - */ - country_spec: { - /** @description The default currency for this country. This applies to both payment methods and bank accounts. */ - default_currency: string - /** @description Unique identifier for the object. Represented as the ISO country code for this country. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'country_spec' - /** @description Currencies that can be accepted in the specific country (for transfers). */ - supported_bank_account_currencies: { [key: string]: unknown } - /** @description Currencies that can be accepted in the specified country (for payments). */ - supported_payment_currencies: string[] - /** @description Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). */ - supported_payment_methods: string[] - /** @description Countries that can accept transfers from the specified country. */ - supported_transfer_countries: string[] - verification_fields: definitions['country_spec_verification_fields'] - } - /** CountrySpecVerificationFieldDetails */ - country_spec_verification_field_details: { - /** @description Additional fields which are only required for some users. */ - additional: string[] - /** @description Fields which every account must eventually provide. */ - minimum: string[] - } - /** CountrySpecVerificationFields */ - country_spec_verification_fields: { - company: definitions['country_spec_verification_field_details'] - individual: definitions['country_spec_verification_field_details'] - } - /** - * Coupon - * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). - */ - coupon: { - /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ - amount_off?: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ - currency?: string - /** - * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. - * @enum {string} - */ - duration: 'forever' | 'once' | 'repeating' - /** @description If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ - duration_in_months?: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ - max_redemptions?: number - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description Name of the coupon displayed to customers on for instance invoices or receipts. */ - name?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'coupon' - /** @description Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. */ - percent_off?: number - /** @description Date after which the coupon can no longer be redeemed. */ - redeem_by?: number - /** @description Number of times this coupon has been applied to a customer. */ - times_redeemed: number - /** @description Taking account of the above properties, whether this coupon can still be applied to a customer. */ - valid: boolean - } - /** - * CreditNote - * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. - * - * Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes). - */ - credit_note: { - /** @description The integer amount in **%s** representing the total amount of the credit note, including tax. */ - amount: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the customer. */ - customer: string - /** @description Customer balance transaction related to this credit note. */ - customer_balance_transaction?: string - /** @description The integer amount in **%s** representing the amount of the discount that was credited. */ - discount_amount: number - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice. */ - invoice: string - /** - * CreditNoteLinesList - * @description Line items that make up the credit note - */ - lines: { - /** @description Details about each object. */ - data: definitions['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Customer-facing text that appears on the credit note PDF. */ - memo?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ - number: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'credit_note' - /** @description Amount that was credited outside of Stripe. */ - out_of_band_amount?: number - /** @description The link to download the PDF of the credit note. */ - pdf: string - /** - * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - * @enum {string} - */ - reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' - /** @description Refund related to this credit note. */ - refund?: string - /** - * @description Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). - * @enum {string} - */ - status: 'issued' | 'void' - /** @description The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ - subtotal: number - /** @description The aggregate amounts calculated per tax rate for all line items. */ - tax_amounts: definitions['credit_note_tax_amount'][] - /** @description The integer amount in **%s** representing the total amount of the credit note, including tax and discount. */ - total: number - /** - * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. - * @enum {string} - */ - type: 'post_payment' | 'pre_payment' - /** @description The time that the credit note was voided. */ - voided_at?: number - } - /** CreditNoteLineItem */ - credit_note_line_item: { - /** @description The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ - amount: number - /** @description Description of the item being credited. */ - description?: string - /** @description The integer amount in **%s** representing the discount being credited for this line item. */ - discount_amount: number - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice line item being credited */ - invoice_line_item?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'credit_note_line_item' - /** @description The number of units of product being credited. */ - quantity?: number - /** @description The amount of tax calculated per tax rate for this line item */ - tax_amounts: definitions['credit_note_tax_amount'][] - /** @description The tax rates which apply to the line item. */ - tax_rates: definitions['tax_rate'][] - /** - * @description The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. - * @enum {string} - */ - type: 'custom_line_item' | 'invoice_line_item' - /** @description The cost of each unit of product being credited. */ - unit_amount?: number - /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ - unit_amount_decimal?: string - } - /** CreditNoteTaxAmount */ - credit_note_tax_amount: { - /** @description The amount, in %s, of the tax. */ - amount: number - /** @description Whether this tax amount is inclusive or exclusive. */ - inclusive: boolean - /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: string - } - /** - * Customer - * @description `Customer` objects allow you to perform recurring charges, and to track - * multiple charges, that are associated with the same customer. The API allows - * you to create, delete, and update your customers. You can retrieve individual - * customers as well as a list of all your customers. - * - * Related guide: [Saving Cards with Customers](https://stripe.com/docs/saving-cards). - */ - customer: { - address?: definitions['address'] - /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ - balance?: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. */ - currency?: string - /** - * @description ID of the default payment source for the customer. - * - * If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. - */ - default_source?: string - /** @description When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge is failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice is not paid by its due date. */ - delinquent?: boolean - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - discount?: definitions['discount'] - /** @description The customer's email address. */ - email?: string - /** @description Unique identifier for the object. */ - id: string - /** @description The prefix for the customer used to generate unique invoice numbers. */ - invoice_prefix?: string - invoice_settings?: definitions['invoice_setting_customer_setting'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** @description The customer's full name or business name. */ - name?: string - /** @description The suffix of the customer's next invoice number, e.g., 0001. */ - next_invoice_sequence?: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer' - /** @description The customer's phone number. */ - phone?: string - /** @description The customer's preferred locales (languages), ordered by preference. */ - preferred_locales?: string[] - shipping?: definitions['shipping'] - /** - * ApmsSourcesSourceList - * @description The customer's payment sources, if any. - */ - sources: { - /** @description Details about each object. */ - data: definitions['alipay_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * SubscriptionList - * @description The customer's current subscriptions, if any. - */ - subscriptions?: { - /** @description Details about each object. */ - data: definitions['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * @description Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. - * @enum {string} - */ - tax_exempt?: 'exempt' | 'none' | 'reverse' - /** - * TaxIDsList - * @description The customer's tax IDs. - */ - tax_ids?: { - /** @description Details about each object. */ - data: definitions['tax_id'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** customer_acceptance */ - customer_acceptance: { - /** @description The time at which the customer accepted the Mandate. */ - accepted_at?: number - offline?: definitions['offline_acceptance'] - online?: definitions['online_acceptance'] - /** - * @description The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - * @enum {string} - */ - type: 'offline' | 'online' - } - /** - * CustomerBalanceTransaction - * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, - * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. - * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), - * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. - * - * Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. - */ - customer_balance_transaction: { - /** @description The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. */ - amount: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The ID of the credit note (if any) related to the transaction. */ - credit_note?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of the customer the transaction belongs to. */ - customer: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. */ - ending_balance: number - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the invoice (if any) related to the transaction. */ - invoice?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer_balance_transaction' - /** - * @description Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. - * @enum {string} - */ - type: - | 'adjustment' - | 'applied_to_invoice' - | 'credit_note' - | 'initial' - | 'invoice_too_large' - | 'invoice_too_small' - | 'migration' - | 'unapplied_from_invoice' - | 'unspent_receiver_credit' - } - /** DeletedAccount */ - deleted_account: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account' - } - /** AlipayDeletedAccount */ - deleted_alipay_account: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'apple_pay_domain' - } - /** DeletedBankAccount */ - deleted_bank_account: { - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency?: string - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } - /** DeletedCard */ - deleted_card: { - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency?: string - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'card' - } - /** DeletedCoupon */ - deleted_coupon: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'coupon' - } - /** DeletedCustomer */ - deleted_customer: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer' - } - /** DeletedDiscount */ - deleted_discount: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'discount' - } - /** Polymorphic */ - deleted_external_account: { - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency?: string - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - } - /** DeletedInvoice */ - deleted_invoice: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoice' - } - /** DeletedInvoiceItem */ - deleted_invoiceitem: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoiceitem' - } - /** Polymorphic */ - deleted_payment_source: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - } - /** DeletedPerson */ - deleted_person: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'person' - } - /** DeletedPlan */ - deleted_plan: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'plan' - } - /** DeletedProduct */ - deleted_product: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'product' - } - /** RadarListDeletedList */ - 'deleted_radar.value_list': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list' - } - /** RadarListDeletedListItem */ - 'deleted_radar.value_list_item': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list_item' - } - /** DeletedTransferRecipient */ - deleted_recipient: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'recipient' - } - /** DeletedSKU */ - deleted_sku: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'sku' - } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_item' - } - /** deleted_tax_id */ - deleted_tax_id: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_id' - } - /** TerminalLocationDeletedLocation */ - 'deleted_terminal.location': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.location' - } - /** TerminalReaderDeletedReader */ - 'deleted_terminal.reader': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.reader' - } - /** NotificationWebhookEndpointDeleted */ - deleted_webhook_endpoint: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'webhook_endpoint' - } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } - /** - * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. - * - * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). - */ - discount: { - coupon: definitions['coupon'] - /** @description The ID of the customer associated with this discount. */ - customer?: string - /** @description If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. */ - end?: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'discount' - /** @description Date that the coupon was applied. */ - start: number - /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ - subscription?: string - } - /** - * Dispute - * @description A dispute occurs when a customer questions your charge with their card issuer. - * When this happens, you're given the opportunity to respond to the dispute with - * evidence that shows that the charge is legitimate. You can find more - * information about the dispute process in our [Disputes and - * Fraud](/docs/disputes) documentation. - * - * Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). - */ - dispute: { - /** @description Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). */ - amount: number - /** @description List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ - balance_transactions: definitions['balance_transaction'][] - /** @description ID of the charge that was disputed. */ - charge: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - evidence: definitions['dispute_evidence'] - evidence_details: definitions['dispute_evidence_details'] - /** @description Unique identifier for the object. */ - id: string - /** @description If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. */ - is_charge_refundable: boolean - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'dispute' - /** @description ID of the PaymentIntent that was disputed. */ - payment_intent?: string - /** @description Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ - reason: string - /** - * @description Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. - * @enum {string} - */ - status: - | 'charge_refunded' - | 'lost' - | 'needs_response' - | 'under_review' - | 'warning_closed' - | 'warning_needs_response' - | 'warning_under_review' - | 'won' - } - /** DisputeEvidence */ - dispute_evidence: { - /** @description Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. */ - access_activity_log?: string - /** @description The billing address provided by the customer. */ - billing_address?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - cancellation_policy?: string - /** @description An explanation of how and when the customer was shown your refund policy prior to purchase. */ - cancellation_policy_disclosure?: string - /** @description A justification for why the customer's subscription was not canceled. */ - cancellation_rebuttal?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. */ - customer_communication?: string - /** @description The email address of the customer. */ - customer_email_address?: string - /** @description The name of the customer. */ - customer_name?: string - /** @description The IP address that the customer used when making the purchase. */ - customer_purchase_ip?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - customer_signature?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. */ - duplicate_charge_documentation?: string - /** @description An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ - duplicate_charge_explanation?: string - /** @description The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ - duplicate_charge_id?: string - /** @description A description of the product or service that was sold. */ - product_description?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. */ - receipt?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - refund_policy?: string - /** @description Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ - refund_policy_disclosure?: string - /** @description A justification for why the customer is not entitled to a refund. */ - refund_refusal_explanation?: string - /** @description The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ - service_date?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. */ - service_documentation?: string - /** @description The address to which a physical product was shipped. You should try to include as complete address information as possible. */ - shipping_address?: string - /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. */ - shipping_carrier?: string - /** @description The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ - shipping_date?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. */ - shipping_documentation?: string - /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ - shipping_tracking_number?: string - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - uncategorized_file?: string - /** @description Any additional evidence or statements. */ - uncategorized_text?: string - } - /** DisputeEvidenceDetails */ - dispute_evidence_details: { - /** @description Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute. */ - due_by?: number - /** @description Whether evidence has been staged for this dispute. */ - has_evidence: boolean - /** @description Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. */ - past_due: boolean - /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ - submission_count: number - } - /** EphemeralKey */ - ephemeral_key: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Time at which the key will expire. Measured in seconds since the Unix epoch. */ - expires: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'ephemeral_key' - /** @description The key's secret. You can use this value to make authorized requests to the Stripe API. */ - secret?: string - } - /** @description An error response from the Stripe API */ - error: { - error: definitions['api_errors'] - } - /** - * NotificationEvent - * @description Events are our way of letting you know when something interesting happens in - * your account. When an interesting event occurs, we create a new `Event` - * object. For example, when a charge succeeds, we create a `charge.succeeded` - * event; and when an invoice payment attempt fails, we create an - * `invoice.payment_failed` event. Note that many API requests may cause multiple - * events to be created. For example, if you create a new subscription for a - * customer, you will receive both a `customer.subscription.created` event and a - * `charge.succeeded` event. - * - * Events occur when the state of another API resource changes. The state of that - * resource at the time of the change is embedded in the event's data field. For - * example, a `charge.succeeded` event will contain a charge, and an - * `invoice.payment_failed` event will contain an invoice. - * - * As with other API resources, you can use endpoints to retrieve an - * [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) - * from the API. We also have a separate - * [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the - * `Event` objects directly to an endpoint on your server. Webhooks are managed - * in your - * [account settings](https://dashboard.stripe.com/account/webhooks'), - * and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up. - * - * When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of - * events that occur in connected accounts. For these events, there will be an - * additional `account` attribute in the received `Event` object. - * - * **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is - * guaranteed only for 30 days. - */ - event: { - /** @description The connected account that originated the event. */ - account?: string - /** @description The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*. */ - api_version?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - data: definitions['notification_event_data'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'event' - /** @description Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ - pending_webhooks: number - request?: definitions['notification_event_request'] - /** @description Description of the event (e.g., `invoice.created` or `charge.refunded`). */ - type: string - } - /** - * ExchangeRate - * @description `Exchange Rate` objects allow you to determine the rates that Stripe is - * currently using to convert from one currency to another. Since this number is - * variable throughout the day, there are various reasons why you might want to - * know the current rate (for example, to dynamically price an item for a user - * with a default payment in a foreign currency). - * - * If you want a guarantee that the charge is made with a certain exchange rate - * you expect is current, you can pass in `exchange_rate` to charges endpoints. - * If the value is no longer up to date, the charge won't go through. Please - * refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more - * details. - */ - exchange_rate: { - /** @description Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'exchange_rate' - /** @description Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. */ - rates: { [key: string]: unknown } - } - /** Polymorphic */ - external_account: { - /** @description The ID of the account that the bank account is associated with. */ - account?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country: string - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency: string - /** @description The ID of the customer that the bank account is associated with. */ - customer?: string - /** @description Whether this bank account is the default external account for its currency. */ - default_for_currency?: boolean - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Unique identifier for the object. */ - id: string - /** @description The last four digits of the bank account number. */ - last4: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - } - /** Fee */ - fee: { - /** @description Amount of the fee, in cents. */ - amount: number - /** @description ID of the Connect application that earned the fee. */ - application?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ - type: string - } - /** - * FeeRefund - * @description `Application Fee Refund` objects allow you to refund an application fee that - * has previously been created but not yet refunded. Funds will be refunded to - * the Stripe account from which the fee was originally collected. - * - * Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). - */ - fee_refund: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the application fee that was refunded. */ - fee: string - /** @description Unique identifier for the object. */ - id: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'fee_refund' - } - /** - * File - * @description This is an object representing a file hosted on Stripe's servers. The - * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) - * request (for example, when uploading dispute evidence) or it may have - * been created by Stripe (for example, the results of a [Sigma scheduled - * query](#scheduled_queries)). - * - * Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). - */ - file: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description A filename for the file, suitable for saving to a filesystem. */ - filename?: string - /** @description Unique identifier for the object. */ - id: string - /** - * FileFileLinkList - * @description A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. - */ - links?: { - /** @description Details about each object. */ - data: definitions['file_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'file' - /** @description The purpose of the file. Possible values are `additional_verification`, `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document`, `pci_document`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ - purpose: string - /** @description The size in bytes of the file object. */ - size: number - /** @description A user friendly title for the document. */ - title?: string - /** @description The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). */ - type?: string - /** @description The URL from which the file can be downloaded using your live secret API key. */ - url?: string - } - /** - * FileLink - * @description To share the contents of a `File` object with non-Stripe users, you can - * create a `FileLink`. `FileLink`s contain a URL that can be used to - * retrieve the contents of the file without authentication. - */ - file_link: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Whether this link is already expired. */ - expired: boolean - /** @description Time at which the link expires. */ - expires_at?: number - /** @description The file object this link points to. */ - file: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'file_link' - /** @description The publicly accessible URL to download the file. */ - url?: string - } - /** FinancialReportingFinanceReportRunRunParameters */ - financial_reporting_finance_report_run_run_parameters: { - /** @description The set of output columns requested for inclusion in the report run. */ - columns?: string[] - /** @description Connected account ID by which to filter the report run. */ - connected_account?: string - /** @description Currency of objects to be included in the report run. */ - currency?: string - /** @description Ending timestamp of data to be included in the report run (exclusive). */ - interval_end?: number - /** @description Starting timestamp of data to be included in the report run. */ - interval_start?: number - /** @description Payout ID by which to filter the report run. */ - payout?: string - /** @description Category of balance transactions to be included in the report run. */ - reporting_category?: string - /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ - timezone?: string - } - /** Inventory */ - inventory: { - /** @description The count of inventory available. Will be present if and only if `type` is `finite`. */ - quantity?: number - /** @description Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`. */ - type: string - /** @description An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - value?: string - } - /** - * Invoice - * @description Invoices are statements of amounts owed by a customer, and are either - * generated one-off, or generated periodically from a subscription. - * - * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments - * that may be caused by subscription upgrades/downgrades (if necessary). - * - * If your invoice is configured to be billed through automatic charges, - * Stripe automatically finalizes your invoice and attempts payment. Note - * that finalizing the invoice, - * [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does - * not happen immediately as the invoice is created. Stripe waits - * until one hour after the last webhook was successfully sent (or the last - * webhook timed out after failing). If you (and the platforms you may have - * connected to) have no webhooks configured, Stripe waits one hour after - * creation to finalize the invoice. - * - * If your invoice is configured to be billed by sending an email, then based on your - * [email settings](https://dashboard.stripe.com/account/billing/automatic'), - * Stripe will email the invoice to your customer and await payment. These - * emails can contain a link to a hosted page to pay the invoice. - * - * Stripe applies any customer credit on the account before determining the - * amount due for the invoice (i.e., the amount that will be actually - * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge - * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the - * invoice is automatically marked paid, and we add the amount due to the - * customer's running account balance which is applied to the next invoice. - * - * More details on the customer's account balance are - * [here](https://stripe.com/docs/api/customers/object#customer_object-account_balance). - * - * Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending). - */ - invoice: { - /** @description The country of the business associated with this invoice, most often the business creating the invoice. */ - account_country?: string - /** @description The public name of the business associated with this invoice, most often the business creating the invoice. */ - account_name?: string - /** @description Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. */ - amount_due: number - /** @description The amount, in %s, that was paid. */ - amount_paid: number - /** @description The amount remaining, in %s, that is due. */ - amount_remaining: number - /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ - application_fee_amount?: number - /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ - attempt_count: number - /** @description Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. */ - attempted: boolean - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - /** - * @description Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. - * @enum {string} - */ - billing_reason?: - | 'automatic_pending_invoice_item_invoice' - | 'manual' - | 'subscription' - | 'subscription_create' - | 'subscription_cycle' - | 'subscription_threshold' - | 'subscription_update' - | 'upcoming' - /** @description ID of the latest charge generated for this invoice, if any. */ - charge?: string - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Custom fields displayed on the invoice. */ - custom_fields?: definitions['invoice_setting_custom_field'][] - /** @description The ID of the customer who will be billed. */ - customer: string - customer_address?: definitions['address'] - /** @description The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. */ - customer_email?: string - /** @description The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. */ - customer_name?: string - /** @description The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. */ - customer_phone?: string - customer_shipping?: definitions['shipping'] - /** - * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. - * @enum {string} - */ - customer_tax_exempt?: 'exempt' | 'none' | 'reverse' - /** @description The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. */ - customer_tax_ids?: definitions['invoices_resource_invoice_tax_id'][] - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string - /** @description The tax rates applied to this invoice, if any. */ - default_tax_rates?: definitions['tax_rate'][] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string - discount?: definitions['discount'] - /** @description The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. */ - due_date?: number - /** @description Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. */ - ending_balance?: number - /** @description Footer displayed on the invoice. */ - footer?: string - /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ - hosted_invoice_url?: string - /** @description Unique identifier for the object. */ - id?: string - /** @description The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ - invoice_pdf?: string - /** - * InvoiceLinesList - * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. - */ - lines: { - /** @description Details about each object. */ - data: definitions['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** @description The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. */ - next_payment_attempt?: number - /** @description A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. */ - number?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoice' - /** @description Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ - paid: boolean - /** @description The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ - payment_intent?: string - /** @description End of the usage period during which invoice items were added to this invoice. */ - period_end: number - /** @description Start of the usage period during which invoice items were added to this invoice. */ - period_start: number - /** @description Total amount of all post-payment credit notes issued for this invoice. */ - post_payment_credit_notes_amount: number - /** @description Total amount of all pre-payment credit notes issued for this invoice. */ - pre_payment_credit_notes_amount: number - /** @description This is the transaction number that appears on email receipts sent for this invoice. */ - receipt_number?: string - /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ - starting_balance: number - /** @description Extra information about an invoice for the customer's credit card statement. */ - statement_descriptor?: string - /** - * @description The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) - * @enum {string} - */ - status?: 'deleted' | 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' - status_transitions: definitions['invoices_status_transitions'] - /** @description The subscription that this invoice was prepared for, if any. */ - subscription?: string - /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ - subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ - subtotal: number - /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ - tax?: number - /** @description This percentage of the subtotal has been added to the total amount of the invoice, including invoice line items and discounts. This field is inherited from the subscription's `tax_percent` field, but can be changed before the invoice is paid. This field defaults to null. */ - tax_percent?: number - threshold_reason?: definitions['invoice_threshold_reason'] - /** @description Total after discounts and taxes. */ - total: number - /** @description The aggregate amounts calculated per tax rate for all line items. */ - total_tax_amounts?: definitions['invoice_tax_amount'][] - /** @description Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. */ - webhooks_delivered_at?: number - } - /** InvoiceItemThresholdReason */ - invoice_item_threshold_reason: { - /** @description The IDs of the line items that triggered the threshold invoice. */ - line_item_ids: string[] - /** @description The quantity threshold boundary that applied to the given line item. */ - usage_gte: number - } - /** InvoiceLineItemPeriod */ - invoice_line_item_period: { - /** @description End of the line item's billing period */ - end: number - /** @description Start of the line item's billing period */ - start: number - } - /** InvoiceSettingCustomField */ - invoice_setting_custom_field: { - /** @description The name of the custom field. */ - name: string - /** @description The value of the custom field. */ - value: string - } - /** InvoiceSettingCustomerSetting */ - invoice_setting_customer_setting: { - /** @description Default custom fields to be displayed on invoices for this customer. */ - custom_fields?: definitions['invoice_setting_custom_field'][] - /** @description ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. */ - default_payment_method?: string - /** @description Default footer to be displayed on invoices for this customer. */ - footer?: string - } - /** InvoiceSettingSubscriptionScheduleSetting */ - invoice_setting_subscription_schedule_setting: { - /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ - days_until_due?: number - } - /** InvoiceTaxAmount */ - invoice_tax_amount: { - /** @description The amount, in %s, of the tax. */ - amount: number - /** @description Whether this tax amount is inclusive or exclusive. */ - inclusive: boolean - /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: string - } - /** InvoiceThresholdReason */ - invoice_threshold_reason: { - /** @description The total invoice amount threshold boundary if it triggered the threshold invoice. */ - amount_gte?: number - /** @description Indicates which line items triggered a threshold invoice. */ - item_reasons: definitions['invoice_item_threshold_reason'][] - } - /** - * InvoiceItem - * @description Sometimes you want to add a charge or credit to a customer, but actually - * charge or credit the customer's card only at the end of a regular billing - * cycle. This is useful for combining several charges (to minimize - * per-transaction fees), or for having Stripe tabulate your usage-based billing - * totals. - * - * Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). - */ - invoiceitem: { - /** @description Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - date: number - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description If true, discounts will apply to this invoice item. Always false for prorations. */ - discountable: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the invoice this invoice item belongs to. */ - invoice?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoiceitem' - period: definitions['invoice_line_item_period'] - plan?: definitions['plan'] - /** @description Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ - proration: boolean - /** @description Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ - quantity: number - /** @description The subscription that this invoice item has been created for, if any. */ - subscription?: string - /** @description The subscription item that this invoice item has been created for, if any. */ - subscription_item?: string - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ - tax_rates?: definitions['tax_rate'][] - /** @description Unit Amount (in the `currency` specified) of the invoice item. */ - unit_amount?: number - /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ - unit_amount_decimal?: string - } - /** InvoicesResourceInvoiceTaxID */ - invoices_resource_invoice_tax_id: { - /** - * @description The type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, `sg_gst`, or `unknown` - * @enum {string} - */ - type: - | 'au_abn' - | 'ca_bn' - | 'ca_qst' - | 'ch_vat' - | 'es_cif' - | 'eu_vat' - | 'hk_br' - | 'in_gst' - | 'jp_cn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'unknown' - | 'us_ein' - | 'za_vat' - /** @description The value of the tax ID. */ - value?: string - } - /** InvoicesStatusTransitions */ - invoices_status_transitions: { - /** @description The time that the invoice draft was finalized. */ - finalized_at?: number - /** @description The time that the invoice was marked uncollectible. */ - marked_uncollectible_at?: number - /** @description The time that the invoice was paid. */ - paid_at?: number - /** @description The time that the invoice was voided. */ - voided_at?: number - } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } - /** IssuingAuthorizationMerchantData */ - issuing_authorization_merchant_data: { - /** @description A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. */ - category: string - /** @description City where the seller is located */ - city?: string - /** @description Country where the seller is located */ - country?: string - /** @description Name of the seller */ - name?: string - /** @description Identifier assigned to the seller by the card brand */ - network_id: string - /** @description Postal code where the seller is located */ - postal_code?: string - /** @description State where the seller is located */ - state?: string - } - /** IssuingAuthorizationPendingRequest */ - issuing_authorization_pending_request: { - /** @description The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. */ - is_amount_controllable: boolean - /** @description The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The local currency the merchant is requesting to authorize. */ - merchant_currency: string - } - /** IssuingAuthorizationRequest */ - issuing_authorization_request: { - /** @description The authorization amount in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. */ - amount: number - /** @description Whether this request was approved. */ - approved: boolean - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The amount that was authorized at the time of this request. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - merchant_currency: string - /** - * @description The reason for the approval or decline. - * @enum {string} - */ - reason: - | 'account_disabled' - | 'card_active' - | 'card_inactive' - | 'cardholder_inactive' - | 'cardholder_verification_required' - | 'insufficient_funds' - | 'not_allowed' - | 'spending_controls' - | 'suspected_fraud' - | 'verification_failed' - | 'webhook_approved' - | 'webhook_declined' - | 'webhook_timeout' - } - /** IssuingAuthorizationVerificationData */ - issuing_authorization_verification_data: { - /** - * @description Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. - * @enum {string} - */ - address_line1_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. - * @enum {string} - */ - address_postal_code_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided a CVC and if it matched Stripe’s record. - * @enum {string} - */ - cvc_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided an expiry date and if it matched Stripe’s record. - * @enum {string} - */ - expiry_check: 'match' | 'mismatch' | 'not_provided' - } - /** IssuingCardAuthorizationControls */ - issuing_card_authorization_controls: { - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this card. */ - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to always decline on this card. */ - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @description Limit the spending with rules based on time intervals and categories. */ - spending_limits?: definitions['issuing_card_spending_limit'][] - /** @description Currency for the amounts within spending_limits. Locked to the currency of the card. */ - spending_limits_currency?: string - } - /** IssuingCardShipping */ - issuing_card_shipping: { - address: definitions['address'] - /** - * @description The delivery company that shipped a card. - * @enum {string} - */ - carrier?: 'fedex' | 'usps' - /** @description A unix timestamp representing a best estimate of when the card will be delivered. */ - eta?: number - /** @description Recipient name. */ - name: string - /** - * @description Shipment service, such as `standard` or `express`. - * @enum {string} - */ - service: 'express' | 'priority' | 'standard' - /** - * @description The delivery status of the card. - * @enum {string} - */ - status?: 'canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped' - /** @description A tracking number for a card shipment. */ - tracking_number?: string - /** @description A link to the shipping carrier's site where you can view detailed information about a card shipment. */ - tracking_url?: string - /** - * @description Packaging options. - * @enum {string} - */ - type: 'bulk' | 'individual' - } - /** IssuingCardSpendingLimit */ - issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per time interval. */ - amount: number - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) on which to apply the spending limit. Leave this blank to limit all charges. */ - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** - * @description The time interval or event with which to apply this spending limit towards. - * @enum {string} - */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - } - /** IssuingCardholderAddress */ - issuing_cardholder_address: { - address: definitions['address'] - } - /** IssuingCardholderAuthorizationControls */ - issuing_cardholder_authorization_controls: { - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this cardholder's cards. */ - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to always decline on this cardholder's cards. */ - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @description Limit the spending with rules based on time intervals and categories. */ - spending_limits?: definitions['issuing_cardholder_spending_limit'][] - /** @description Currency for the amounts within spending_limits. */ - spending_limits_currency?: string - } - /** IssuingCardholderCompany */ - issuing_cardholder_company: { - /** @description Whether the company's business ID number was provided. */ - tax_id_provided: boolean - } - /** IssuingCardholderIdDocument */ - issuing_cardholder_id_document: { - /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: string - /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: string - } - /** IssuingCardholderIndividual */ - issuing_cardholder_individual: { - dob?: definitions['issuing_cardholder_individual_dob'] - /** @description The first name of this cardholder. */ - first_name: string - /** @description The last name of this cardholder. */ - last_name: string - verification?: definitions['issuing_cardholder_verification'] - } - /** IssuingCardholderIndividualDOB */ - issuing_cardholder_individual_dob: { - /** @description The day of birth, between 1 and 31. */ - day?: number - /** @description The month of birth, between 1 and 12. */ - month?: number - /** @description The four-digit year of birth. */ - year?: number - } - /** IssuingCardholderRequirements */ - issuing_cardholder_requirements: { - /** - * @description If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. - * @enum {string} - */ - disabled_reason?: 'listed' | 'rejected.listed' | 'under_review' - /** @description Array of fields that need to be collected in order to verify and re-enable the cardholder. */ - past_due?: ( - | 'company.tax_id' - | 'individual.dob.day' - | 'individual.dob.month' - | 'individual.dob.year' - | 'individual.first_name' - | 'individual.last_name' - | 'individual.verification.document' - )[] - } - /** IssuingCardholderSpendingLimit */ - issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per time interval. */ - amount: number - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) on which to apply the spending limit. Leave this blank to limit all charges. */ - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** - * @description The time interval or event with which to apply this spending limit towards. - * @enum {string} - */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - } - /** IssuingCardholderVerification */ - issuing_cardholder_verification: { - document?: definitions['issuing_cardholder_id_document'] - } - /** - * IssuingAuthorization - * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - * purchase to be completed successfully. - * - * Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations). - */ - 'issuing.authorization': { - /** @description The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description Whether the authorization has been approved. */ - approved: boolean - /** - * @description How the card details were provided. - * @enum {string} - */ - authorization_method: 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe' - /** @description List of balance transactions associated with this authorization. */ - balance_transactions: definitions['balance_transaction'][] - card: definitions['issuing.card'] - /** @description The cardholder to whom this authorization belongs. */ - cardholder?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - merchant_currency: string - merchant_data: definitions['issuing_authorization_merchant_data'] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.authorization' - pending_request?: definitions['issuing_authorization_pending_request'] - /** @description History of every time the authorization was approved/denied (whether approved/denied by you directly or by Stripe based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization or partial capture](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous states of the authorization. */ - request_history: definitions['issuing_authorization_request'][] - /** - * @description The current status of the authorization in its lifecycle. - * @enum {string} - */ - status: 'closed' | 'pending' | 'reversed' - /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ - transactions: definitions['issuing.transaction'][] - verification_data: definitions['issuing_authorization_verification_data'] - /** @description What, if any, digital wallet was used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ - wallet?: string - } - /** - * IssuingCard - * @description You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. - */ - 'issuing.card': { - /** @description The brand of the card. */ - brand: string - /** - * @description The reason why the card was canceled. - * @enum {string} - */ - cancellation_reason?: 'lost' | 'stolen' - cardholder: definitions['issuing.cardholder'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ - cvc?: string - /** @description The expiration month of the card. */ - exp_month: number - /** @description The expiration year of the card. */ - exp_year: number - /** @description Unique identifier for the object. */ - id: string - /** @description The last 4 digits of the card number. */ - last4: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ - number?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.card' - /** @description The latest card that replaces this card, if any. */ - replaced_by?: string - /** @description The card this card replaces, if any. */ - replacement_for?: string - /** - * @description The reason why the previous card needed to be replaced. - * @enum {string} - */ - replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' - shipping?: definitions['issuing_card_shipping'] - spending_controls: definitions['issuing_card_authorization_controls'] - /** - * @description Whether authorizations can be approved on this card. - * @enum {string} - */ - status: 'active' | 'canceled' | 'inactive' - /** - * @description The type of the card. - * @enum {string} - */ - type: 'physical' | 'virtual' - } - /** - * IssuingCardholder - * @description An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. - * - * Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) - */ - 'issuing.cardholder': { - billing: definitions['issuing_cardholder_address'] - company?: definitions['issuing_cardholder_company'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The cardholder's email address. */ - email?: string - /** @description Unique identifier for the object. */ - id: string - individual?: definitions['issuing_cardholder_individual'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The cardholder's name. This will be printed on cards issued to them. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.cardholder' - /** @description The cardholder's phone number. */ - phone_number?: string - requirements: definitions['issuing_cardholder_requirements'] - spending_controls?: definitions['issuing_cardholder_authorization_controls'] - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. - * @enum {string} - */ - status: 'active' | 'blocked' | 'inactive' - /** - * @description One of `individual` or `company`. - * @enum {string} - */ - type: 'company' | 'individual' - } - /** - * IssuingDispute - * @description As a [card issuer](https://stripe.com/docs/issuing), you can [dispute](https://stripe.com/docs/issuing/purchases/disputes) transactions that you do not recognize, suspect to be fraudulent, or have some other issue. - * - * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) - */ - 'issuing.dispute': { - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.dispute' - } - /** - * IssuingSettlement - * @description When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. - */ - 'issuing.settlement': { - /** @description The Bank Identification Number reflecting this settlement record. */ - bin: string - /** @description The date that the transactions are cleared and posted to user's accounts. */ - clearing_date: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The total interchange received as reimbursement for the transactions. */ - interchange_fees: number - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The total net amount required to settle with the network. */ - net_total: number - /** - * @description The card network for this settlement report. One of ["visa"] - * @enum {string} - */ - network: 'visa' - /** @description The total amount of fees owed to the network. */ - network_fees: number - /** @description The Settlement Identification Number assigned by the network. */ - network_settlement_identifier: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.settlement' - /** @description One of `international` or `uk_national_net`. */ - settlement_service: string - /** @description The total number of transactions reflected in this settlement. */ - transaction_count: number - /** @description The total transaction amount reflected in this settlement. */ - transaction_volume: number - } - /** - * IssuingTransaction - * @description Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving - * your Stripe account, such as a completed purchase or refund, is represented by an Issuing - * `Transaction` object. - * - * Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions). - */ - 'issuing.transaction': { - /** @description The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description The `Authorization` object that led to this transaction. */ - authorization?: string - /** @description ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ - balance_transaction?: string - /** @description The card used to make this transaction. */ - card: string - /** @description The cardholder to whom this transaction belongs. */ - cardholder?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. */ - merchant_amount: number - /** @description The currency with which the merchant is taking payment. */ - merchant_currency: string - merchant_data: definitions['issuing_authorization_merchant_data'] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.transaction' - /** - * @description The nature of the transaction. - * @enum {string} - */ - type: 'capture' | 'refund' - } - /** LegalEntityCompany */ - legal_entity_company: { - address?: definitions['address'] - address_kana?: definitions['legal_entity_japan_address'] - address_kanji?: definitions['legal_entity_japan_address'] - /** @description Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). */ - directors_provided?: boolean - /** @description Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. */ - executives_provided?: boolean - /** @description The company's legal name. */ - name?: string - /** @description The Kana variation of the company's legal name (Japan only). */ - name_kana?: string - /** @description The Kanji variation of the company's legal name (Japan only). */ - name_kanji?: string - /** @description Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). */ - owners_provided?: boolean - /** @description The company's phone number (used for verification). */ - phone?: string - /** - * @description The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. - * @enum {string} - */ - structure?: - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - /** @description Whether the company's business ID number was provided. */ - tax_id_provided?: boolean - /** @description The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ - tax_id_registrar?: string - /** @description Whether the company's business VAT number was provided. */ - vat_id_provided?: boolean - verification?: definitions['legal_entity_company_verification'] - } - /** LegalEntityCompanyVerification */ - legal_entity_company_verification: { - document: definitions['legal_entity_company_verification_document'] - } - /** LegalEntityCompanyVerificationDocument */ - legal_entity_company_verification_document: { - /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - back?: string - /** @description A user-displayable string describing the verification state of this document. */ - details?: string - /** @description One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. */ - details_code?: string - /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - front?: string - } - /** LegalEntityDOB */ - legal_entity_dob: { - /** @description The day of birth, between 1 and 31. */ - day?: number - /** @description The month of birth, between 1 and 12. */ - month?: number - /** @description The four-digit year of birth. */ - year?: number - } - /** LegalEntityJapanAddress */ - legal_entity_japan_address: { - /** @description City/Ward. */ - city?: string - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description Block/Building number. */ - line1?: string - /** @description Building details. */ - line2?: string - /** @description ZIP or postal code. */ - postal_code?: string - /** @description Prefecture. */ - state?: string - /** @description Town/cho-me. */ - town?: string - } - /** LegalEntityPersonVerification */ - legal_entity_person_verification: { - additional_document?: definitions['legal_entity_person_verification_document'] - /** @description A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ - details?: string - /** @description One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. */ - details_code?: string - document?: definitions['legal_entity_person_verification_document'] - /** @description The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ - status: string - } - /** LegalEntityPersonVerificationDocument */ - legal_entity_person_verification_document: { - /** @description The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: string - /** @description A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". */ - details?: string - /** @description One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. */ - details_code?: string - /** @description The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: string - } - /** LightAccountLogout */ - light_account_logout: { [key: string]: unknown } - /** InvoiceLineItem */ - line_item: { - /** @description The amount, in %s. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description If true, discounts will apply to this line item. Always false for prorations. */ - discountable: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ - invoice_item?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'line_item' - period: definitions['invoice_line_item_period'] - plan?: definitions['plan'] - /** @description Whether this is a proration. */ - proration: boolean - /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ - quantity?: number - /** @description The subscription that the invoice item pertains to, if any. */ - subscription?: string - /** @description The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. */ - subscription_item?: string - /** @description The amount of tax calculated per tax rate for this line item */ - tax_amounts?: definitions['invoice_tax_amount'][] - /** @description The tax rates which apply to the line item. */ - tax_rates?: definitions['tax_rate'][] - /** - * @description A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. - * @enum {string} - */ - type: 'invoiceitem' | 'subscription' - } - /** LoginLink */ - login_link: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'login_link' - /** @description The URL for the login link. */ - url: string - } - /** - * Mandate - * @description A Mandate is a record of the permission a customer has given you to debit their payment method. - */ - mandate: { - customer_acceptance: definitions['customer_acceptance'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - multi_use?: definitions['mandate_multi_use'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'mandate' - /** @description ID of the payment method associated with this mandate. */ - payment_method: string - payment_method_details: definitions['mandate_payment_method_details'] - single_use?: definitions['mandate_single_use'] - /** - * @description The status of the mandate, which indicates whether it can be used to initiate a payment. - * @enum {string} - */ - status: 'active' | 'inactive' | 'pending' - /** - * @description The type of the mandate. - * @enum {string} - */ - type: 'multi_use' | 'single_use' - } - /** mandate_au_becs_debit */ - mandate_au_becs_debit: { - /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ - url: string - } - /** mandate_multi_use */ - mandate_multi_use: { [key: string]: unknown } - /** mandate_payment_method_details */ - mandate_payment_method_details: { - au_becs_debit?: definitions['mandate_au_becs_debit'] - card?: definitions['card_mandate_payment_method_details'] - sepa_debit?: definitions['mandate_sepa_debit'] - /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ - type: string - } - /** mandate_sepa_debit */ - mandate_sepa_debit: { - /** @description The unique reference of the mandate. */ - reference: string - /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ - url: string - } - /** mandate_single_use */ - mandate_single_use: { - /** @description On a single use mandate, the amount of the payment. */ - amount: number - /** @description On a single use mandate, the currency of the payment. */ - currency: string - } - /** NotificationEventData */ - notification_event_data: { - /** @description Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. */ - object: { [key: string]: unknown } - /** @description Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ - previous_attributes?: { [key: string]: unknown } - } - /** NotificationEventRequest */ - notification_event_request: { - /** @description ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. */ - id?: string - /** @description The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ - idempotency_key?: string - } - /** offline_acceptance */ - offline_acceptance: { [key: string]: unknown } - /** online_acceptance */ - online_acceptance: { - /** @description The IP address from which the Mandate was accepted by the customer. */ - ip_address?: string - /** @description The user agent of the browser from which the Mandate was accepted by the customer. */ - user_agent?: string - } - /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). - */ - order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number - /** @description ID of the Connect Application that created the order. */ - application?: string - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer used for the order. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description External coupon code to load for this order. */ - external_coupon_code?: string - /** @description Unique identifier for the object. */ - id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: definitions['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order' - /** - * OrderReturnList - * @description A list of returns that have taken place for this order. - */ - returns?: { - /** @description Details about each object. */ - data: definitions['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string - shipping?: definitions['shipping'] - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: definitions['shipping_method'][] - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - status_transitions?: definitions['status_transitions'] - /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ - updated?: number - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string - } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: string - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string - } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The items included in this order return. */ - items: definitions['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: string - /** @description The ID of the refund issued for this return. */ - refund?: string - } - /** PackageDimensions */ - package_dimensions: { - /** @description Height, in inches. */ - height: number - /** @description Length, in inches. */ - length: number - /** @description Weight, in ounces. */ - weight: number - /** @description Width, in inches. */ - width: number - } - /** - * PaymentIntent - * @description A PaymentIntent guides you through the process of collecting a payment from your customer. - * We recommend that you create exactly one PaymentIntent for each order or - * customer session in your system. You can reference the PaymentIntent later to - * see the history of payment attempts for a particular session. - * - * A PaymentIntent transitions through - * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - * throughout its lifetime as it interfaces with Stripe.js to perform - * authentication flows and ultimately creates at most one successful charge. - * - * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). - */ - payment_intent: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description Amount that can be captured from this PaymentIntent. */ - amount_capturable?: number - /** @description Amount that was collected by this PaymentIntent. */ - amount_received?: number - /** @description ID of the Connect application that created the PaymentIntent. */ - application?: string - /** @description The amount of the application fee (if any) for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - application_fee_amount?: number - /** @description Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ - canceled_at?: number - /** - * @description Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'automatic' | 'duplicate' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice' - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method: 'automatic' | 'manual' - /** - * PaymentFlowsPaymentIntentResourceChargeList - * @description Charges that were created by this PaymentIntent, if any. - */ - charges?: { - /** @description This list only contains the latest charge, even if there were previously multiple unsuccessful charges. To view all previous charges for a PaymentIntent, you can filter the charges list using the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). */ - data: definitions['charge'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. - * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment) and learn about how `client_secret` should be handled. - */ - client_secret?: string - /** @enum {string} */ - confirmation_method: 'automatic' | 'manual' - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice that created this PaymentIntent, if it exists. */ - invoice?: string - last_payment_error?: definitions['api_errors'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ - metadata?: { [key: string]: unknown } - next_action?: definitions['payment_intent_next_action'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payment_intent' - /** @description The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - on_behalf_of?: string - /** @description ID of the payment method used in this PaymentIntent. */ - payment_method?: string - payment_method_options?: definitions['payment_intent_payment_method_options'] - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: string - /** @description ID of the review associated with this PaymentIntent, if any. */ - review?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - shipping?: definitions['shipping'] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * @description Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). - * @enum {string} - */ - status: 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' - transfer_data?: definitions['transfer_data'] - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - } - /** PaymentIntentNextAction */ - payment_intent_next_action: { - redirect_to_url?: definitions['payment_intent_next_action_redirect_to_url'] - /** @description Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ - type: string - /** @description When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ - use_stripe_sdk?: { [key: string]: unknown } - } - /** PaymentIntentNextActionRedirectToUrl */ - payment_intent_next_action_redirect_to_url: { - /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ - return_url?: string - /** @description The URL you must redirect your customer to in order to authenticate the payment. */ - url?: string - } - /** PaymentIntentPaymentMethodOptions */ - payment_intent_payment_method_options: { - card?: definitions['payment_intent_payment_method_options_card'] - } - /** payment_intent_payment_method_options_card */ - payment_intent_payment_method_options_card: { - installments?: definitions['payment_method_options_card_installments'] - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string} - */ - request_three_d_secure?: 'any' | 'automatic' | 'challenge_only' - } - /** - * PaymentMethod - * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to - * Customer objects to store instrument details for future payments. - * - * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - */ - payment_method: { - au_becs_debit?: definitions['payment_method_au_becs_debit'] - billing_details: definitions['billing_details'] - card?: definitions['payment_method_card'] - card_present?: definitions['payment_method_card_present'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ - customer?: string - fpx?: definitions['payment_method_fpx'] - /** @description Unique identifier for the object. */ - id: string - ideal?: definitions['payment_method_ideal'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payment_method' - sepa_debit?: definitions['payment_method_sepa_debit'] - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type: 'au_becs_debit' | 'card' | 'fpx' | 'ideal' | 'sepa_debit' - } - /** payment_method_au_becs_debit */ - payment_method_au_becs_debit: { - /** @description Six-digit number identifying bank and branch associated with this bank account. */ - bsb_number?: string - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Last four digits of the bank account number. */ - last4?: string - } - /** payment_method_card */ - payment_method_card: { - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand: string - checks?: definitions['payment_method_card_checks'] - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ - fingerprint?: string - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding: string - generated_from?: definitions['payment_method_card_generated_card'] - /** @description The last four digits of the card. */ - last4: string - three_d_secure_usage?: definitions['three_d_secure_usage'] - wallet?: definitions['payment_method_card_wallet'] - } - /** payment_method_card_checks */ - payment_method_card_checks: { - /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string - /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_postal_code_check?: string - /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - cvc_check?: string - } - /** payment_method_card_generated_card */ - payment_method_card_generated_card: { - /** @description The charge that created this object. */ - charge?: string - payment_method_details?: definitions['payment_method_details'] - } - /** payment_method_card_present */ - payment_method_card_present: { [key: string]: unknown } - /** payment_method_card_wallet */ - payment_method_card_wallet: { - amex_express_checkout?: definitions['payment_method_card_wallet_amex_express_checkout'] - apple_pay?: definitions['payment_method_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string - google_pay?: definitions['payment_method_card_wallet_google_pay'] - masterpass?: definitions['payment_method_card_wallet_masterpass'] - samsung_pay?: definitions['payment_method_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: definitions['payment_method_card_wallet_visa_checkout'] - } - /** payment_method_card_wallet_amex_express_checkout */ - payment_method_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_card_wallet_apple_pay */ - payment_method_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_card_wallet_google_pay */ - payment_method_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_card_wallet_masterpass */ - payment_method_card_wallet_masterpass: { - billing_address?: definitions['address'] - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string - shipping_address?: definitions['address'] - } - /** payment_method_card_wallet_samsung_pay */ - payment_method_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_card_wallet_visa_checkout */ - payment_method_card_wallet_visa_checkout: { - billing_address?: definitions['address'] - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string - shipping_address?: definitions['address'] - } - /** payment_method_details */ - payment_method_details: { - ach_credit_transfer?: definitions['payment_method_details_ach_credit_transfer'] - ach_debit?: definitions['payment_method_details_ach_debit'] - alipay?: definitions['payment_method_details_alipay'] - au_becs_debit?: definitions['payment_method_details_au_becs_debit'] - bancontact?: definitions['payment_method_details_bancontact'] - card?: definitions['payment_method_details_card'] - card_present?: definitions['payment_method_details_card_present'] - eps?: definitions['payment_method_details_eps'] - fpx?: definitions['payment_method_details_fpx'] - giropay?: definitions['payment_method_details_giropay'] - ideal?: definitions['payment_method_details_ideal'] - klarna?: definitions['payment_method_details_klarna'] - multibanco?: definitions['payment_method_details_multibanco'] - p24?: definitions['payment_method_details_p24'] - sepa_debit?: definitions['payment_method_details_sepa_debit'] - sofort?: definitions['payment_method_details_sofort'] - stripe_account?: definitions['payment_method_details_stripe_account'] - /** - * @description The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. - * An additional hash is included on `payment_method_details` with a name matching this value. - * It contains information specific to the payment method. - */ - type: string - wechat?: definitions['payment_method_details_wechat'] - } - /** payment_method_details_ach_credit_transfer */ - payment_method_details_ach_credit_transfer: { - /** @description Account number to transfer funds to. */ - account_number?: string - /** @description Name of the bank associated with the routing number. */ - bank_name?: string - /** @description Routing transit number for the bank account to transfer funds to. */ - routing_number?: string - /** @description SWIFT code of the bank associated with the routing number. */ - swift_code?: string - } - /** payment_method_details_ach_debit */ - payment_method_details_ach_debit: { - /** - * @description Type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description Name of the bank associated with the bank account. */ - bank_name?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Last four digits of the bank account number. */ - last4?: string - /** @description Routing transit number of the bank account. */ - routing_number?: string - } - /** payment_method_details_alipay */ - payment_method_details_alipay: { [key: string]: unknown } - /** payment_method_details_au_becs_debit */ - payment_method_details_au_becs_debit: { - /** @description Bank-State-Branch number of the bank account. */ - bsb_number?: string - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Last four digits of the bank account number. */ - last4?: string - /** @description ID of the mandate used to make this payment. */ - mandate?: string - } - /** payment_method_details_bancontact */ - payment_method_details_bancontact: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string - /** @description Name of the bank associated with the bank account. */ - bank_name?: string - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string - /** @description Last four characters of the IBAN. */ - iban_last4?: string - /** - * @description Preferred language of the Bancontact authorization page that the customer is redirected to. - * Can be one of `en`, `de`, `fr`, or `nl` - * @enum {string} - */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - /** - * @description Owner's verified full name. Values are verified or provided by Bancontact directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_card */ - payment_method_details_card: { - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand?: string - checks?: definitions['payment_method_details_card_checks'] - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string - /** @description Two-digit number representing the card's expiration month. */ - exp_month?: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year?: number - /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ - fingerprint?: string - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string - installments?: definitions['payment_method_details_card_installments'] - /** @description The last four digits of the card. */ - last4?: string - /** @description Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string - three_d_secure?: definitions['three_d_secure_details'] - wallet?: definitions['payment_method_details_card_wallet'] - } - /** payment_method_details_card_checks */ - payment_method_details_card_checks: { - /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string - /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_postal_code_check?: string - /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - cvc_check?: string - } - /** payment_method_details_card_installments */ - payment_method_details_card_installments: { - plan?: definitions['payment_method_details_card_installments_plan'] - } - /** payment_method_details_card_installments_plan */ - payment_method_details_card_installments_plan: { - /** @description For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ - count?: number - /** - * @description For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - * One of `month`. - * @enum {string} - */ - interval?: 'month' - /** - * @description Type of installment plan, one of `fixed_count`. - * @enum {string} - */ - type: 'fixed_count' - } - /** payment_method_details_card_present */ - payment_method_details_card_present: { - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand?: string - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). */ - cardholder_name?: string - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string - /** @description Authorization response cryptogram. */ - emv_auth_data?: string - /** @description Two-digit number representing the card's expiration month. */ - exp_month?: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year?: number - /** @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ - fingerprint?: string - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string - /** @description The last four digits of the card. */ - last4?: string - /** @description Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string - /** @description How were card details read in this transaction. Can be contact_emv, contactless_emv, magnetic_stripe_fallback, magnetic_stripe_track2, or contactless_magstripe_mode */ - read_method?: string - receipt?: definitions['payment_method_details_card_present_receipt'] - } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string - /** @description Identifier for this transaction. */ - authorization_code?: string - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string - } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: definitions['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: definitions['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string - google_pay?: definitions['payment_method_details_card_wallet_google_pay'] - masterpass?: definitions['payment_method_details_card_wallet_masterpass'] - samsung_pay?: definitions['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: definitions['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - billing_address?: definitions['address'] - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string - shipping_address?: definitions['address'] - } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - billing_address?: definitions['address'] - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string - shipping_address?: definitions['address'] - } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string - } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string - /** @description Name of the bank associated with the bank account. */ - bank_name?: string - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string} - */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string} - */ - bic?: - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'SNSBNL2A' - | 'TRIONL2U' - /** @description Last four characters of the IBAN. */ - iban_last4?: string - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_klarna */ - payment_method_details_klarna: { [key: string]: unknown } - /** payment_method_details_multibanco */ - payment_method_details_multibanco: { - /** @description Entity number associated with this Multibanco payment. */ - entity?: string - /** @description Reference number associated with this Multibanco payment. */ - reference?: string - } - /** payment_method_details_p24 */ - payment_method_details_p24: { - /** @description Unique reference for this Przelewy24 payment. */ - reference?: string - /** - * @description Owner's verified full name. Values are verified or provided by Przelewy24 directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_sepa_debit */ - payment_method_details_sepa_debit: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string - /** @description Branch code of bank associated with the bank account. */ - branch_code?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Last four characters of the IBAN. */ - last4?: string - /** @description ID of the mandate used to make this payment. */ - mandate?: string - } - /** payment_method_details_sofort */ - payment_method_details_sofort: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string - /** @description Name of the bank associated with the bank account. */ - bank_name?: string - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string - /** @description Last four characters of the IBAN. */ - iban_last4?: string - /** - * @description Owner's verified full name. Values are verified or provided by SOFORT directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string - } - /** payment_method_details_stripe_account */ - payment_method_details_stripe_account: { [key: string]: unknown } - /** payment_method_details_wechat */ - payment_method_details_wechat: { [key: string]: unknown } - /** payment_method_fpx */ - payment_method_fpx: { - /** - * @description The customer's bank, if provided. Can be one of `affin_bank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** payment_method_ideal */ - payment_method_ideal: { - /** - * @description The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string} - */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - /** - * @description The Bank Identifier Code of the customer's bank, if the bank was provided. - * @enum {string} - */ - bic?: - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'SNSBNL2A' - | 'TRIONL2U' - } - /** payment_method_options_card_installments */ - payment_method_options_card_installments: { - /** @description Installment plans that may be selected for this PaymentIntent. */ - available_plans?: definitions['payment_method_details_card_installments_plan'][] - /** @description Whether Installments are enabled for this PaymentIntent. */ - enabled: boolean - plan?: definitions['payment_method_details_card_installments_plan'] - } - /** payment_method_sepa_debit */ - payment_method_sepa_debit: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string - /** @description Branch code of bank associated with the bank account. */ - branch_code?: string - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string - /** @description Last four characters of the IBAN. */ - last4?: string - } - /** PaymentPagesPaymentPageResourcesShippingAddressCollection */ - payment_pages_payment_page_resources_shipping_address_collection: { - /** - * @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for - * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. - */ - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** Polymorphic */ - payment_source: { - /** @description Unique identifier for the object. */ - id: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account' - } - /** - * Payout - * @description A `Payout` object is created when you receive funds from Stripe, or when you - * initiate a payout to either a bank account or debit card of a [connected - * Stripe account](/docs/connect/payouts). You can retrieve individual payouts, - * as well as list all payouts. Payouts are made on [varying - * schedules](/docs/payouts#payout-schedule), depending on your country and - * industry. - * - * Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). - */ - payout: { - /** @description Amount (in %s) to be transferred to your bank account or debit card. */ - amount: number - /** @description Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. */ - arrival_date: number - /** @description Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). */ - automatic: boolean - /** @description ID of the balance transaction that describes the impact of this payout on your account balance. */ - balance_transaction?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description ID of the bank account or card the payout was sent to. */ - destination?: string - /** @description If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. */ - failure_balance_transaction?: string - /** @description Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. */ - failure_code?: string - /** @description Message to user further explaining reason for payout failure if available. */ - failure_message?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) */ - method: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payout' - /** @description The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ - source_type: string - /** @description Extra information about a payout to be displayed on the user's bank statement. */ - statement_descriptor?: string - /** @description Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. */ - status: string - /** - * @description Can be `bank_account` or `card`. - * @enum {string} - */ - type: 'bank_account' | 'card' - } - /** Period */ - period: { - /** @description The end date of this usage period. All usage up to and including this point in time is included. */ - end?: number - /** @description The start date of this usage period. All usage after this point in time is included. */ - start?: number - } - /** - * Person - * @description This is an object representing a person associated with a Stripe account. - * - * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). - */ - person: { - account: string - address?: definitions['address'] - address_kana?: definitions['legal_entity_japan_address'] - address_kanji?: definitions['legal_entity_japan_address'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - dob?: definitions['legal_entity_dob'] - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - /** @description Unique identifier for the object. */ - id: string - id_number_provided?: boolean - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'person' - phone?: string - relationship?: definitions['person_relationship'] - requirements?: definitions['person_requirements'] - ssn_last_4_provided?: boolean - verification?: definitions['legal_entity_person_verification'] - } - /** PersonRelationship */ - person_relationship: { - /** @description Whether the person is a director of the account's legal entity. Currently only required for accounts in the EU. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. */ - director?: boolean - /** @description Whether the person has significant responsibility to control, manage, or direct the organization. */ - executive?: boolean - /** @description Whether the person is an owner of the account’s legal entity. */ - owner?: boolean - /** @description The percent owned by the person of the account's legal entity. */ - percent_ownership?: number - /** @description Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. */ - representative?: boolean - /** @description The person's title (e.g., CEO, Support Engineer). */ - title?: string - } - /** PersonRequirements */ - person_requirements: { - /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ - currently_due: string[] - /** @description The fields that need to be collected again because validation or verification failed for some reason. */ - errors: definitions['account_requirements_error'][] - /** @description Fields that need to be collected assuming all volume thresholds are reached. As fields are needed, they are moved to `currently_due` and the account's `current_deadline` is set. */ - eventually_due: string[] - /** @description Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable payouts for the person's account. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to `currently_due` or `past_due`. */ - pending_verification: string[] - } - /** - * Plan - * @description Plans define the base price, currency, and billing cycle for recurring purchases of products. - * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. - * - * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. - * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and plans](https://stripe.com/docs/billing/subscriptions/products-and-plans). - */ - plan: { - /** @description Whether the plan can be used for new purchases. */ - active: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description The amount in %s to be charged on the interval specified. */ - amount?: number - /** @description Same as `amount`, but contains a decimal value with at most 12 decimal places. */ - amount_decimal?: string - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme: 'per_unit' | 'tiered' - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ - interval_count: number - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'plan' - /** @description The product whose pricing this plan determines. */ - product?: string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: definitions['plan_tier'][] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - transform_usage?: definitions['transform_usage'] - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type: 'licensed' | 'metered' - } - /** PlanTier */ - plan_tier: { - /** @description Price for the entire tier. */ - flat_amount?: number - /** @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. */ - flat_amount_decimal?: string - /** @description Per unit price for units relevant to the tier. */ - unit_amount?: number - /** @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ - unit_amount_decimal?: string - /** @description Up to and including to this quantity will be contained in the tier. */ - up_to?: number - } - /** PlatformTax */ - platform_tax_fee: { - /** @description The Connected account that incurred this charge. */ - account: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'platform_tax_fee' - /** @description The payment object that caused this tax to be inflicted. */ - source_transaction: string - /** @description The type of tax (VAT). */ - type: string - } - /** - * Product - * @description Products describe the specific goods or services you offer to your customers. - * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. - * They can be used in conjuction with [SKUs](https://stripe.com/docs/api#skus) and [Plans](https://stripe.com/docs/api#plans) to configure pricing in Checkout and Subscriptions. - * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) or accept [one-time payments with Checkout](https://stripe.com/docs/payments/checkout/client#create-products) and more about [Products and Plans](https://stripe.com/docs/billing/subscriptions/products-and-plans) - */ - product: { - /** @description Whether the product is currently available for purchase. */ - active: boolean - /** @description A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`). */ - attributes?: string[] - /** @description A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of `type=good`. */ - caption?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description An array of connect application identifiers that cannot purchase this product. Only applicable to products of `type=good`. */ - deactivate_on?: string[] - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Unique identifier for the object. */ - id: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images: string[] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'product' - package_dimensions?: definitions['package_dimensions'] - /** @description Whether this product is a shipped good. Only applicable to products of `type=good`. */ - shippable?: boolean - /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ - statement_descriptor?: string - /** - * @description The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. - * @enum {string} - */ - type: 'good' | 'service' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ - updated: number - /** @description A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`. */ - url?: string - } - /** RadarReviewResourceLocation */ - radar_review_resource_location: { - /** @description The city where the payment originated. */ - city?: string - /** @description Two-letter ISO code representing the country where the payment originated. */ - country?: string - /** @description The geographic latitude where the payment originated. */ - latitude?: number - /** @description The geographic longitude where the payment originated. */ - longitude?: number - /** @description The state/county/province/region where the payment originated. */ - region?: string - } - /** RadarReviewResourceSession */ - radar_review_resource_session: { - /** @description The browser used in this browser session (e.g., `Chrome`). */ - browser?: string - /** @description Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ - device?: string - /** @description The platform for the browser session (e.g., `Macintosh`). */ - platform?: string - /** @description The version for the browser session (e.g., `61.0.3163.100`). */ - version?: string - } - /** - * RadarEarlyFraudWarning - * @description An early fraud warning indicates that the card issuer has notified us that a - * charge may be fraudulent. - * - * Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). - */ - 'radar.early_fraud_warning': { - /** @description An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this early fraud warning is for, optionally expanded. */ - charge: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.early_fraud_warning' - } - /** - * RadarListList - * @description Value lists allow you to group values together which can then be referenced in rules. - * - * Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). - */ - 'radar.value_list': { - /** @description The name of the value list for use in rules. */ - alias: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The name or email address of the user who created this value list. */ - created_by: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. - * @enum {string} - */ - item_type: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'email' | 'ip_address' | 'string' - /** - * RadarListListItemList - * @description List of items contained within this value list. - */ - list_items: { - /** @description Details about each object. */ - data: definitions['radar.value_list_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The name of the value list. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list' - } - /** - * RadarListListItem - * @description Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. - * - * Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). - */ - 'radar.value_list_item': { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The name or email address of the user who added this item to the value list. */ - created_by: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list_item' - /** @description The value of the item. */ - value: string - /** @description The identifier of the value list this item belongs to. */ - value_list: string - } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead. If you are already using recipients, please see our - * [migration guide](https://stripe.com/docs/connect/recipient-account-migrations) for more information.** - */ - recipient: { - active_account?: definitions['bank_account'] - /** CardList */ - cards?: { - data: definitions['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - email?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: string - /** @description Full, legal name of the recipient. */ - name?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'recipient' - rolled_back_from?: string - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string - } - /** - * Refund - * @description `Refund` objects allow you to refund a charge that has previously been created - * but not yet refunded. Funds will be refunded to the credit or debit card that - * was originally charged. - * - * Related guide: [Refunds](https://stripe.com/docs/refunds). - */ - refund: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: string - /** @description ID of the charge that was refunded. */ - charge?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ - description?: string - /** @description If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - failure_balance_transaction?: string - /** @description If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ - failure_reason?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'refund' - /** @description ID of the PaymentIntent that was refunded. */ - payment_intent?: string - /** @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ - reason?: string - /** @description This is the transaction number that appears on email receipts sent for this refund. */ - receipt_number?: string - /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ - source_transfer_reversal?: string - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ - status?: string - /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ - transfer_reversal?: string - } - /** - * reporting_report_run - * @description The Report Run object represents an instance of a report type generated with - * specific run parameters. Once the object is created, Stripe begins processing the report. - * When the report has finished running, it will give you a reference to a file - * where you can retrieve your results. For an overview, see - * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). - * - * Note that reports can only be run based on your live-mode data (not test-mode - * data), and thus related requests must be made with a - * [live-mode API key](https://stripe.com/docs/keys#test-live-modes). - */ - 'reporting.report_run': { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** - * @description If something should go wrong during the run, a message about the failure (populated when - * `status=failed`). - */ - error?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Always `true`: reports can only be run on live-mode data. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reporting.report_run' - parameters: definitions['financial_reporting_finance_report_run_run_parameters'] - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string - result?: definitions['file'] - /** - * @description Status of this report run. This will be `pending` when the run is initially created. - * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. - * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. - */ - status: string - /** - * @description Timestamp at which this run successfully finished (populated when - * `status=succeeded`). Measured in seconds since the Unix epoch. - */ - succeeded_at?: number - } - /** - * reporting_report_type - * @description The Report Type resource corresponds to a particular type of report, such as - * the "Activity summary" or "Itemized payouts" reports. These objects are - * identified by an ID belonging to a set of enumerated values. See - * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) - * for those Report Type IDs, along with required and optional parameters. - * - * Note that reports can only be run based on your live-mode data (not test-mode - * data), and thus related requests must be made with a - * [live-mode API key](https://stripe.com/docs/keys#test-live-modes). - */ - 'reporting.report_type': { - /** @description Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. */ - data_available_end: number - /** @description Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. */ - data_available_start: number - /** @description List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) */ - default_columns?: string[] - /** @description The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ - id: string - /** @description Human-readable name of the Report Type */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reporting.report_type' - /** @description When this Report Type was latest updated. Measured in seconds since the Unix epoch. */ - updated: number - /** @description Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. */ - version: number - } - /** ReserveTransaction */ - reserve_transaction: { - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reserve_transaction' - } - /** - * RadarReview - * @description Reviews can be used to supplement automated fraud detection with human expertise. - * - * Learn more about [Radar](/radar) and reviewing payments - * [here](https://stripe.com/docs/radar/reviews). - */ - review: { - /** @description The ZIP or postal code of the card used, if applicable. */ - billing_zip?: string - /** @description The charge associated with this review. */ - charge?: string - /** - * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. - * @enum {string} - */ - closed_reason?: 'approved' | 'disputed' | 'refunded' | 'refunded_as_fraud' - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description The IP address where the payment originated. */ - ip_address?: string - ip_address_location?: definitions['radar_review_resource_location'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'review' - /** @description If `true`, the review needs action. */ - open: boolean - /** - * @description The reason the review was opened. One of `rule` or `manual`. - * @enum {string} - */ - opened_reason: 'manual' | 'rule' - /** @description The PaymentIntent ID associated with this review, if one exists. */ - payment_intent?: string - /** @description The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ - reason: string - session?: definitions['radar_review_resource_session'] - } - /** RadarRule */ - rule: { - /** @description The action taken on the payment. */ - action: string - /** @description Unique identifier for the object. */ - id: string - /** @description The predicate to evaluate the payment against. */ - predicate: string - } - /** - * ScheduledQueryRun - * @description If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll - * receive a `sigma.scheduled_query_run.created` webhook each time the query - * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to - * retrieve the query results. - */ - scheduled_query_run: { - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description When the query was run, Sigma contained a snapshot of your Stripe data at this time. */ - data_load_time: number - error?: definitions['sigma_scheduled_query_run_error'] - file?: definitions['file'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'scheduled_query_run' - /** @description Time at which the result expires and is no longer available for download. */ - result_available_until: number - /** @description SQL for the query. */ - sql: string - /** @description The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ - status: string - /** @description Title of the query. */ - title: string - } - /** - * SetupIntent - * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides - * you through the setup process. - * - * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. - * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. - * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. - * - * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). - */ - setup_intent: { - /** @description ID of the Connect application that created the SetupIntent. */ - application?: string - /** - * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** - * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. - * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - */ - client_secret?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Unique identifier for the object. */ - id: string - last_setup_error?: definitions['api_errors'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description ID of the multi use Mandate generated by the SetupIntent. */ - mandate?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - next_action?: definitions['setup_intent_next_action'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'setup_intent' - /** @description The account (if any) for which the setup is intended. */ - on_behalf_of?: string - /** @description ID of the payment method used with this SetupIntent. */ - payment_method?: string - payment_method_options?: definitions['setup_intent_payment_method_options'] - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ - payment_method_types: string[] - /** @description ID of the single_use Mandate generated by the SetupIntent. */ - single_use_mandate?: string - /** - * @description [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. - * @enum {string} - */ - status: 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' - /** - * @description Indicates how the payment method is intended to be used in the future. - * - * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. - */ - usage: string - } - /** SetupIntentNextAction */ - setup_intent_next_action: { - redirect_to_url?: definitions['setup_intent_next_action_redirect_to_url'] - /** @description Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ - type: string - /** @description When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ - use_stripe_sdk?: { [key: string]: unknown } - } - /** SetupIntentNextActionRedirectToUrl */ - setup_intent_next_action_redirect_to_url: { - /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ - return_url?: string - /** @description The URL you must redirect your customer to in order to authenticate. */ - url?: string - } - /** SetupIntentPaymentMethodOptions */ - setup_intent_payment_method_options: { - card?: definitions['setup_intent_payment_method_options_card'] - } - /** setup_intent_payment_method_options_card */ - setup_intent_payment_method_options_card: { - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string} - */ - request_three_d_secure?: 'any' | 'automatic' | 'challenge_only' - } - /** Shipping */ - shipping: { - address?: definitions['address'] - /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ - carrier?: string - /** @description Recipient name. */ - name?: string - /** @description Recipient phone (including extension). */ - phone?: string - /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ - tracking_number?: string - } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - delivery_estimate?: definitions['delivery_estimate'] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } - /** SigmaScheduledQueryRunError */ - sigma_scheduled_query_run_error: { - /** @description Information about the run failure. */ - message: string - } - /** - * SKU - * @description Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). - * SKUs describe specific product variations, taking into account any combination of: attributes, - * currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents - * the `size: large`, `color: red` version of that shirt. - * - * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). - */ - sku: { - /** @description Whether the SKU is available for purchase. */ - active: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes: { [key: string]: unknown } - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - inventory: definitions['inventory'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'sku' - package_dimensions?: definitions['package_dimensions'] - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. The product must be currently active. */ - product: string - /** @description Time at which the object was last updated. Measured in seconds since the Unix epoch. */ - updated: number - } - /** - * Source - * @description `Source` objects allow you to accept a variety of payment methods. They - * represent a customer's payment instrument, and can be used with the Stripe API - * just like a `Card` object: once chargeable, they can be charged, or can be - * attached to customers. - * - * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). - */ - source: { - ach_credit_transfer?: definitions['source_type_ach_credit_transfer'] - ach_debit?: definitions['source_type_ach_debit'] - alipay?: definitions['source_type_alipay'] - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. */ - amount?: number - au_becs_debit?: definitions['source_type_au_becs_debit'] - bancontact?: definitions['source_type_bancontact'] - card?: definitions['source_type_card'] - card_present?: definitions['source_type_card_present'] - /** @description The client secret of the source. Used for client-side retrieval using a publishable key. */ - client_secret: string - code_verification?: definitions['source_code_verification_flow'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. */ - currency?: string - /** @description The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. */ - customer?: string - eps?: definitions['source_type_eps'] - /** @description The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ - flow: string - giropay?: definitions['source_type_giropay'] - /** @description Unique identifier for the object. */ - id: string - ideal?: definitions['source_type_ideal'] - klarna?: definitions['source_type_klarna'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - multibanco?: definitions['source_type_multibanco'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source' - owner?: definitions['source_owner'] - p24?: definitions['source_type_p24'] - receiver?: definitions['source_receiver_flow'] - redirect?: definitions['source_redirect_flow'] - sepa_debit?: definitions['source_type_sepa_debit'] - sofort?: definitions['source_type_sofort'] - source_order?: definitions['source_order'] - /** @description Extra information about a source. This will appear on your customer's statement every time you charge the source. */ - statement_descriptor?: string - /** @description The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. */ - status: string - three_d_secure?: definitions['source_type_three_d_secure'] - /** - * @description The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. - * @enum {string} - */ - type: - | 'ach_credit_transfer' - | 'ach_debit' - | 'alipay' - | 'au_becs_debit' - | 'bancontact' - | 'card' - | 'card_present' - | 'eps' - | 'giropay' - | 'ideal' - | 'klarna' - | 'multibanco' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'three_d_secure' - | 'wechat' - /** @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. */ - usage?: string - wechat?: definitions['source_type_wechat'] - } - /** SourceCodeVerificationFlow */ - source_code_verification_flow: { - /** @description The number of attempts remaining to authenticate the source object with a verification code. */ - attempts_remaining: number - /** @description The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). */ - status: string - } - /** - * SourceMandateNotification - * @description Source mandate notifications should be created when a notification related to - * a source mandate must be sent to the payer. They will trigger a webhook or - * deliver an email to the customer. - */ - source_mandate_notification: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. */ - amount?: number - bacs_debit?: definitions['source_mandate_notification_bacs_debit_data'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source_mandate_notification' - /** @description The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. */ - reason: string - sepa_debit?: definitions['source_mandate_notification_sepa_debit_data'] - source: definitions['source'] - /** @description The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ - status: string - /** @description The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. */ - type: string - } - /** SourceMandateNotificationBacsDebitData */ - source_mandate_notification_bacs_debit_data: { - /** @description Last 4 digits of the account number associated with the debit. */ - last4?: string - } - /** SourceMandateNotificationSepaDebitData */ - source_mandate_notification_sepa_debit_data: { - /** @description SEPA creditor ID. */ - creditor_identifier?: string - /** @description Last 4 digits of the account number associated with the debit. */ - last4?: string - /** @description Mandate reference associated with the debit. */ - mandate_reference?: string - } - /** SourceOrder */ - source_order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description List of items constituting the order. */ - items?: definitions['source_order_item'][] - shipping?: definitions['shipping'] - } - /** SourceOrderItem */ - source_order_item: { - /** @description The amount (price) for this order item. */ - amount?: number - /** @description This currency of this order item. Required when `amount` is present. */ - currency?: string - /** @description Human-readable description for this order item. */ - description?: string - /** @description The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ - quantity?: number - /** @description The type of this order item. Must be `sku`, `tax`, or `shipping`. */ - type?: string - } - /** SourceOwner */ - source_owner: { - address?: definitions['address'] - /** @description Owner's email address. */ - email?: string - /** @description Owner's full name. */ - name?: string - /** @description Owner's phone number (including extension). */ - phone?: string - verified_address?: definitions['address'] - /** @description Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_email?: string - /** @description Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_name?: string - /** @description Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_phone?: string - } - /** SourceReceiverFlow */ - source_receiver_flow: { - /** @description The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ - address?: string - /** @description The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. */ - amount_charged: number - /** @description The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. */ - amount_received: number - /** @description The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ - amount_returned: number - /** @description Type of refund attribute method, one of `email`, `manual`, or `none`. */ - refund_attributes_method: string - /** @description Type of refund attribute status, one of `missing`, `requested`, or `available`. */ - refund_attributes_status: string - } - /** SourceRedirectFlow */ - source_redirect_flow: { - /** @description The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. */ - failure_reason?: string - /** @description The URL you provide to redirect the customer to after they authenticated their payment. */ - return_url: string - /** @description The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). */ - status: string - /** @description The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ - url: string - } - /** - * SourceTransaction - * @description Some payment methods have no required amount that a customer must send. - * Customers can be instructed to send any amount, and it can be made up of - * multiple transactions. As such, sources can have multiple associated - * transactions. - */ - source_transaction: { - ach_credit_transfer?: definitions['source_transaction_ach_credit_transfer_data'] - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. */ - amount: number - chf_credit_transfer?: definitions['source_transaction_chf_credit_transfer_data'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - gbp_credit_transfer?: definitions['source_transaction_gbp_credit_transfer_data'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source_transaction' - paper_check?: definitions['source_transaction_paper_check_data'] - sepa_credit_transfer?: definitions['source_transaction_sepa_credit_transfer_data'] - /** @description The ID of the source this transaction is attached to. */ - source: string - /** @description The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ - status: string - /** - * @description The type of source this transaction is attached to. - * @enum {string} - */ - type: - | 'ach_credit_transfer' - | 'ach_debit' - | 'alipay' - | 'bancontact' - | 'card' - | 'card_present' - | 'eps' - | 'giropay' - | 'ideal' - | 'klarna' - | 'multibanco' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'three_d_secure' - | 'wechat' - } - /** SourceTransactionAchCreditTransferData */ - source_transaction_ach_credit_transfer_data: { - /** @description Customer data associated with the transfer. */ - customer_data?: string - /** @description Bank account fingerprint associated with the transfer. */ - fingerprint?: string - /** @description Last 4 digits of the account number associated with the transfer. */ - last4?: string - /** @description Routing number associated with the transfer. */ - routing_number?: string - } - /** SourceTransactionChfCreditTransferData */ - source_transaction_chf_credit_transfer_data: { - /** @description Reference associated with the transfer. */ - reference?: string - /** @description Sender's country address. */ - sender_address_country?: string - /** @description Sender's line 1 address. */ - sender_address_line1?: string - /** @description Sender's bank account IBAN. */ - sender_iban?: string - /** @description Sender's name. */ - sender_name?: string - } - /** SourceTransactionGbpCreditTransferData */ - source_transaction_gbp_credit_transfer_data: { - /** @description Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ - fingerprint?: string - /** @description The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. */ - funding_method?: string - /** @description Last 4 digits of sender account number associated with the transfer. */ - last4?: string - /** @description Sender entered arbitrary information about the transfer. */ - reference?: string - /** @description Sender account number associated with the transfer. */ - sender_account_number?: string - /** @description Sender name associated with the transfer. */ - sender_name?: string - /** @description Sender sort code associated with the transfer. */ - sender_sort_code?: string - } - /** SourceTransactionPaperCheckData */ - source_transaction_paper_check_data: { - /** @description Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ - available_at?: string - /** @description Comma-separated list of invoice IDs associated with the paper check. */ - invoices?: string - } - /** SourceTransactionSepaCreditTransferData */ - source_transaction_sepa_credit_transfer_data: { - /** @description Reference associated with the transfer. */ - reference?: string - /** @description Sender's bank account IBAN. */ - sender_iban?: string - /** @description Sender's name. */ - sender_name?: string - } - source_type_ach_credit_transfer: { - account_number?: string - bank_name?: string - fingerprint?: string - refund_account_holder_name?: string - refund_account_holder_type?: string - refund_routing_number?: string - routing_number?: string - swift_code?: string - } - source_type_ach_debit: { - bank_name?: string - country?: string - fingerprint?: string - last4?: string - routing_number?: string - type?: string - } - source_type_alipay: { - data_string?: string - native_url?: string - statement_descriptor?: string - } - source_type_au_becs_debit: { - bsb_number?: string - fingerprint?: string - last4?: string - } - source_type_bancontact: { - bank_code?: string - bank_name?: string - bic?: string - iban_last4?: string - preferred_language?: string - statement_descriptor?: string - } - source_type_card: { - address_line1_check?: string - address_zip_check?: string - brand?: string - country?: string - cvc_check?: string - dynamic_last4?: string - exp_month?: number - exp_year?: number - fingerprint?: string - funding?: string - last4?: string - name?: string - three_d_secure?: string - tokenization_method?: string - } - source_type_card_present: { - application_cryptogram?: string - application_preferred_name?: string - authorization_code?: string - authorization_response_code?: string - brand?: string - country?: string - cvm_type?: string - data_type?: string - dedicated_file_name?: string - emv_auth_data?: string - evidence_customer_signature?: string - evidence_transaction_certificate?: string - exp_month?: number - exp_year?: number - fingerprint?: string - funding?: string - last4?: string - pos_device_id?: string - pos_entry_mode?: string - read_method?: string - reader?: string - terminal_verification_results?: string - transaction_status_information?: string - } - source_type_eps: { - reference?: string - statement_descriptor?: string - } - source_type_giropay: { - bank_code?: string - bank_name?: string - bic?: string - statement_descriptor?: string - } - source_type_ideal: { - bank?: string - bic?: string - iban_last4?: string - statement_descriptor?: string - } - source_type_klarna: { - background_image_url?: string - client_token?: string - first_name?: string - last_name?: string - locale?: string - logo_url?: string - page_title?: string - pay_later_asset_urls_descriptive?: string - pay_later_asset_urls_standard?: string - pay_later_name?: string - pay_later_redirect_url?: string - pay_now_asset_urls_descriptive?: string - pay_now_asset_urls_standard?: string - pay_now_name?: string - pay_now_redirect_url?: string - pay_over_time_asset_urls_descriptive?: string - pay_over_time_asset_urls_standard?: string - pay_over_time_name?: string - pay_over_time_redirect_url?: string - payment_method_categories?: string - purchase_country?: string - purchase_type?: string - redirect_url?: string - shipping_first_name?: string - shipping_last_name?: string - } - source_type_multibanco: { - entity?: string - reference?: string - refund_account_holder_address_city?: string - refund_account_holder_address_country?: string - refund_account_holder_address_line1?: string - refund_account_holder_address_line2?: string - refund_account_holder_address_postal_code?: string - refund_account_holder_address_state?: string - refund_account_holder_name?: string - refund_iban?: string - } - source_type_p24: { - reference?: string - } - source_type_sepa_debit: { - bank_code?: string - branch_code?: string - country?: string - fingerprint?: string - last4?: string - mandate_reference?: string - mandate_url?: string - } - source_type_sofort: { - bank_code?: string - bank_name?: string - bic?: string - country?: string - iban_last4?: string - preferred_language?: string - statement_descriptor?: string - } - source_type_three_d_secure: { - address_line1_check?: string - address_zip_check?: string - authenticated?: boolean - brand?: string - card?: string - country?: string - customer?: string - cvc_check?: string - dynamic_last4?: string - exp_month?: number - exp_year?: number - fingerprint?: string - funding?: string - last4?: string - name?: string - three_d_secure?: string - tokenization_method?: string - } - source_type_wechat: { - prepay_id?: string - qr_code_url?: string - statement_descriptor?: string - } - /** StatusTransitions */ - status_transitions: { - /** @description The time that the order was canceled. */ - canceled?: number - /** @description The time that the order was fulfilled. */ - fulfiled?: number - /** @description The time that the order was paid. */ - paid?: number - /** @description The time that the order was returned. */ - returned?: number - } - /** - * Subscription - * @description Subscriptions allow you to charge a customer on a recurring basis. - * - * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). - */ - subscription: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ - application_fee_percent?: number - /** @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ - billing_cycle_anchor: number - billing_thresholds?: definitions['subscription_billing_thresholds'] - /** @description A date in the future at which the subscription will automatically get canceled */ - cancel_at?: number - /** @description If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. */ - cancel_at_period_end: boolean - /** @description If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will still reflect the date of the initial cancellation request, not the end of the subscription period when the subscription is automatically moved to a canceled state. */ - canceled_at?: number - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. */ - current_period_end: number - /** @description Start of the current period that the subscription has been invoiced for. */ - current_period_start: number - /** @description ID of the customer who owns the subscription. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: definitions['tax_rate'][] - discount?: definitions['discount'] - /** @description If the subscription has ended, the date the subscription ended. */ - ended_at?: number - /** @description Unique identifier for the object. */ - id: string - /** - * SubscriptionItemList - * @description List of subscription items, each with an attached plan. - */ - items: { - /** @description Details about each object. */ - data: definitions['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description The most recent invoice this subscription has generated. */ - latest_invoice?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** @description Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. */ - next_pending_invoice_item_invoice?: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription' - pause_collection?: definitions['subscriptions_resource_pause_collection'] - pending_invoice_item_interval?: definitions['subscription_pending_invoice_item_interval'] - /** @description You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). */ - pending_setup_intent?: string - pending_update?: definitions['subscriptions_resource_pending_update'] - plan?: definitions['plan'] - /** @description The quantity of the plan to which the customer is subscribed. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. Only set if the subscription contains a single plan. */ - quantity?: number - /** @description The schedule attached to the subscription */ - schedule?: string - /** @description Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ - start_date: number - /** - * @description Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. - * - * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. - * - * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. - * - * If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. - * - * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. - * @enum {string} - */ - status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - /** @description If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer. */ - tax_percent?: number - /** @description If the subscription has a trial, the end of that trial. */ - trial_end?: number - /** @description If the subscription has a trial, the beginning of that trial. */ - trial_start?: number - } - /** SubscriptionBillingThresholds */ - subscription_billing_thresholds: { - /** @description Monetary threshold that triggers the subscription to create an invoice */ - amount_gte?: number - /** @description Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. */ - reset_billing_cycle_anchor?: boolean - } - /** - * SubscriptionItem - * @description Subscription items allow you to create customer subscriptions with more than - * one plan, making it easy to represent complex billing relationships. - */ - subscription_item: { - billing_thresholds?: definitions['subscription_item_billing_thresholds'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_item' - plan: definitions['plan'] - /** @description The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ - quantity?: number - /** @description The `subscription` this `subscription_item` belongs to. */ - subscription: string - /** @description The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. */ - tax_rates?: definitions['tax_rate'][] - } - /** SubscriptionItemBillingThresholds */ - subscription_item_billing_thresholds: { - /** @description Usage threshold that triggers the subscription to create an invoice */ - usage_gte?: number - } - /** SubscriptionPendingInvoiceItemInterval */ - subscription_pending_invoice_item_interval: { - /** - * @description Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count: number - } - /** - * SubscriptionSchedule - * @description A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. - * - * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). - */ - subscription_schedule: { - /** @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. */ - canceled_at?: number - /** @description Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. */ - completed_at?: number - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - current_phase?: definitions['subscription_schedule_current_phase'] - /** @description ID of the customer who owns the subscription schedule. */ - customer: string - default_settings: definitions['subscription_schedules_resource_default_settings'] - /** - * @description Behavior of the subscription schedule and underlying subscription when it ends. - * @enum {string} - */ - end_behavior: 'cancel' | 'none' | 'release' | 'renew' - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_schedule' - /** @description Configuration for the subscription schedule's phases. */ - phases: definitions['subscription_schedule_phase_configuration'][] - /** @description Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. */ - released_at?: number - /** @description ID of the subscription once managed by the subscription schedule (if it is released). */ - released_subscription?: string - /** - * @description The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). - * @enum {string} - */ - status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' - /** @description ID of the subscription managed by the subscription schedule. */ - subscription?: string - } - /** - * SubscriptionScheduleConfigurationItem - * @description A phase item describes the plan and quantity of a phase. - */ - subscription_schedule_configuration_item: { - billing_thresholds?: definitions['subscription_item_billing_thresholds'] - /** @description ID of the plan to which the customer should be subscribed. */ - plan: string - /** @description Quantity of the plan to which the customer should be subscribed. */ - quantity?: number - /** @description The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. */ - tax_rates?: definitions['tax_rate'][] - } - /** SubscriptionScheduleCurrentPhase */ - subscription_schedule_current_phase: { - /** @description The end of this phase of the subscription schedule. */ - end_date: number - /** @description The start of this phase of the subscription schedule. */ - start_date: number - } - /** - * SubscriptionSchedulePhaseConfiguration - * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. - */ - subscription_schedule_phase_configuration: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ - application_fee_percent?: number - billing_thresholds?: definitions['subscription_billing_thresholds'] - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description ID of the coupon to use during this phase of the subscription schedule. */ - coupon?: string - /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ - default_tax_rates?: definitions['tax_rate'][] - /** @description The end of this phase of the subscription schedule. */ - end_date: number - invoice_settings?: definitions['invoice_setting_subscription_schedule_setting'] - /** @description Plans to subscribe during this phase of the subscription schedule. */ - plans: definitions['subscription_schedule_configuration_item'][] - /** - * @description Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description The start of this phase of the subscription schedule. */ - start_date: number - /** @description If provided, each invoice created during this phase of the subscription schedule will apply the tax rate, increasing the amount billed to the customer. */ - tax_percent?: number - /** @description When the trial ends within the phase. */ - trial_end?: number - } - /** SubscriptionSchedulesResourceDefaultSettings */ - subscription_schedules_resource_default_settings: { - billing_thresholds?: definitions['subscription_billing_thresholds'] - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - invoice_settings?: definitions['invoice_setting_subscription_schedule_setting'] - } - /** - * SubscriptionsResourcePauseCollection - * @description The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription - * should be paused. - */ - subscriptions_resource_pause_collection: { - /** - * @description The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - * @enum {string} - */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** @description The time after which the subscription will resume collecting payments. */ - resumes_at?: number - } - /** - * SubscriptionsResourcePendingUpdate - * @description Pending Updates store the changes pending from a previous update that will be applied - * to the Subscription upon successful payment. - */ - subscriptions_resource_pending_update: { - /** @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ - billing_cycle_anchor?: number - /** @description The point after which the changes reflected by this update will be discarded and no longer applied. */ - expires_at: number - /** @description List of subscription items, each with an attached plan, that will be set if the update is applied. */ - subscription_items?: definitions['subscription_item'][] - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. */ - trial_end?: number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ - trial_from_plan?: boolean - } - /** TaxDeductedAtSource */ - tax_deducted_at_source: { - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_deducted_at_source' - /** @description The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ - period_end: number - /** @description The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ - period_start: number - /** @description The TAN that was supplied to Stripe when TDS was assessed */ - tax_deduction_account_number: string - } - /** - * tax_id - * @description You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). - * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. - * - * Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). - */ - tax_id: { - /** @description Two-letter ISO code representing the country of the tax ID. */ - country?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description ID of the customer. */ - customer: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_id' - /** - * @description Type of the tax ID, one of `au_abn`, `ca_bn`, `ca_qst`, `ch_vat`, `es_cif`, `eu_vat`, `hk_br`, `in_gst`, `jp_cn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` - * @enum {string} - */ - type: - | 'au_abn' - | 'ca_bn' - | 'ca_qst' - | 'ch_vat' - | 'es_cif' - | 'eu_vat' - | 'hk_br' - | 'in_gst' - | 'jp_cn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'unknown' - | 'us_ein' - | 'za_vat' - /** @description Value of the tax ID. */ - value: string - verification: definitions['tax_id_verification'] - } - /** tax_id_verification */ - tax_id_verification: { - /** - * @description Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. - * @enum {string} - */ - status: 'pending' | 'unavailable' | 'unverified' | 'verified' - /** @description Verified address. */ - verified_address?: string - /** @description Verified name. */ - verified_name?: string - } - /** - * TaxRate - * @description Tax rates can be applied to invoices and subscriptions to collect tax. - * - * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). - */ - tax_rate: { - /** @description Defaults to `true`. When set to `false`, this tax rate cannot be applied to objects in the API, but will still be applied to subscriptions and invoices that already have it set. */ - active: boolean - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string - /** @description The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. */ - display_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. */ - jurisdiction?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_rate' - /** @description This represents the tax rate percent out of 100. */ - percentage: number - } - /** - * TerminalConnectionToken - * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. - * - * Related guide: [Fleet Management](https://stripe.com/docs/terminal/readers/fleet-management#create). - */ - 'terminal.connection_token': { - /** @description The id of the location that this connection token is scoped to. */ - location?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.connection_token' - /** @description Your application should pass this token to the Stripe Terminal SDK. */ - secret: string - } - /** - * TerminalLocationLocation - * @description A Location represents a grouping of readers. - * - * Related guide: [Fleet Management](https://stripe.com/docs/terminal/readers/fleet-management#create). - */ - 'terminal.location': { - address: definitions['address'] - /** @description The display name of the location. */ - display_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.location' - } - /** - * TerminalReaderReader - * @description A Reader represents a physical device for accepting payment details. - * - * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/readers/connecting). - */ - 'terminal.reader': { - /** @description The current software version of the reader. */ - device_sw_version?: string - /** - * @description Type of reader, one of `bbpos_chipper2x` or `verifone_P400`. - * @enum {string} - */ - device_type: 'bbpos_chipper2x' | 'verifone_P400' - /** @description Unique identifier for the object. */ - id: string - /** @description The local IP address of the reader. */ - ip_address?: string - /** @description Custom label given to the reader for easier identification. */ - label: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The location identifier of the reader. */ - location?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.reader' - /** @description Serial number of the reader. */ - serial_number: string - /** @description The networking status of the reader. */ - status?: string - } - /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. - */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: definitions['card'] - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string - } - /** three_d_secure_details */ - three_d_secure_details: { - /** @description Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled. */ - authenticated?: boolean - /** @description Whether or not 3D Secure succeeded. */ - succeeded?: boolean - /** @description The version of 3D Secure that was used for this payment. */ - version: string - } - /** three_d_secure_usage */ - three_d_secure_usage: { - /** @description Whether 3D Secure is supported on this card. */ - supported: boolean - } - /** - * Token - * @description Tokenization is the process Stripe uses to collect sensitive card or bank - * account details, or personally identifiable information (PII), directly from - * your customers in a secure manner. A token representing this information is - * returned to your server to use. You should use our - * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process - * client-side. This ensures that no sensitive card data touches your server, - * and allows your integration to operate in a PCI-compliant way. - * - * If you cannot use client-side tokenization, you can also create tokens using - * the API with either your publishable or secret API key. Keep in mind that if - * your integration uses this method, you are responsible for any PCI compliance - * that may be required, and you must keep your secret API key safe. Unlike with - * client-side tokenization, your customer's information is not sent directly to - * Stripe, so we cannot determine how it is handled or stored. - * - * Tokens cannot be stored or used more than once. To store card or bank account - * information for later use, you can create [Customer](https://stripe.com/docs/api#customers) - * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that - * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, - * supports only integrations that use client-side tokenization. - * - * Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) - */ - token: { - bank_account?: definitions['bank_account'] - card?: definitions['card'] - /** @description IP address of the client that generated the token. */ - client_ip?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'token' - /** @description Type of the token: `account`, `bank_account`, `card`, or `pii`. */ - type: string - /** @description Whether this token has already been used (tokens can be used only once). */ - used: boolean - } - /** - * Topup - * @description To top up your Stripe balance, you create a top-up object. You can retrieve - * individual top-ups, as well as list all top-ups. Top-ups are identified by a - * unique, random ID. - * - * Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). - */ - topup: { - /** @description Amount transferred. */ - amount: number - /** @description ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. */ - balance_transaction?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. */ - expected_availability_date?: number - /** @description Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ - failure_code?: string - /** @description Message to user further explaining reason for top-up failure if available. */ - failure_message?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'topup' - source: definitions['source'] - /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ - statement_descriptor?: string - /** - * @description The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. - * @enum {string} - */ - status: 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded' - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string - } - /** - * Transfer - * @description A `Transfer` object is created when you move funds between Stripe accounts as - * part of Connect. - * - * Before April 6, 2017, transfers also represented movement of funds from a - * Stripe account to a card or bank account. This behavior has since been split - * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more - * information, read about the - * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). - * - * Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). - */ - transfer: { - /** @description Amount in %s to be transferred. */ - amount: number - /** @description Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ - amount_reversed: number - /** @description Balance transaction that describes the impact of this transfer on your account balance. */ - balance_transaction?: string - /** @description Time that this record of the transfer was first created. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description ID of the Stripe account the transfer was sent to. */ - destination?: string - /** @description If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ - destination_payment?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'transfer' - /** - * TransferReversalList - * @description A list of reversals that have been applied to the transfer. - */ - reversals: { - /** @description Details about each object. */ - data: definitions['transfer_reversal'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ - reversed: boolean - /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ - source_transaction?: string - /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - /** transfer_data */ - transfer_data: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** - * @description The account (if any) the payment will be attributed to for tax - * reporting, and where funds from the payment will be transferred to upon - * payment success. - */ - destination: string - } - /** - * TransferReversal - * @description [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a - * connected account, either entirely or partially, and can also specify whether - * to refund any related application fees. Transfer reversals add to the - * platform's balance and subtract from the destination account's balance. - * - * Reversing a transfer that was made for a [destination - * charge](/docs/connect/destination-charges) is allowed only up to the amount of - * the charge. It is possible to reverse a - * [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) - * transfer only if the destination account has enough balance to cover the - * reversal. - * - * Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). - */ - transfer_reversal: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Linked payment refund for the transfer reversal. */ - destination_payment_refund?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'transfer_reversal' - /** @description ID of the refund responsible for the transfer reversal. */ - source_refund?: string - /** @description ID of the transfer that was reversed. */ - transfer: string - } - /** TransferSchedule */ - transfer_schedule: { - /** @description The number of days charges for the account will be held before being paid out. */ - delay_days: number - /** @description How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ - interval: string - /** @description The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. */ - monthly_anchor?: number - /** @description The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ - weekly_anchor?: string - } - /** TransformUsage */ - transform_usage: { - /** @description Divide usage by this number. */ - divide_by: number - /** - * @description After division, either round the result `up` or `down`. - * @enum {string} - */ - round: 'down' | 'up' - } - /** - * UsageRecord - * @description Usage records allow you to report customer usage and metrics to Stripe for - * metered billing of subscription plans. - * - * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). - */ - usage_record: { - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'usage_record' - /** @description The usage quantity for the specified date. */ - quantity: number - /** @description The ID of the subscription item this usage record contains data for. */ - subscription_item: string - /** @description The timestamp when this usage occurred. */ - timestamp: number - } - /** UsageRecordSummary */ - usage_record_summary: { - /** @description Unique identifier for the object. */ - id: string - /** @description The invoice in which this usage period has been billed for. */ - invoice?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'usage_record_summary' - period: definitions['period'] - /** @description The ID of the subscription item this summary is describing. */ - subscription_item: string - /** @description The total usage within this usage period. */ - total_usage: number - } - /** - * NotificationWebhookEndpoint - * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be - * notified about events that happen in your Stripe account or connected - * accounts. - * - * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. - * - * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). - */ - webhook_endpoint: { - /** @description The API version events are rendered as for this webhook endpoint. */ - api_version?: string - /** @description The ID of the associated Connect application. */ - application?: string - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description An optional description of what the wehbook is used for. */ - description?: string - /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ - enabled_events: string[] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: unknown } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'webhook_endpoint' - /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ - secret?: string - /** @description The status of the webhook. It can be `enabled` or `disabled`. */ - status: string - /** @description The URL of the webhook endpoint. */ - url: string - } -} - -export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['three_d_secure'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a 3D Secure object.

*/ - Get3dSecureThreeDSecure: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - three_d_secure: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['three_d_secure'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccount: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - support_email?: string - support_phone?: string - support_url?: string - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * company_specs - * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - phone?: string - /** @enum {string} */ - structure?: - | '' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** @description Email address of the account representative. For Standard accounts, this is used to ask them to claim their Stripe account. For Custom accounts, this only makes the account easier to identify to platforms; Stripe does not email the account representative. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: unknown - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: unknown - phone?: string - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ - requested_capabilities?: ( - | 'au_becs_debit_payments' - | 'card_issuing' - | 'card_payments' - | 'jcb_payments' - | 'legacy_payments' - | 'tax_reporting_us_1099_k' - | 'tax_reporting_us_1099_misc' - | 'transfers' - )[] - /** - * settings_specs - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: unknown - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - date?: number - ip?: string - user_agent?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

With Connect, you can delete Custom or Express accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - DeleteAccount: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - account?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect their user to in order to take them through the Connect Onboarding flow.

*/ - PostAccountLinks: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The identifier of the account to create an account link for. */ - account: string - /** - * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. - * @enum {string} - */ - collect?: 'currently_due' | 'eventually_due' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the user will be redirected to if the account link is no longer valid. */ - failure_url: string - /** @description The URL that the user will be redirected to upon leaving or completing the linked flow successfully. */ - success_url: string - /** - * @description The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`. - * @enum {string} - */ - type: 'custom_account_update' | 'custom_account_verification' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountBankAccounts: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountBankAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountBankAccountsId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountBankAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - GetAccountCapabilities: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['capability'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves information about the specified Account Capability.

*/ - GetAccountCapabilitiesCapability: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - capability: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['capability'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing Account Capability.

*/ - PostAccountCapabilitiesCapability: { - parameters: { - path: { - capability: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ - requested?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['capability'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List external accounts for an account.

*/ - GetAccountExternalAccounts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: definitions['bank_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountExternalAccounts: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountExternalAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountExternalAccountsId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountExternalAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - PostAccountLoginLinks: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - account: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['login_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Invalidates all sessions for a light account, for a platform to use during platform logout.

- * - *

You may only log out Express accounts connected to your platform.

- */ - PutAccountLogout: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - account: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['light_account_logout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountPeople: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new person.

*/ - PostAccountPeople: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountPeoplePerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing person.

*/ - PostAccountPeoplePerson: { - parameters: { - path: { - person: string - } - body: { - /** Body parameters for the request. */ - payload?: { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountPeoplePerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountPersons: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new person.

*/ - PostAccountPersons: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountPersonsPerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing person.

*/ - PostAccountPersonsPerson: { - parameters: { - path: { - person: string - } - body: { - /** Body parameters for the request. */ - payload?: { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountPersonsPerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ - GetAccounts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

With Connect, you can create Stripe accounts for your users. - * To do this, you’ll first need to register your platform.

- * - *

For Standard accounts, parameters other than country, email, and type - * are used to prefill the account application that we ask the account holder to complete.

- */ - PostAccounts: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - support_email?: string - support_phone?: string - support_url?: string - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * company_specs - * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - phone?: string - /** @enum {string} */ - structure?: - | '' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ - country?: string - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** @description The email address of the account holder. For Custom accounts, this is only to make the account easier to identify to you: Stripe will never directly email your users. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: unknown - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: unknown - phone?: string - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ - requested_capabilities?: ( - | 'au_becs_debit_payments' - | 'card_issuing' - | 'card_payments' - | 'jcb_payments' - | 'legacy_payments' - | 'tax_reporting_us_1099_k' - | 'tax_reporting_us_1099_misc' - | 'transfers' - )[] - /** - * settings_specs - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: unknown - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - date?: number - ip?: string - user_agent?: string - } - /** - * @description The type of Stripe account to create. Currently must be `custom`, as only [Custom accounts](https://stripe.com/docs/connect/custom-accounts) may be created via the API. - * @enum {string} - */ - type?: 'custom' | 'express' | 'standard' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccountsAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates a connected Express or Custom account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are supported by both account types.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccountsAccount: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - support_email?: string - support_phone?: string - support_url?: string - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * company_specs - * @description Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - phone?: string - /** @enum {string} */ - structure?: - | '' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** @description Email address of the account representative. For Standard accounts, this is used to ask them to claim their Stripe account. For Custom accounts, this only makes the account easier to identify to platforms; Stripe does not email the account representative. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: unknown - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: unknown - phone?: string - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The set of capabilities you want to unlock for this account. Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. */ - requested_capabilities?: ( - | 'au_becs_debit_payments' - | 'card_issuing' - | 'card_payments' - | 'jcb_payments' - | 'legacy_payments' - | 'tax_reporting_us_1099_k' - | 'tax_reporting_us_1099_misc' - | 'transfers' - )[] - /** - * settings_specs - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: unknown - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - date?: number - ip?: string - user_agent?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

With Connect, you can delete Custom or Express accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - DeleteAccountsAccount: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountsAccountBankAccounts: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountsAccountBankAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - GetAccountsAccountCapabilities: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['capability'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves information about the specified Account Capability.

*/ - GetAccountsAccountCapabilitiesCapability: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - capability: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['capability'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing Account Capability.

*/ - PostAccountsAccountCapabilitiesCapability: { - parameters: { - path: { - account: string - capability: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ - requested?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['capability'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List external accounts for an account.

*/ - GetAccountsAccountExternalAccounts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: definitions['bank_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountsAccountExternalAccounts: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountsAccountExternalAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the metadata, account holder name, and account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_external_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - PostAccountsAccountLoginLinks: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['login_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Invalidates all sessions for a light account, for a platform to use during platform logout.

- * - *

You may only log out Express accounts connected to your platform.

- */ - PutAccountsAccountLogout: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['light_account_logout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountsAccountPeople: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new person.

*/ - PostAccountsAccountPeople: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountsAccountPeoplePerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing person.

*/ - PostAccountsAccountPeoplePerson: { - parameters: { - path: { - account: string - person: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountsAccountPeoplePerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountsAccountPersons: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new person.

*/ - PostAccountsAccountPersons: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountsAccountPersonsPerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing person.

*/ - PostAccountsAccountPersonsPerson: { - parameters: { - path: { - account: string - person: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: unknown - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - /** @description The last 4 digits of the person's social security number. */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountsAccountPersonsPerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_person'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

With Connect, you may flag accounts as suspicious.

- * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

- */ - PostAccountsAccountReject: { - parameters: { - path: { - account: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ - reason: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List apple pay domains.

*/ - GetApplePayDomains: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - domain_name?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['apple_pay_domain'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create an apple pay domain.

*/ - PostApplePayDomains: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - domain_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['apple_pay_domain'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve an apple pay domain.

*/ - GetApplePayDomainsDomain: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - domain: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['apple_pay_domain'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete an apple pay domain.

*/ - DeleteApplePayDomainsDomain: { - parameters: { - path: { - domain: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_apple_pay_domain'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ - GetApplicationFees: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return application fees for the charge specified by this charge ID. */ - charge?: string - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['application_fee'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ - GetApplicationFeesFeeRefundsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - fee: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['fee_refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - PostApplicationFeesFeeRefundsId: { - parameters: { - path: { - fee: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['fee_refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ - GetApplicationFeesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['application_fee'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - PostApplicationFeesIdRefund: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - amount?: number - directive?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['application_fee'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - GetApplicationFeesIdRefunds: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['fee_refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Refunds an application fee that has previously been collected but not yet refunded. - * Funds will be refunded to the Stripe account from which the fee was originally collected.

- * - *

You can optionally refund only part of an application fee. - * You can do so multiple times, until the entire fee has been refunded.

- * - *

Once entirely refunded, an application fee can’t be refunded again. - * This method will raise an error when called on an already-refunded application fee, - * or when trying to refund more money than is left on an application fee.

- */ - PostApplicationFeesIdRefunds: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['fee_refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the current account balance, based on the authentication that was used to make the request. - * For a sample request, see Accounting for negative balances.

- */ - GetBalance: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['balance'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - GetBalanceTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - available_on?: number - created?: number - /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ - payout?: string - /** Only returns the original transaction. */ - source?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only returns transactions of the given type. One of: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - GetBalanceTransactionsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['balance_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - GetBalanceHistory: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - available_on?: number - created?: number - /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ - payout?: string - /** Only returns the original transaction. */ - source?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only returns transactions of the given type. One of: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - GetBalanceHistoryId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['balance_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a session of the self-serve Portal.

*/ - PostBillingPortalSessions: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The ID of an existing customer. */ - customer: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL to which Stripe should send customers when they click on the link to return to your website. This field is required if a default return URL has not been configured for the portal. */ - return_url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['billing_portal.session'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - GetBitcoinReceivers: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Filter for active receivers. */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Filter for filled receivers. */ - filled?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Filter for receivers with uncaptured funds. */ - uncaptured_funds?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['bitcoin_receiver'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bitcoin_receiver'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - receiver: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - receiver?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ - GetCharges: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** Only return charges for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return charges for this transfer group. */ - transfer_group?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['charge'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ - PostCharges: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee_amount?: number - /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire in _seven days_. For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ - capture?: boolean - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: unknown - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description The ID of an existing customer that will be charged in this request. */ - customer?: string - /** @description An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ - description?: string - /** destination_specs */ - destination?: { - account: string - amount?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ - on_behalf_of?: string - /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** - * shipping - * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. - */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. */ - source?: string - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_specs - * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - */ - transfer_data?: { - amount?: number - destination: string - } - /** @description A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['charge'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ - GetChargesCharge: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['charge'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostChargesCharge: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. */ - customer?: string - /** @description An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * fraud_details - * @description A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. - */ - fraud_details?: { - /** @enum {string} */ - user_report: '' | 'fraudulent' | 'safe' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. */ - receipt_email?: string - /** - * shipping - * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. - */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['charge'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

- * - *

Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

- */ - PostChargesChargeCapture: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ - amount?: number - /** @description An application fee to add on to this charge. */ - application_fee?: number - /** @description An application fee amount to add on to this charge, which must be less than or equal to the original amount. */ - application_fee_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. */ - receipt_email?: string - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_specs - * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - */ - transfer_data?: { - amount?: number - } - /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['charge'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a dispute for a specified charge.

*/ - GetChargesChargeDispute: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - PostChargesChargeDispute: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string - billing_address?: string - cancellation_policy?: string - cancellation_policy_disclosure?: string - cancellation_rebuttal?: string - customer_communication?: string - customer_email_address?: string - customer_name?: string - customer_purchase_ip?: string - customer_signature?: string - duplicate_charge_documentation?: string - duplicate_charge_explanation?: string - duplicate_charge_id?: string - product_description?: string - receipt?: string - refund_policy?: string - refund_policy_disclosure?: string - refund_refusal_explanation?: string - service_date?: string - service_documentation?: string - shipping_address?: string - shipping_carrier?: string - shipping_date?: string - shipping_documentation?: string - shipping_tracking_number?: string - uncategorized_file?: string - uncategorized_text?: string - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - PostChargesChargeDisputeClose: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

- * - *

Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged.

- * - *

You can optionally refund only part of a charge. - * You can do so multiple times, until the entire charge has been refunded.

- * - *

Once entirely refunded, a charge can’t be refunded again. - * This method will raise an error when called on an already-refunded charge, - * or when trying to refund more money than is left on a charge.

- */ - PostChargesChargeRefund: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - metadata?: unknown - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['charge'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - GetChargesChargeRefunds: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create a refund.

*/ - PostChargesChargeRefunds: { - parameters: { - path: { - charge: string - } - body: { - /** Body parameters for the request. */ - payload?: { - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing refund.

*/ - GetChargesChargeRefundsRefund: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - charge: string - refund: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Update a specified refund.

*/ - PostChargesChargeRefundsRefund: { - parameters: { - path: { - charge: string - refund: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Checkout Sessions.

*/ - GetCheckoutSessions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return the Checkout Session for the PaymentIntent specified. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return the Checkout Session for the subscription specified. */ - subscription?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['checkout.session'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a Session object.

*/ - PostCheckoutSessions: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** - * @description Specify whether Checkout should collect the customer's billing address. - * @enum {string} - */ - billing_address_collection?: 'auto' | 'required' - /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string - /** - * @description A unique string to reference the Checkout Session. This can be a - * customer ID, a cart ID, or similar, and can be used to reconcile the - * session with your internal systems. - */ - client_reference_id?: string - /** - * @description ID of an existing customer, if one exists. The email stored on the - * customer will be used to prefill the email field on the Checkout page. - * If the customer changes their email on the Checkout page, the Customer - * object will be updated with the new email. - * If blank for Checkout Sessions in `payment` or `subscription` mode, - * Checkout will create a new customer object based on information - * provided during the session. - */ - customer?: string - /** - * @description If provided, this value will be used when the Customer object is created. - * If not provided, customers will be asked to enter their email address. - * Use this parameter to prefill customer data if you already have an email - * on file. To access information about the customer once a session is - * complete, use the `customer` field. - */ - customer_email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description A list of items the customer is purchasing. Use this parameter for - * one-time payments or adding invoice line items to a subscription (used - * in conjunction with `subscription_data`). - */ - line_items?: { - amount?: number - currency?: string - description?: string - images?: string[] - name?: string - quantity: number - tax_rates?: string[] - }[] - /** - * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - * @enum {string} - */ - locale?: 'auto' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'it' | 'ja' | 'ms' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'sv' | 'zh' - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** - * @description The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. - * @enum {string} - */ - mode?: 'payment' | 'setup' | 'subscription' - /** - * payment_intent_data_params - * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - */ - payment_intent_data?: { - application_fee_amount?: number - /** @enum {string} */ - capture_method?: 'automatic' | 'manual' - description?: string - metadata?: { [key: string]: unknown } - on_behalf_of?: string - receipt_email?: string - /** @enum {string} */ - setup_future_usage?: 'off_session' | 'on_session' - /** shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - statement_descriptor?: string - statement_descriptor_suffix?: string - /** transfer_data_params */ - transfer_data?: { - amount?: number - destination: string - } - } - /** @description A list of the types of payment methods (e.g., card) this Checkout session can accept. */ - payment_method_types: ('card' | 'fpx' | 'ideal')[] - /** - * setup_intent_data_param - * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - */ - setup_intent_data?: { - description?: string - metadata?: { [key: string]: unknown } - on_behalf_of?: string - } - /** - * shipping_address_collection_params - * @description When set, provides configuration for Checkout to collect a shipping address from a customer. - */ - shipping_address_collection?: { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** - * @description Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - * in `subscription` or `setup` mode. - * @enum {string} - */ - submit_type?: 'auto' | 'book' | 'donate' | 'pay' - /** - * subscription_data_params - * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - */ - subscription_data?: { - application_fee_percent?: number - coupon?: string - default_tax_rates?: string[] - items?: { - plan: string - quantity?: number - tax_rates?: string[] - }[] - metadata?: { [key: string]: unknown } - trial_end?: number - trial_from_plan?: boolean - trial_period_days?: number - } - /** - * @description The URL to which Stripe should send customers when payment or setup - * is complete. - * If you’d like access to the Checkout Session for the successful - * payment, read more about it in our guide on [fulfilling your payments - * with webhooks](/docs/payments/checkout/fulfillment#webhooks). - */ - success_url: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['checkout.session'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a Session object.

*/ - GetCheckoutSessionsSession: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['checkout.session'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Lists all Country Spec objects available in the API.

*/ - GetCountrySpecs: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['country_spec'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a Country Spec for a given Country code.

*/ - GetCountrySpecsCountry: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - country: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['country_spec'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your coupons.

*/ - GetCoupons: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['coupon'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

- * - *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

- */ - PostCoupons: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ - amount_off?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ - currency?: string - /** - * @description Specifies how long the discount will be in effect. Can be `forever`, `once`, or `repeating`. - * @enum {string} - */ - duration: 'forever' | 'once' | 'repeating' - /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ - duration_in_months?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific code you'll give to your customer to use when signing up (e.g., `FALL25OFF`). If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ - id?: string - /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ - max_redemptions?: number - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string - /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ - percent_off?: number - /** @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. */ - redeem_by?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['coupon'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the coupon with the given ID.

*/ - GetCouponsCoupon: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - coupon: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['coupon'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ - PostCouponsCoupon: { - parameters: { - path: { - coupon: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['coupon'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ - DeleteCouponsCoupon: { - parameters: { - path: { - coupon: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_coupon'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of credit notes.

*/ - GetCreditNotes: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return credit notes for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return credit notes for the invoice specified by this invoice ID. */ - invoice?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['credit_note'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - * in any combination of the following:

- * - *
    - *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • - *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • - *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • - *
- * - *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

- * - *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount - * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

- */ - PostCreditNotes: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The integer amount in **%s** representing the total amount of the credit note. */ - amount?: number - /** @description The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the invoice. */ - invoice: string - /** @description Line items that make up the credit note. */ - lines?: { - amount?: number - description?: string - invoice_line_item?: string - quantity?: number - tax_rates?: string[] - /** @enum {string} */ - type: 'custom_line_item' | 'invoice_line_item' - unit_amount?: number - unit_amount_decimal?: string - }[] - /** @description The credit note's memo appears on the credit note PDF. */ - memo?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The integer amount in **%s** representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** - * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - * @enum {string} - */ - reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' - /** @description ID of an existing refund to link this credit note to. */ - refund?: string - /** @description The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['credit_note'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetCreditNotesCreditNoteLines: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - credit_note: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the credit note object with the given identifier.

*/ - GetCreditNotesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['credit_note'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing credit note.

*/ - PostCreditNotesId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Credit note memo. */ - memo?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['credit_note'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ - PostCreditNotesIdVoid: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['credit_note'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Get a preview of a credit note without creating it.

*/ - GetCreditNotesPreview: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The integer amount in **%s** representing the total amount of the credit note. */ - amount?: number - /** The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** ID of the invoice. */ - invoice: string - /** Line items that make up the credit note. */ - lines?: unknown[] - /** The credit note's memo appears on the credit note PDF. */ - memo?: string - /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: string - /** The integer amount in **%s** representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ - reason?: string - /** ID of an existing refund to link this credit note to. */ - refund?: string - /** The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['credit_note'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ - GetCreditNotesPreviewLines: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The integer amount in **%s** representing the total amount of the credit note. */ - amount?: number - /** The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** ID of the invoice. */ - invoice: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Line items that make up the credit note. */ - lines?: unknown[] - /** The credit note's memo appears on the credit note PDF. */ - memo?: string - /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: string - /** The integer amount in **%s** representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ - reason?: string - /** ID of an existing refund to link this credit note to. */ - refund?: string - /** The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ - GetCustomers: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A filter on the list based on the customer's `email` field. The value must be a string. */ - email?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['customer'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new customer object.

*/ - PostCustomers: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The customer's address. */ - address?: unknown - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: { - name: string - value: string - }[] - default_payment_method?: string - footer?: string - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The customer's full name or business name. */ - name?: string - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number - /** @description ID of the PaymentMethod to attach to the customer */ - payment_method?: string - /** @description The customer's phone number. */ - phone?: string - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[] - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: unknown - /** - * @description The source can be a [Token](https://stripe.com/docs/api#tokens) or a [Source](https://stripe.com/docs/api#sources), as returned by [Elements](https://stripe.com/docs/elements). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer to be charged automatically for a plan that is not free. - * - * Passing `source` will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source, instead use the [card creation API](https://stripe.com/docs/api#create_card) to add the card and then the [customer update API](https://stripe.com/docs/api#update_customer) to set it as the default. - * - * Whenever you attach a card to a customer, Stripe will automatically validate the card. - */ - source?: string - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description The customer's tax IDs. */ - tax_id_data?: { - /** @enum {string} */ - type: - | 'au_abn' - | 'ca_bn' - | 'ca_qst' - | 'ch_vat' - | 'es_cif' - | 'eu_vat' - | 'hk_br' - | 'in_gst' - | 'jp_cn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'us_ein' - | 'za_vat' - value: string - }[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.

*/ - GetCustomersCustomer: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

- * - *

This request accepts mostly the same arguments as the customer creation call.

- */ - PostCustomersCustomer: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The customer's address. */ - address?: unknown - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: unknown - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description ID of Alipay account to make the customer's new default for invoice payments. */ - default_alipay_account?: string - /** @description ID of bank account to make the customer's new default for invoice payments. */ - default_bank_account?: string - /** @description ID of card to make the customer's new default for invoice payments. */ - default_card?: string - /** - * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - * - * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - * - * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - */ - default_source?: string - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: { - name: string - value: string - }[] - default_payment_method?: string - footer?: string - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The customer's full name or business name. */ - name?: string - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number - /** @description The customer's phone number. */ - phone?: string - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[] - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: unknown - /** - * @description The source can be a [Token](https://stripe.com/docs/api#tokens) or a [Source](https://stripe.com/docs/api#sources), as returned by [Elements](https://stripe.com/docs/elements). You must provide a source if the customer does not already have a valid source attached, and you are subscribing the customer to be charged automatically for a plan that is not free. - * - * Passing `source` will create a new source object, make it the customer default source, and delete the old customer default if one exists. If you want to add an additional source, instead use the [card creation API](https://stripe.com/docs/api#create_card) to add the card and then the [customer update API](https://stripe.com/docs/api#update_customer) to set it as the default. - * - * Whenever you attach a card to a customer, Stripe will automatically validate the card. - */ - source?: string - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ - DeleteCustomersCustomer: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_customer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of transactions that updated the customer’s balance.

*/ - GetCustomersCustomerBalanceTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['customer_balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates an immutable transaction that updates the customer’s balance.

*/ - PostCustomersCustomerBalanceTransactions: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** @description The integer amount in **%s** to apply to the customer's balance. Pass a negative amount to credit the customer's balance, and pass in a positive amount to debit the customer's balance. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer_balance_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a specific transaction that updated the customer’s balance.

*/ - GetCustomersCustomerBalanceTransactionsTransaction: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer_balance_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Most customer balance transaction fields are immutable, but you may update its description and metadata.

*/ - PostCustomersCustomerBalanceTransactionsTransaction: { - parameters: { - path: { - customer: string - transaction: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['customer_balance_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ - GetCustomersCustomerBankAccounts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['bank_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerBankAccounts: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: unknown - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ - GetCustomersCustomerBankAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerBankAccountsIdVerify: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

You can see a list of the cards belonging to a customer. - * Note that the 10 most recent sources are always available on the Customer object. - * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

- */ - GetCustomersCustomerCards: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerCards: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: unknown - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ - GetCustomersCustomerCardsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['card'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerCardsId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerCardsId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - GetCustomersCustomerDiscount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['discount'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_discount'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter sources according to a particular object type. */ - object?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['alipay_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerSources: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js), or a dictionary containing a user's bank account details. */ - bank_account?: unknown - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: unknown - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve a specified source for a given customer.

*/ - GetCustomersCustomerSourcesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerSourcesId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerSourcesId: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_payment_source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerSourcesIdVerify: { - parameters: { - path: { - customer: string - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['bank_account'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ - GetCustomersCustomerSubscriptions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new subscription on an existing customer.

*/ - PostCustomersCustomerSubscriptions: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. */ - backdate_start_date?: number - /** @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: unknown - metadata?: { [key: string]: unknown } - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: unknown - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: unknown - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: unknown - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. */ - trial_period_days?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - PostCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: unknown - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: unknown - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: unknown - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: unknown - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: unknown - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. */ - proration_date?: number - /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: unknown - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: unknown - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ - trial_from_plan?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - DeleteCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['discount'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_discount'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of tax IDs for a customer.

*/ - GetCustomersCustomerTaxIds: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['tax_id'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new TaxID object for a customer.

*/ - PostCustomersCustomerTaxIds: { - parameters: { - path: { - customer: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description Type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, or `sg_gst` - * @enum {string} - */ - type: - | 'au_abn' - | 'ca_bn' - | 'ca_qst' - | 'ch_vat' - | 'es_cif' - | 'eu_vat' - | 'hk_br' - | 'in_gst' - | 'jp_cn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'us_ein' - | 'za_vat' - /** @description Value of the tax ID. */ - value: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['tax_id'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the TaxID object with the given identifier.

*/ - GetCustomersCustomerTaxIdsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['tax_id'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an existing TaxID object.

*/ - DeleteCustomersCustomerTaxIdsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_tax_id'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your disputes.

*/ - GetDisputes: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return disputes associated to the charge specified by this charge ID. */ - charge?: string - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['dispute'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the dispute with the given ID.

*/ - GetDisputesDispute: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

- * - *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

- */ - PostDisputesDispute: { - parameters: { - path: { - dispute: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string - billing_address?: string - cancellation_policy?: string - cancellation_policy_disclosure?: string - cancellation_rebuttal?: string - customer_communication?: string - customer_email_address?: string - customer_name?: string - customer_purchase_ip?: string - customer_signature?: string - duplicate_charge_documentation?: string - duplicate_charge_explanation?: string - duplicate_charge_id?: string - product_description?: string - receipt?: string - refund_policy?: string - refund_policy_disclosure?: string - refund_refusal_explanation?: string - service_date?: string - service_documentation?: string - shipping_address?: string - shipping_carrier?: string - shipping_date?: string - shipping_documentation?: string - shipping_tracking_number?: string - uncategorized_file?: string - uncategorized_text?: string - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

- * - *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

- */ - PostDisputesDisputeClose: { - parameters: { - path: { - dispute: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a short-lived API key for a given resource.

*/ - PostEphemeralKeys: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ - issuing_card?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['ephemeral_key'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Invalidates a short-lived API key for a given resource.

*/ - DeleteEphemeralKeysKey: { - parameters: { - path: { - key: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['ephemeral_key'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ - GetEvents: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ - delivery_success?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ - type?: string - /** An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ - types?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['event'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ - GetEventsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['event'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ - GetExchangeRates: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['exchange_rate'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ - GetExchangeRatesCurrency: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - currency: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['exchange_rate'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of file links.

*/ - GetFileLinks: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Filter links by their expiration status. By default, all links are returned. */ - expired?: boolean - /** Only return links for the given file. */ - file?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['file_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new file link object.

*/ - PostFileLinks: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A future timestamp after which the link will no longer be usable. */ - expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `pci_document`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ - file: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['file_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the file link with the given ID.

*/ - GetFileLinksLink: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - link: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['file_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing file link object. Expired links can no longer be updated.

*/ - PostFileLinksLink: { - parameters: { - path: { - link: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: unknown - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['file_link'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ - GetFiles: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The file purpose to filter queries by. If none is provided, files will not be filtered by purpose. */ - purpose?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['file'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

- * - *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

- */ - PostFiles: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ - file: string - /** - * file_link_creation_params - * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. - */ - file_link_data?: { - create: boolean - expires_at?: number - metadata?: unknown - } - /** - * @description The purpose of the uploaded file. Possible values are `additional_verification`, `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `identity_document`, `pci_document`, or `tax_document_user_upload`. - * @enum {string} - */ - purpose: - | 'additional_verification' - | 'business_icon' - | 'business_logo' - | 'customer_signature' - | 'dispute_evidence' - | 'identity_document' - | 'pci_document' - | 'tax_document_user_upload' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['file'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ - GetFilesFile: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - file: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['file'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ - GetInvoiceitems: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. */ - invoice?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. */ - pending?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['invoiceitem'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates an item to be added to a draft invoice. If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ - PostInvoiceitems: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The integer amount in **%s** of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ - amount?: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: string - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ - discountable?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices. */ - invoice?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** - * period - * @description The period associated with this invoice item. - */ - period?: { - end: number - start: number - } - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number - /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ - subscription?: string - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ - tax_rates?: string[] - /** @description The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ - unit_amount?: number - /** @description Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ - unit_amount_decimal?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoiceitem'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the invoice item with the given ID.

*/ - GetInvoiceitemsInvoiceitem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - invoiceitem: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoiceitem'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ - PostInvoiceitemsInvoiceitem: { - parameters: { - path: { - invoiceitem: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The integer amount in **%s** of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ - amount?: number - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ - discountable?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** - * period - * @description The period associated with this invoice item. - */ - period?: { - end: number - start: number - } - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] - /** @description The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ - unit_amount?: number - /** @description Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ - unit_amount_decimal?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoiceitem'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ - DeleteInvoiceitemsInvoiceitem: { - parameters: { - path: { - invoiceitem: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_invoiceitem'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ - GetInvoices: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: string - created?: number - /** Only return invoices for the customer specified by this customer ID. */ - customer?: string - due_date?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) */ - status?: string - /** Only return invoices for the subscription specified by this subscription ID. */ - subscription?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['invoice'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.

*/ - PostInvoices: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#invoices). */ - application_fee_amount?: number - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description A list of up to 4 custom fields to be displayed on the invoice. */ - custom_fields?: { - name: string - value: string - }[] - /** @description The ID of the customer who will be billed. */ - customer: string - /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string - /** @description The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. */ - due_date?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Footer to be displayed on the invoice. */ - footer?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ - statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ - subscription?: string - /** @description The percent tax rate applied to the invoice, represented as a decimal number. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the invoice with the given ID.

*/ - GetInvoicesInvoice: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Draft invoices are fully editable. Once an invoice is finalized, - * monetary values, as well as collection_method, become uneditable.

- * - *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, - * sending reminders for, or automatically reconciling invoices, pass - * auto_advance=false.

- */ - PostInvoicesInvoice: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#invoices). */ - application_fee_amount?: number - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ - auto_advance?: boolean - /** - * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ - custom_fields?: { - name: string - value: string - }[] - /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ - days_until_due?: number - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string - /** @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ - due_date?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Footer to be displayed on the invoice. */ - footer?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ - statement_descriptor?: string - /** @description The percent tax rate applied to the invoice, represented as a non-negative decimal number (with at most four decimal places) between 0 and 100. To unset a previously-set value, pass an empty string. This field can be updated only on `draft` invoices. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Permanently deletes a draft invoice. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized, it must be voided.

*/ - DeleteInvoicesInvoice: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ - PostInvoicesInvoiceFinalize: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetInvoicesInvoiceLines: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ - PostInvoicesInvoiceMarkUncollectible: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ - PostInvoicesInvoicePay: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - * - * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. - */ - forgive?: boolean - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. */ - paid_out_of_band?: boolean - /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ - payment_method?: string - /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ - source?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

- * - *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

- */ - PostInvoicesInvoiceSend: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ - PostInvoicesInvoiceVoid: { - parameters: { - path: { - invoice: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.

- * - *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

- * - *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

- */ - GetInvoicesUpcoming: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ - coupon?: string - /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ - customer?: string - /** List of invoice items to add or update in the upcoming invoice preview. */ - invoice_items?: unknown[] - /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ - schedule?: string - /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ - subscription?: string - /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ - subscription_billing_cycle_anchor?: string - /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.` */ - subscription_cancel_at?: string - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - subscription_cancel_at_period_end?: boolean - /** This simulates the subscription being canceled or expired immediately. */ - subscription_cancel_now?: boolean - /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: string - /** List of subscription items, each with an attached plan. */ - subscription_items?: unknown[] - /** This field has been renamed to `subscription_proration_behavior`. `subscription_prorate=true` can be replaced with `subscription_proration_behavior=create_prorations` and `subscription_prorate=false` can be replaced with `subscription_proration_behavior=none`. */ - subscription_prorate?: boolean - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ - subscription_proration_behavior?: string - /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration` cannot be set to false. */ - subscription_proration_date?: number - /** Date a subscription is intended to start (can be future or past) */ - subscription_start_date?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that tax percent. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - subscription_tax_percent?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: string - /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. */ - subscription_trial_from_plan?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['invoice'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetInvoicesUpcomingLines: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ - coupon?: string - /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** List of invoice items to add or update in the upcoming invoice preview. */ - invoice_items?: unknown[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ - schedule?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ - subscription?: string - /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ - subscription_billing_cycle_anchor?: string - /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.` */ - subscription_cancel_at?: string - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - subscription_cancel_at_period_end?: boolean - /** This simulates the subscription being canceled or expired immediately. */ - subscription_cancel_now?: boolean - /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: string - /** List of subscription items, each with an attached plan. */ - subscription_items?: unknown[] - /** If previewing an update to a subscription, this decides whether the preview will show the result of applying prorations or not. If set, one of `subscription_items` or `subscription`, and one of `subscription_items` or `subscription_trial_end` are required. */ - subscription_prorate?: boolean - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ - subscription_proration_behavior?: string - /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration` cannot be set to false. */ - subscription_proration_date?: number - /** Date a subscription is intended to start (can be future or past) */ - subscription_start_date?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that tax percent. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - subscription_tax_percent?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: string - /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. */ - subscription_trial_from_plan?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of issuer fraud records.

*/ - GetIssuerFraudRecords: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return issuer fraud records for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuer_fraud_record'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuer_fraud_record'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingAuthorizations: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return issuing transactions that belong to the given card. */ - card?: string - /** Only return authorizations belonging to the given cardholder. */ - cardholder?: string - /** Only return authorizations that were created during the given date interval. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.authorization'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Authorization object.

*/ - GetIssuingAuthorizationsAuthorization: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - authorization: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.authorization'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingAuthorizationsAuthorization: { - parameters: { - path: { - authorization: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.authorization'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ - PostIssuingAuthorizationsAuthorizationApprove: { - parameters: { - path: { - authorization: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.authorization'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ - PostIssuingAuthorizationsAuthorizationDecline: { - parameters: { - path: { - authorization: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.authorization'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingCardholders: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return cardholders that were created during the given date interval. */ - created?: number - /** Only return cardholders that have the given email address. */ - email?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return cardholders that have the given phone number. */ - phone_number?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. */ - status?: string - /** Only return cardholders that have the given type. One of `individual` or `company`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.cardholder'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ - PostIssuingCardholders: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - } - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string - } - /** @description The cardholder's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number - month: number - year: number - } - first_name: string - last_name: string - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The cardholder's name. This will be printed on cards issued to them. */ - name: string - /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. */ - phone_number?: string - /** - * authorization_controls_param_v2 - * @description Spending rules that give you control over how your cardholders can make charges. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - spending_limits_currency?: string - } - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - * @enum {string} - */ - status?: 'active' | 'inactive' - /** - * @description One of `individual` or `company`. - * @enum {string} - */ - type: 'company' | 'individual' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.cardholder'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Cardholder object.

*/ - GetIssuingCardholdersCardholder: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - cardholder: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.cardholder'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingCardholdersCardholder: { - parameters: { - path: { - cardholder: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing?: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - } - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string - } - /** @description The cardholder's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number - month: number - year: number - } - first_name: string - last_name: string - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The cardholder's phone number. */ - phone_number?: string - /** - * authorization_controls_param_v2 - * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - spending_limits_currency?: string - } - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. - * @enum {string} - */ - status?: 'active' | 'inactive' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.cardholder'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingCards: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return cards belonging to the Cardholder with the provided ID. */ - cardholder?: string - /** Only return cards that were issued during the given date interval. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return cards that have the given expiration month. */ - exp_month?: number - /** Only return cards that have the given expiration year. */ - exp_year?: number - /** Only return cards that have the given last four digits. */ - last4?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ - status?: string - /** Only return cards that have the given type. One of `virtual` or `physical`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates an Issuing Card object.

*/ - PostIssuingCards: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ - cardholder?: string - /** @description The currency for the card. This currently must be `usd`. */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The card this is meant to be a replacement for (if any). */ - replacement_for?: string - /** - * @description If `replacement_for` is specified, this should indicate why that card is being replaced. - * @enum {string} - */ - replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' - /** - * shipping_specs - * @description The address where the card will be shipped. - */ - shipping?: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - name: string - /** @enum {string} */ - service?: 'express' | 'priority' | 'standard' - /** @enum {string} */ - type?: 'bulk' | 'individual' - } - /** - * authorization_controls_param - * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - } - /** - * @description Whether authorizations can be approved on this card. Defaults to `inactive`. - * @enum {string} - */ - status?: 'active' | 'inactive' - /** - * @description The type of card to issue. Possible values are `physical` or `virtual`. - * @enum {string} - */ - type: 'physical' | 'virtual' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.card'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Card object.

*/ - GetIssuingCardsCard: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - card: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.card'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingCardsCard: { - parameters: { - path: { - card: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * @description Reason why the `status` of this card is `canceled`. - * @enum {string} - */ - cancellation_reason?: 'lost' | 'stolen' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** - * authorization_controls_param - * @description Spending rules that give you some control over how your cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - } - /** - * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - * @enum {string} - */ - status?: 'active' | 'canceled' | 'inactive' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.card'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingDisputes: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.dispute'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates an Issuing Dispute object.

*/ - PostIssuingDisputes: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Dispute object.

*/ - GetIssuingDisputesDispute: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingDisputesDispute: { - parameters: { - path: { - dispute: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.dispute'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingSettlements: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return issuing settlements that were created during the given date interval. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.settlement'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Settlement object.

*/ - GetIssuingSettlementsSettlement: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - settlement: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.settlement'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingSettlementsSettlement: { - parameters: { - path: { - settlement: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.settlement'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return transactions that belong to the given card. */ - card?: string - /** Only return transactions that belong to the given cardholder. */ - cardholder?: string - /** Only return transactions that were created during the given date interval. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['issuing.transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an Issuing Transaction object.

*/ - GetIssuingTransactionsTransaction: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingTransactionsTransaction: { - parameters: { - path: { - transaction: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['issuing.transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a Mandate object.

*/ - GetMandatesMandate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - mandate: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['mandate'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - GetOrderReturns: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Date this return was created. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - GetOrderReturnsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order_return'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - GetOrders: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Date this order was created. */ - created?: number - /** Only return orders for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return orders with the given IDs. */ - ids?: unknown[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: string - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['order'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new order object.

*/ - PostOrders: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ - GetOrdersId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostOrdersId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Pay an order by providing a source to create a payment.

*/ - PostOrdersIdPay: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ - PostOrdersIdReturns: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: { - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['order_return'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: number - /** Only return PaymentIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['payment_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a PaymentIntent object.

- * - *

After the PaymentIntent is created, attach a payment method and confirm - * to continue the payment. You can read more about the different payment flows - * available via the Payment Intents API here.

- * - *

When confirm=true is used during creation, it is equivalent to creating - * and confirming the PaymentIntent in the same call. You may use any parameters - * available in the confirm API when confirm=true - * is supplied.

- */ - PostPaymentIntents: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** - * @description The amount of the application fee (if any) that will be applied to the - * payment and transferred to the application owner's Stripe account. For - * more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - application_fee_amount?: number - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: unknown - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - card?: unknown - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - destination: string - } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - GetPaymentIntentsIntent: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ - client_secret?: string - } - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates properties on a PaymentIntent object without confirming.

- * - *

Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to - * update and confirm at the same time, we recommend updating properties via - * the confirm API instead.

- */ - PostPaymentIntentsIntent: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) for the resulting payment. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - application_fee_amount?: unknown - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - card?: unknown - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: unknown - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status='requires_capture', the remaining amount_capturable will automatically be refunded.

- */ - PostPaymentIntentsIntentCancel: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled exactly seven days after they are created.

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** - * @description The amount of the application fee (if any) that will be applied to the - * payment and transferred to the application owner's Stripe account. For - * more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - application_fee_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Confirm that your customer intends to pay with current or provided - * payment method. Upon confirmation, the PaymentIntent will attempt to initiate - * a payment.

- * - *

If the selected payment method requires additional authentication steps, the - * PaymentIntent will transition to the requires_action status and - * suggest additional actions via next_action. If payment fails, - * the PaymentIntent will transition to the requires_payment_method status. If - * payment succeeds, the PaymentIntent will transition to the succeeded - * status (or requires_capture, if capture_method is set to manual).

- * - *

If the confirmation_method is automatic, payment may be attempted - * using our client SDKs - * and the PaymentIntent’s client_secret. - * After next_actions are handled by the client, no additional - * confirmation is required to complete the payment.

- * - *

If the confirmation_method is manual, all payment attempts must be - * initiated using a secret key. - * If any actions are required for the payment, the PaymentIntent will - * return to the requires_confirmation state - * after those actions are completed. Your server needs to then - * explicitly re-confirm the PaymentIntent to initiate the next payment - * attempt. Read the expanded documentation - * to learn more about manual confirmation.

- */ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ - error_on_requires_action?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the mandate to be used for this payment. */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - off_session?: unknown - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - card?: unknown - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: string - /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: unknown - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetPaymentMethods: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The ID of the customer whose PaymentMethods will be retrieved. */ - customer: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

*/ - PostPaymentMethods: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - /** billing_details_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When creating with a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: { [key: string]: unknown } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. Required unless `payment_method` is specified (see the [Cloning PaymentMethods](https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods) guide) - * @enum {string} - */ - type?: 'au_becs_debit' | 'card' | 'fpx' | 'ideal' | 'sepa_debit' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_method'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_method'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - PostPaymentMethodsPaymentMethod: { - parameters: { - path: { - payment_method: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - /** billing_details_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number - exp_year?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** - * update_param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { [key: string]: unknown } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_method'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Attaches a PaymentMethod object to a Customer.

- * - *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent - * or a PaymentIntent with setup_future_usage. - * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the - * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. - * See Optimizing cards for future payments for more information about setting up future payments.

- * - *

To use this PaymentMethod as the default for invoice or subscription payments, - * set invoice_settings.default_payment_method, - * on the Customer to the PaymentMethod’s ID.

- */ - PostPaymentMethodsPaymentMethodAttach: { - parameters: { - path: { - payment_method: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_method'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { - parameters: { - path: { - payment_method: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payment_method'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - GetPayouts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - arrival_date?: number - created?: number - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['payout'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

- * - *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

- * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

- */ - PostPayouts: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) - * @enum {string} - */ - method?: 'instant' | 'standard' - /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['payout'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your plans.

*/ - GetPlans: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can create plans using the API, or in the Stripe Dashboard.

*/ - PostPlans: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - active?: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number - /** @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. */ - amount_decimal?: string - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string - /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** - * inline_product_params - * @description The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a [service product](https://stripe.com/docs/api#product_object-type). - */ - product?: { - active?: boolean - id?: string - metadata?: { [key: string]: unknown } - name: string - statement_descriptor?: string - unit_label?: string - } - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - flat_amount_decimal?: string - unit_amount?: number - unit_amount_decimal?: string - up_to: unknown - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: 'licensed' | 'metered' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['plan'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['plan'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. Note that after updating, statement descriptors and line items of the plan in active subscriptions will be affected. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['plan'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_plan'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - GetProducts: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return products that were created during the given date interval. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return products with the given IDs. */ - ids?: unknown[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return products of this type. */ - type?: string - /** Only return products with the given url. */ - url?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['product'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new product object.

*/ - PostProducts: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description A list of up to 5 alphanumeric attributes. */ - attributes?: string[] - /** @description A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`. */ - caption?: string - /** @description An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if type=`good`. */ - deactivate_on?: string[] - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string - /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if type=`good`. - */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. - */ - statement_descriptor?: string - /** - * @description The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. - * @enum {string} - */ - type?: 'good' | 'service' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. May only be set if type=`good`. */ - url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['product'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - GetProductsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['product'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostProductsId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., `["color", "size"]`). If a value for `attributes` is specified, the list specified will replace the existing attributes list on this product. Any attributes not present after the update will be deleted from the SKUs for this product. */ - attributes?: string[] - /** @description A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ - caption?: string - /** @description An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if `type=good`. */ - deactivate_on?: string[] - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if `type=good`. */ - package_dimensions?: unknown - /** @description Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. May only be set if `type=good`. */ - url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['product'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a product. Deleting a product with type=good is only possible if it has no SKUs associated with it. Deleting a product with type=service is only possible if it has no plans associated with it.

*/ - DeleteProductsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_product'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the details of an early fraud warning that has previously been created.

- * - *

Please refer to the early fraud warning object reference for more details.

- */ - GetRadarEarlyFraudWarningsEarlyFraudWarning: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - early_fraud_warning: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.early_fraud_warning'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetRadarValueListItems: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ - value?: string - /** Identifier for the parent value list this item belongs to. */ - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['radar.value_list_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - PostRadarValueListItems: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.value_list_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.value_list_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - DeleteRadarValueListItemsItem: { - parameters: { - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_radar.value_list_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetRadarValueLists: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The alias used to reference the value list when writing rules. */ - alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - contains?: string - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['radar.value_list'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - PostRadarValueLists: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description The name of the value list for use in rules. */ - alias: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. Use `string` if the item type is unknown or mixed. - * @enum {string} - */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'email' | 'ip_address' | 'string' - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The human-readable name of the value list. */ - name: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.value_list'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.value_list'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ - PostRadarValueListsValueList: { - parameters: { - path: { - value_list: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The name of the value list for use in rules. */ - alias?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The human-readable name of the value list. */ - name?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['radar.value_list'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ - DeleteRadarValueListsValueList: { - parameters: { - path: { - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_radar.value_list'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - GetRecipients: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - type?: string - /** Only return recipients that are verified or unverified. */ - verified?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['recipient'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a new Recipient object and verifies the recipient’s identity. - * Also verifies the recipient’s bank account information or debit card, if either is provided.

- */ - PostRecipients: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['recipient'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - GetRecipientsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_recipient'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified recipient by setting the values of the parameters passed. - * Any parameters not provided will be left unchanged.

- * - *

If you update the name or tax ID, the identity verification will automatically be rerun. - * If you update the bank account, the bank account validation will automatically be rerun.

- */ - PostRecipientsId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe-js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['recipient'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_recipient'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ - GetRefunds: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return refunds for the charge specified by this charge ID. */ - charge?: string - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return refunds for the PaymentIntent specified by this ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Create a refund.

*/ - PostRefunds: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - amount?: number - charge?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - refund: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - PostRefundsRefund: { - parameters: { - path: { - refund: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['refund'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Report Runs, with the most recent appearing first. (Requires a live-mode API key.)

*/ - GetReportingReportRuns: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['reporting.report_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new object and begin running the report. (Requires a live-mode API key.)

*/ - PostReportingReportRuns: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - interval_end?: number - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' - | 'Africa/Kampala' - | 'Africa/Khartoum' - | 'Africa/Kigali' - | 'Africa/Kinshasa' - | 'Africa/Lagos' - | 'Africa/Libreville' - | 'Africa/Lome' - | 'Africa/Luanda' - | 'Africa/Lubumbashi' - | 'Africa/Lusaka' - | 'Africa/Malabo' - | 'Africa/Maputo' - | 'Africa/Maseru' - | 'Africa/Mbabane' - | 'Africa/Mogadishu' - | 'Africa/Monrovia' - | 'Africa/Nairobi' - | 'Africa/Ndjamena' - | 'Africa/Niamey' - | 'Africa/Nouakchott' - | 'Africa/Ouagadougou' - | 'Africa/Porto-Novo' - | 'Africa/Sao_Tome' - | 'Africa/Timbuktu' - | 'Africa/Tripoli' - | 'Africa/Tunis' - | 'Africa/Windhoek' - | 'America/Adak' - | 'America/Anchorage' - | 'America/Anguilla' - | 'America/Antigua' - | 'America/Araguaina' - | 'America/Argentina/Buenos_Aires' - | 'America/Argentina/Catamarca' - | 'America/Argentina/ComodRivadavia' - | 'America/Argentina/Cordoba' - | 'America/Argentina/Jujuy' - | 'America/Argentina/La_Rioja' - | 'America/Argentina/Mendoza' - | 'America/Argentina/Rio_Gallegos' - | 'America/Argentina/Salta' - | 'America/Argentina/San_Juan' - | 'America/Argentina/San_Luis' - | 'America/Argentina/Tucuman' - | 'America/Argentina/Ushuaia' - | 'America/Aruba' - | 'America/Asuncion' - | 'America/Atikokan' - | 'America/Atka' - | 'America/Bahia' - | 'America/Bahia_Banderas' - | 'America/Barbados' - | 'America/Belem' - | 'America/Belize' - | 'America/Blanc-Sablon' - | 'America/Boa_Vista' - | 'America/Bogota' - | 'America/Boise' - | 'America/Buenos_Aires' - | 'America/Cambridge_Bay' - | 'America/Campo_Grande' - | 'America/Cancun' - | 'America/Caracas' - | 'America/Catamarca' - | 'America/Cayenne' - | 'America/Cayman' - | 'America/Chicago' - | 'America/Chihuahua' - | 'America/Coral_Harbour' - | 'America/Cordoba' - | 'America/Costa_Rica' - | 'America/Creston' - | 'America/Cuiaba' - | 'America/Curacao' - | 'America/Danmarkshavn' - | 'America/Dawson' - | 'America/Dawson_Creek' - | 'America/Denver' - | 'America/Detroit' - | 'America/Dominica' - | 'America/Edmonton' - | 'America/Eirunepe' - | 'America/El_Salvador' - | 'America/Ensenada' - | 'America/Fort_Nelson' - | 'America/Fort_Wayne' - | 'America/Fortaleza' - | 'America/Glace_Bay' - | 'America/Godthab' - | 'America/Goose_Bay' - | 'America/Grand_Turk' - | 'America/Grenada' - | 'America/Guadeloupe' - | 'America/Guatemala' - | 'America/Guayaquil' - | 'America/Guyana' - | 'America/Halifax' - | 'America/Havana' - | 'America/Hermosillo' - | 'America/Indiana/Indianapolis' - | 'America/Indiana/Knox' - | 'America/Indiana/Marengo' - | 'America/Indiana/Petersburg' - | 'America/Indiana/Tell_City' - | 'America/Indiana/Vevay' - | 'America/Indiana/Vincennes' - | 'America/Indiana/Winamac' - | 'America/Indianapolis' - | 'America/Inuvik' - | 'America/Iqaluit' - | 'America/Jamaica' - | 'America/Jujuy' - | 'America/Juneau' - | 'America/Kentucky/Louisville' - | 'America/Kentucky/Monticello' - | 'America/Knox_IN' - | 'America/Kralendijk' - | 'America/La_Paz' - | 'America/Lima' - | 'America/Los_Angeles' - | 'America/Louisville' - | 'America/Lower_Princes' - | 'America/Maceio' - | 'America/Managua' - | 'America/Manaus' - | 'America/Marigot' - | 'America/Martinique' - | 'America/Matamoros' - | 'America/Mazatlan' - | 'America/Mendoza' - | 'America/Menominee' - | 'America/Merida' - | 'America/Metlakatla' - | 'America/Mexico_City' - | 'America/Miquelon' - | 'America/Moncton' - | 'America/Monterrey' - | 'America/Montevideo' - | 'America/Montreal' - | 'America/Montserrat' - | 'America/Nassau' - | 'America/New_York' - | 'America/Nipigon' - | 'America/Nome' - | 'America/Noronha' - | 'America/North_Dakota/Beulah' - | 'America/North_Dakota/Center' - | 'America/North_Dakota/New_Salem' - | 'America/Ojinaga' - | 'America/Panama' - | 'America/Pangnirtung' - | 'America/Paramaribo' - | 'America/Phoenix' - | 'America/Port-au-Prince' - | 'America/Port_of_Spain' - | 'America/Porto_Acre' - | 'America/Porto_Velho' - | 'America/Puerto_Rico' - | 'America/Punta_Arenas' - | 'America/Rainy_River' - | 'America/Rankin_Inlet' - | 'America/Recife' - | 'America/Regina' - | 'America/Resolute' - | 'America/Rio_Branco' - | 'America/Rosario' - | 'America/Santa_Isabel' - | 'America/Santarem' - | 'America/Santiago' - | 'America/Santo_Domingo' - | 'America/Sao_Paulo' - | 'America/Scoresbysund' - | 'America/Shiprock' - | 'America/Sitka' - | 'America/St_Barthelemy' - | 'America/St_Johns' - | 'America/St_Kitts' - | 'America/St_Lucia' - | 'America/St_Thomas' - | 'America/St_Vincent' - | 'America/Swift_Current' - | 'America/Tegucigalpa' - | 'America/Thule' - | 'America/Thunder_Bay' - | 'America/Tijuana' - | 'America/Toronto' - | 'America/Tortola' - | 'America/Vancouver' - | 'America/Virgin' - | 'America/Whitehorse' - | 'America/Winnipeg' - | 'America/Yakutat' - | 'America/Yellowknife' - | 'Antarctica/Casey' - | 'Antarctica/Davis' - | 'Antarctica/DumontDUrville' - | 'Antarctica/Macquarie' - | 'Antarctica/Mawson' - | 'Antarctica/McMurdo' - | 'Antarctica/Palmer' - | 'Antarctica/Rothera' - | 'Antarctica/South_Pole' - | 'Antarctica/Syowa' - | 'Antarctica/Troll' - | 'Antarctica/Vostok' - | 'Arctic/Longyearbyen' - | 'Asia/Aden' - | 'Asia/Almaty' - | 'Asia/Amman' - | 'Asia/Anadyr' - | 'Asia/Aqtau' - | 'Asia/Aqtobe' - | 'Asia/Ashgabat' - | 'Asia/Ashkhabad' - | 'Asia/Atyrau' - | 'Asia/Baghdad' - | 'Asia/Bahrain' - | 'Asia/Baku' - | 'Asia/Bangkok' - | 'Asia/Barnaul' - | 'Asia/Beirut' - | 'Asia/Bishkek' - | 'Asia/Brunei' - | 'Asia/Calcutta' - | 'Asia/Chita' - | 'Asia/Choibalsan' - | 'Asia/Chongqing' - | 'Asia/Chungking' - | 'Asia/Colombo' - | 'Asia/Dacca' - | 'Asia/Damascus' - | 'Asia/Dhaka' - | 'Asia/Dili' - | 'Asia/Dubai' - | 'Asia/Dushanbe' - | 'Asia/Famagusta' - | 'Asia/Gaza' - | 'Asia/Harbin' - | 'Asia/Hebron' - | 'Asia/Ho_Chi_Minh' - | 'Asia/Hong_Kong' - | 'Asia/Hovd' - | 'Asia/Irkutsk' - | 'Asia/Istanbul' - | 'Asia/Jakarta' - | 'Asia/Jayapura' - | 'Asia/Jerusalem' - | 'Asia/Kabul' - | 'Asia/Kamchatka' - | 'Asia/Karachi' - | 'Asia/Kashgar' - | 'Asia/Kathmandu' - | 'Asia/Katmandu' - | 'Asia/Khandyga' - | 'Asia/Kolkata' - | 'Asia/Krasnoyarsk' - | 'Asia/Kuala_Lumpur' - | 'Asia/Kuching' - | 'Asia/Kuwait' - | 'Asia/Macao' - | 'Asia/Macau' - | 'Asia/Magadan' - | 'Asia/Makassar' - | 'Asia/Manila' - | 'Asia/Muscat' - | 'Asia/Nicosia' - | 'Asia/Novokuznetsk' - | 'Asia/Novosibirsk' - | 'Asia/Omsk' - | 'Asia/Oral' - | 'Asia/Phnom_Penh' - | 'Asia/Pontianak' - | 'Asia/Pyongyang' - | 'Asia/Qatar' - | 'Asia/Qostanay' - | 'Asia/Qyzylorda' - | 'Asia/Rangoon' - | 'Asia/Riyadh' - | 'Asia/Saigon' - | 'Asia/Sakhalin' - | 'Asia/Samarkand' - | 'Asia/Seoul' - | 'Asia/Shanghai' - | 'Asia/Singapore' - | 'Asia/Srednekolymsk' - | 'Asia/Taipei' - | 'Asia/Tashkent' - | 'Asia/Tbilisi' - | 'Asia/Tehran' - | 'Asia/Tel_Aviv' - | 'Asia/Thimbu' - | 'Asia/Thimphu' - | 'Asia/Tokyo' - | 'Asia/Tomsk' - | 'Asia/Ujung_Pandang' - | 'Asia/Ulaanbaatar' - | 'Asia/Ulan_Bator' - | 'Asia/Urumqi' - | 'Asia/Ust-Nera' - | 'Asia/Vientiane' - | 'Asia/Vladivostok' - | 'Asia/Yakutsk' - | 'Asia/Yangon' - | 'Asia/Yekaterinburg' - | 'Asia/Yerevan' - | 'Atlantic/Azores' - | 'Atlantic/Bermuda' - | 'Atlantic/Canary' - | 'Atlantic/Cape_Verde' - | 'Atlantic/Faeroe' - | 'Atlantic/Faroe' - | 'Atlantic/Jan_Mayen' - | 'Atlantic/Madeira' - | 'Atlantic/Reykjavik' - | 'Atlantic/South_Georgia' - | 'Atlantic/St_Helena' - | 'Atlantic/Stanley' - | 'Australia/ACT' - | 'Australia/Adelaide' - | 'Australia/Brisbane' - | 'Australia/Broken_Hill' - | 'Australia/Canberra' - | 'Australia/Currie' - | 'Australia/Darwin' - | 'Australia/Eucla' - | 'Australia/Hobart' - | 'Australia/LHI' - | 'Australia/Lindeman' - | 'Australia/Lord_Howe' - | 'Australia/Melbourne' - | 'Australia/NSW' - | 'Australia/North' - | 'Australia/Perth' - | 'Australia/Queensland' - | 'Australia/South' - | 'Australia/Sydney' - | 'Australia/Tasmania' - | 'Australia/Victoria' - | 'Australia/West' - | 'Australia/Yancowinna' - | 'Brazil/Acre' - | 'Brazil/DeNoronha' - | 'Brazil/East' - | 'Brazil/West' - | 'CET' - | 'CST6CDT' - | 'Canada/Atlantic' - | 'Canada/Central' - | 'Canada/Eastern' - | 'Canada/Mountain' - | 'Canada/Newfoundland' - | 'Canada/Pacific' - | 'Canada/Saskatchewan' - | 'Canada/Yukon' - | 'Chile/Continental' - | 'Chile/EasterIsland' - | 'Cuba' - | 'EET' - | 'EST' - | 'EST5EDT' - | 'Egypt' - | 'Eire' - | 'Etc/GMT' - | 'Etc/GMT+0' - | 'Etc/GMT+1' - | 'Etc/GMT+10' - | 'Etc/GMT+11' - | 'Etc/GMT+12' - | 'Etc/GMT+2' - | 'Etc/GMT+3' - | 'Etc/GMT+4' - | 'Etc/GMT+5' - | 'Etc/GMT+6' - | 'Etc/GMT+7' - | 'Etc/GMT+8' - | 'Etc/GMT+9' - | 'Etc/GMT-0' - | 'Etc/GMT-1' - | 'Etc/GMT-10' - | 'Etc/GMT-11' - | 'Etc/GMT-12' - | 'Etc/GMT-13' - | 'Etc/GMT-14' - | 'Etc/GMT-2' - | 'Etc/GMT-3' - | 'Etc/GMT-4' - | 'Etc/GMT-5' - | 'Etc/GMT-6' - | 'Etc/GMT-7' - | 'Etc/GMT-8' - | 'Etc/GMT-9' - | 'Etc/GMT0' - | 'Etc/Greenwich' - | 'Etc/UCT' - | 'Etc/UTC' - | 'Etc/Universal' - | 'Etc/Zulu' - | 'Europe/Amsterdam' - | 'Europe/Andorra' - | 'Europe/Astrakhan' - | 'Europe/Athens' - | 'Europe/Belfast' - | 'Europe/Belgrade' - | 'Europe/Berlin' - | 'Europe/Bratislava' - | 'Europe/Brussels' - | 'Europe/Bucharest' - | 'Europe/Budapest' - | 'Europe/Busingen' - | 'Europe/Chisinau' - | 'Europe/Copenhagen' - | 'Europe/Dublin' - | 'Europe/Gibraltar' - | 'Europe/Guernsey' - | 'Europe/Helsinki' - | 'Europe/Isle_of_Man' - | 'Europe/Istanbul' - | 'Europe/Jersey' - | 'Europe/Kaliningrad' - | 'Europe/Kiev' - | 'Europe/Kirov' - | 'Europe/Lisbon' - | 'Europe/Ljubljana' - | 'Europe/London' - | 'Europe/Luxembourg' - | 'Europe/Madrid' - | 'Europe/Malta' - | 'Europe/Mariehamn' - | 'Europe/Minsk' - | 'Europe/Monaco' - | 'Europe/Moscow' - | 'Europe/Nicosia' - | 'Europe/Oslo' - | 'Europe/Paris' - | 'Europe/Podgorica' - | 'Europe/Prague' - | 'Europe/Riga' - | 'Europe/Rome' - | 'Europe/Samara' - | 'Europe/San_Marino' - | 'Europe/Sarajevo' - | 'Europe/Saratov' - | 'Europe/Simferopol' - | 'Europe/Skopje' - | 'Europe/Sofia' - | 'Europe/Stockholm' - | 'Europe/Tallinn' - | 'Europe/Tirane' - | 'Europe/Tiraspol' - | 'Europe/Ulyanovsk' - | 'Europe/Uzhgorod' - | 'Europe/Vaduz' - | 'Europe/Vatican' - | 'Europe/Vienna' - | 'Europe/Vilnius' - | 'Europe/Volgograd' - | 'Europe/Warsaw' - | 'Europe/Zagreb' - | 'Europe/Zaporozhye' - | 'Europe/Zurich' - | 'Factory' - | 'GB' - | 'GB-Eire' - | 'GMT' - | 'GMT+0' - | 'GMT-0' - | 'GMT0' - | 'Greenwich' - | 'HST' - | 'Hongkong' - | 'Iceland' - | 'Indian/Antananarivo' - | 'Indian/Chagos' - | 'Indian/Christmas' - | 'Indian/Cocos' - | 'Indian/Comoro' - | 'Indian/Kerguelen' - | 'Indian/Mahe' - | 'Indian/Maldives' - | 'Indian/Mauritius' - | 'Indian/Mayotte' - | 'Indian/Reunion' - | 'Iran' - | 'Israel' - | 'Jamaica' - | 'Japan' - | 'Kwajalein' - | 'Libya' - | 'MET' - | 'MST' - | 'MST7MDT' - | 'Mexico/BajaNorte' - | 'Mexico/BajaSur' - | 'Mexico/General' - | 'NZ' - | 'NZ-CHAT' - | 'Navajo' - | 'PRC' - | 'PST8PDT' - | 'Pacific/Apia' - | 'Pacific/Auckland' - | 'Pacific/Bougainville' - | 'Pacific/Chatham' - | 'Pacific/Chuuk' - | 'Pacific/Easter' - | 'Pacific/Efate' - | 'Pacific/Enderbury' - | 'Pacific/Fakaofo' - | 'Pacific/Fiji' - | 'Pacific/Funafuti' - | 'Pacific/Galapagos' - | 'Pacific/Gambier' - | 'Pacific/Guadalcanal' - | 'Pacific/Guam' - | 'Pacific/Honolulu' - | 'Pacific/Johnston' - | 'Pacific/Kiritimati' - | 'Pacific/Kosrae' - | 'Pacific/Kwajalein' - | 'Pacific/Majuro' - | 'Pacific/Marquesas' - | 'Pacific/Midway' - | 'Pacific/Nauru' - | 'Pacific/Niue' - | 'Pacific/Norfolk' - | 'Pacific/Noumea' - | 'Pacific/Pago_Pago' - | 'Pacific/Palau' - | 'Pacific/Pitcairn' - | 'Pacific/Pohnpei' - | 'Pacific/Ponape' - | 'Pacific/Port_Moresby' - | 'Pacific/Rarotonga' - | 'Pacific/Saipan' - | 'Pacific/Samoa' - | 'Pacific/Tahiti' - | 'Pacific/Tarawa' - | 'Pacific/Tongatapu' - | 'Pacific/Truk' - | 'Pacific/Wake' - | 'Pacific/Wallis' - | 'Pacific/Yap' - | 'Poland' - | 'Portugal' - | 'ROC' - | 'ROK' - | 'Singapore' - | 'Turkey' - | 'UCT' - | 'US/Alaska' - | 'US/Aleutian' - | 'US/Arizona' - | 'US/Central' - | 'US/East-Indiana' - | 'US/Eastern' - | 'US/Hawaii' - | 'US/Indiana-Starke' - | 'US/Michigan' - | 'US/Mountain' - | 'US/Pacific' - | 'US/Pacific-New' - | 'US/Samoa' - | 'UTC' - | 'Universal' - | 'W-SU' - | 'WET' - | 'Zulu' - } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['reporting.report_run'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing Report Run. (Requires a live-mode API key.)

*/ - GetReportingReportRunsReportRun: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - report_run: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['reporting.report_run'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a full list of Report Types. (Requires a live-mode API key.)

*/ - GetReportingReportTypes: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['reporting.report_type'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of a Report Type. (Requires a live-mode API key.)

*/ - GetReportingReportTypesReportType: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - report_type: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['reporting.report_type'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetReviews: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['review'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - review: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['review'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - PostReviewsReviewApprove: { - parameters: { - path: { - review: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['review'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: number - /** Only return SetupIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return SetupIntents associated with the specified payment method. */ - payment_method?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a SetupIntent object.

- * - *

After the SetupIntent is created, attach a payment method and confirm - * to collect any required permissions to charge the payment method later.

- */ - PostSetupIntents: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: 'off_session' | 'on_session' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['setup_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - GetSetupIntentsIntent: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ - client_secret?: string - } - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['setup_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['setup_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - PostSetupIntentsIntentCancel: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['setup_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Confirm that your customer intends to set up the current or - * provided payment method. For example, you would confirm a SetupIntent - * when a customer hits the “Save” button on a payment method management - * page on your website.

- * - *

If the selected payment method does not require any additional - * steps from the customer, the SetupIntent will transition to the - * succeeded status.

- * - *

Otherwise, it will transition to the requires_action status and - * suggest additional actions via next_action. If setup fails, - * the SetupIntent will transition to the - * requires_payment_method status.

- */ - PostSetupIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['setup_intent'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an scheduled query run.

*/ - GetSigmaScheduledQueryRunsScheduledQueryRun: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - scheduled_query_run: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['scheduled_query_run'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - GetSkus: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ - attributes?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return SKUs with the given IDs. */ - ids?: unknown[] - /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ - in_stock?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: unknown } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. - */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['sku'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - GetSkusId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_sku'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

- */ - PostSkusId: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: unknown } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_update_specs - * @description Description of the SKU's inventory. - */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: unknown - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['sku'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - DeleteSkusId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_sku'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new source object.

*/ - PostSources: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: unknown - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** - * @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. - * @enum {string} - */ - usage?: 'reusable' | 'single_use' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ - GetSourcesSource: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ - client_secret?: string - } - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

- */ - PostSourcesSource: { - parameters: { - path: { - source: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Amount associated with the source. */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: unknown - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - mandate_notification: string - source: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source_mandate_notification'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['source_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ - GetSourcesSourceSourceTransactionsSourceTransaction: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - source: string - source_transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source_transaction'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { - parameters: { - path: { - source: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['source'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your subscription items for a given subscription.

*/ - GetSubscriptionItems: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The ID of the subscription whose items will be retrieved. */ - subscription: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - PostSubscriptionItems: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The identifier of the plan to add to the subscription. */ - plan?: string - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the invoice item with the given ID.

*/ - GetSubscriptionItemsItem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the plan or quantity of an item on a current subscription.

*/ - PostSubscriptionItemsItem: { - parameters: { - path: { - item: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The identifier of the new plan for this subscription item. */ - plan?: string - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - DeleteSubscriptionItemsItem: { - parameters: { - path: { - item: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. */ - proration_date?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_subscription_item'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the billing plan’s month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - subscription_item: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

- * - *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

- * - *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

- * - *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

- */ - PostSubscriptionItemsSubscriptionItemUsageRecords: { - parameters: { - path: { - subscription_item: string - } - body: { - /** Body parameters for the request. */ - payload: { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`. */ - timestamp: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['usage_record'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: number - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: number - /** Only return subscription schedules that were created during the given date interval. */ - created?: number - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: number - /** Only return subscription schedules that have not started yet. */ - scheduled?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new subscription schedule object. Each customer can have up to 25 active or scheduled subscriptions.

*/ - PostSubscriptionSchedules: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - billing_thresholds?: unknown - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's plan(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: { - application_fee_percent?: number - billing_thresholds?: unknown - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - iterations?: number - plans: { - billing_thresholds?: unknown - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - tax_percent?: number - trial?: boolean - trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_schedule'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ - GetSubscriptionSchedulesSchedule: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_schedule'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - billing_thresholds?: unknown - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: { - application_fee_percent?: number - billing_thresholds?: unknown - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] - end_date?: unknown - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - iterations?: number - plans: { - billing_thresholds?: unknown - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: unknown - tax_percent?: number - trial?: boolean - trial_end?: unknown - }[] - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Valid values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_schedule'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ - PostSubscriptionSchedulesScheduleCancel: { - parameters: { - path: { - schedule: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates whether or not to generate a final invoice that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_schedule'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ - PostSubscriptionSchedulesScheduleRelease: { - parameters: { - path: { - schedule: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription_schedule'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - GetSubscriptions: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: string - created?: number - current_period_end?: number - current_period_start?: number - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the plan whose subscriptions will be retrieved. */ - plan?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the subscriptions to retrieve. One of: `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `unpaid`, `canceled`, or `all`. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Passing in a value of `all` will return subscriptions of all statuses. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.

*/ - PostSubscriptions: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. */ - backdate_start_date?: number - /** @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: unknown - metadata?: { [key: string]: unknown } - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: unknown - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: unknown - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: unknown - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. */ - trial_period_days?: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - PostSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - subscription_exposed_id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: unknown - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: unknown - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The code of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: unknown - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: unknown - plan?: string - quantity?: number - tax_rates?: string[] - }[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: unknown - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: unknown - /** @description This field has been renamed to `proration_behavior`. `prorate=true` can be replaced with `proration_behavior=create_prorations` and `prorate=false` can be replaced with `proration_behavior=none`. */ - prorate?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. */ - proration_date?: number - /** @description A non-negative decimal (with at most four decimal places) between 0 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount in each billing period. For example, a plan which charges $10/month with a `tax_percent` of `20.0` will charge $12 per invoice. To unset a previously-set value, pass an empty string. This field has been deprecated and will be removed in a future API version, for further information view the [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - tax_percent?: unknown - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: unknown - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. */ - trial_from_plan?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - DeleteSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - subscription_exposed_id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['subscription'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_discount'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ - GetTaxRates: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Optional flag to filter by tax rates that are either active or not active (archived) */ - active?: boolean - /** Optional range for filtering created date */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive) */ - inclusive?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['tax_rate'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new tax rate.

*/ - PostTaxRates: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Flag determining whether the tax rate is active or inactive. Inactive tax rates continue to work where they are currently applied however they cannot be used for new applications. */ - active?: boolean - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. */ - jurisdiction?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['tax_rate'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - tax_rate: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['tax_rate'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { - parameters: { - path: { - tax_rate: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Flag determining whether the tax rate is active or inactive. Inactive tax rates continue to work where they are currently applied however they cannot be used for new applications. */ - active?: boolean - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The jurisdiction for the tax rate. */ - jurisdiction?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['tax_rate'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - PostTerminalConnectionTokens: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. */ - location?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.connection_token'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['terminal.location'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new Location object.

*/ - PostTerminalLocations: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** - * required_country_address - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.location'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - location: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.location'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalLocationsLocation: { - parameters: { - path: { - location: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** - * required_country_address - * @description The full address of the location. - */ - address?: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.location'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { - parameters: { - path: { - location: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_terminal.location'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** Filters readers by device type */ - device_type?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A location ID to filter the response list to only readers at the specific location */ - location?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description A list of readers */ - data: definitions['terminal.reader'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. If no location is specified, the reader will be assigned to the account's default location. */ - location?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.reader'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - reader: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.reader'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalReadersReader: { - parameters: { - path: { - reader: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The new label of the reader. */ - label?: string - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['terminal.reader'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { - parameters: { - path: { - reader: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_terminal.reader'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Creates a single-use token that represents a bank account’s details. - * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

- */ - PostTokens: { - parameters: { - body: { - /** Body parameters for the request. */ - payload?: { - /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - phone?: string - /** @enum {string} */ - structure?: - | '' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: unknown - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: unknown - phone?: string - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. - */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - country: string - currency?: string - routing_number?: string - } - card?: unknown - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * person_token_specs - * @description Information for the person this token will represent. - */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: unknown - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: unknown - phone?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: unknown - representative?: boolean - title?: string - } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** - * pii_token_specs - * @description The PII this token will represent. - */ - pii?: { - id_number?: string - } - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['token'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - token: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['token'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of top-ups.

*/ - GetTopups: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A positive integer representing how much to transfer. */ - amount?: number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['topup'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Top up the balance of an account

*/ - PostTopups: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A positive integer representing how much to transfer. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ - statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['topup'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - GetTopupsTopup: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - topup: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['topup'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - PostTopupsTopup: { - parameters: { - path: { - topup: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['topup'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - PostTopupsTopupCancel: { - parameters: { - path: { - topup: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['topup'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ - GetTransfers: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - created?: number - /** Only return transfers for the destination specified by this account ID. */ - destination?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return transfers with the specified transfer group. */ - transfer_group?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['transfer'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ - PostTransfers: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: unknown } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ - GetTransfersIdReversals: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - /** @description Details about each object. */ - data: definitions['transfer_reversal'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

When you create a new reversal, you must specify a transfer to create it on.

- * - *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

- * - *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

- */ - PostTransfersIdReversals: { - parameters: { - path: { - id: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer_reversal'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ - GetTransfersTransfer: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts only metadata as an argument.

- */ - PostTransfersTransfer: { - parameters: { - path: { - transfer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ - GetTransfersTransferReversalsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - id: string - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer_reversal'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /** - *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata and description as arguments.

- */ - PostTransfersTransferReversalsId: { - parameters: { - path: { - id: string - transfer: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['transfer_reversal'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Returns a list of your webhook endpoints.

*/ - GetWebhookEndpoints: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: { - data: definitions['webhook_endpoint'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ - PostWebhookEndpoints: { - parameters: { - body: { - /** Body parameters for the request. */ - payload: { - /** - * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - * @enum {string} - */ - api_version?: - | '2011-01-01' - | '2011-06-21' - | '2011-06-28' - | '2011-08-01' - | '2011-09-15' - | '2011-11-17' - | '2012-02-23' - | '2012-03-25' - | '2012-06-18' - | '2012-06-28' - | '2012-07-09' - | '2012-09-24' - | '2012-10-26' - | '2012-11-07' - | '2013-02-11' - | '2013-02-13' - | '2013-07-05' - | '2013-08-12' - | '2013-08-13' - | '2013-10-29' - | '2013-12-03' - | '2014-01-31' - | '2014-03-13' - | '2014-03-28' - | '2014-05-19' - | '2014-06-13' - | '2014-06-17' - | '2014-07-22' - | '2014-07-26' - | '2014-08-04' - | '2014-08-20' - | '2014-09-08' - | '2014-10-07' - | '2014-11-05' - | '2014-11-20' - | '2014-12-08' - | '2014-12-17' - | '2014-12-22' - | '2015-01-11' - | '2015-01-26' - | '2015-02-10' - | '2015-02-16' - | '2015-02-18' - | '2015-03-24' - | '2015-04-07' - | '2015-06-15' - | '2015-07-07' - | '2015-07-13' - | '2015-07-28' - | '2015-08-07' - | '2015-08-19' - | '2015-09-03' - | '2015-09-08' - | '2015-09-23' - | '2015-10-01' - | '2015-10-12' - | '2015-10-16' - | '2016-02-03' - | '2016-02-19' - | '2016-02-22' - | '2016-02-23' - | '2016-02-29' - | '2016-03-07' - | '2016-06-15' - | '2016-07-06' - | '2016-10-19' - | '2017-01-27' - | '2017-02-14' - | '2017-04-06' - | '2017-05-25' - | '2017-06-05' - | '2017-08-15' - | '2017-12-14' - | '2018-01-23' - | '2018-02-05' - | '2018-02-06' - | '2018-02-28' - | '2018-05-21' - | '2018-07-27' - | '2018-08-23' - | '2018-09-06' - | '2018-09-24' - | '2018-10-31' - | '2018-11-08' - | '2019-02-11' - | '2019-02-19' - | '2019-03-14' - | '2019-05-16' - | '2019-08-14' - | '2019-09-09' - | '2019-10-08' - | '2019-10-17' - | '2019-11-05' - | '2019-12-03' - | '2020-03-02' - /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ - connect?: boolean - /** @description An optional description of what the wehbook is used for. */ - description?: string - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events: ( - | '*' - | 'account.application.authorized' - | 'account.application.deauthorized' - | 'account.external_account.created' - | 'account.external_account.deleted' - | 'account.external_account.updated' - | 'account.updated' - | 'application_fee.created' - | 'application_fee.refund.updated' - | 'application_fee.refunded' - | 'balance.available' - | 'capability.updated' - | 'charge.captured' - | 'charge.dispute.closed' - | 'charge.dispute.created' - | 'charge.dispute.funds_reinstated' - | 'charge.dispute.funds_withdrawn' - | 'charge.dispute.updated' - | 'charge.expired' - | 'charge.failed' - | 'charge.pending' - | 'charge.refund.updated' - | 'charge.refunded' - | 'charge.succeeded' - | 'charge.updated' - | 'checkout.session.completed' - | 'coupon.created' - | 'coupon.deleted' - | 'coupon.updated' - | 'credit_note.created' - | 'credit_note.updated' - | 'credit_note.voided' - | 'customer.created' - | 'customer.deleted' - | 'customer.discount.created' - | 'customer.discount.deleted' - | 'customer.discount.updated' - | 'customer.source.created' - | 'customer.source.deleted' - | 'customer.source.expiring' - | 'customer.source.updated' - | 'customer.subscription.created' - | 'customer.subscription.deleted' - | 'customer.subscription.pending_update_applied' - | 'customer.subscription.pending_update_expired' - | 'customer.subscription.trial_will_end' - | 'customer.subscription.updated' - | 'customer.tax_id.created' - | 'customer.tax_id.deleted' - | 'customer.tax_id.updated' - | 'customer.updated' - | 'file.created' - | 'invoice.created' - | 'invoice.deleted' - | 'invoice.finalized' - | 'invoice.marked_uncollectible' - | 'invoice.payment_action_required' - | 'invoice.payment_failed' - | 'invoice.payment_succeeded' - | 'invoice.sent' - | 'invoice.upcoming' - | 'invoice.updated' - | 'invoice.voided' - | 'invoiceitem.created' - | 'invoiceitem.deleted' - | 'invoiceitem.updated' - | 'issuing_authorization.created' - | 'issuing_authorization.request' - | 'issuing_authorization.updated' - | 'issuing_card.created' - | 'issuing_card.updated' - | 'issuing_cardholder.created' - | 'issuing_cardholder.updated' - | 'issuing_transaction.created' - | 'issuing_transaction.updated' - | 'mandate.updated' - | 'order.created' - | 'order.payment_failed' - | 'order.payment_succeeded' - | 'order.updated' - | 'order_return.created' - | 'payment_intent.amount_capturable_updated' - | 'payment_intent.canceled' - | 'payment_intent.created' - | 'payment_intent.payment_failed' - | 'payment_intent.processing' - | 'payment_intent.succeeded' - | 'payment_method.attached' - | 'payment_method.card_automatically_updated' - | 'payment_method.detached' - | 'payment_method.updated' - | 'payout.canceled' - | 'payout.created' - | 'payout.failed' - | 'payout.paid' - | 'payout.updated' - | 'person.created' - | 'person.deleted' - | 'person.updated' - | 'plan.created' - | 'plan.deleted' - | 'plan.updated' - | 'product.created' - | 'product.deleted' - | 'product.updated' - | 'radar.early_fraud_warning.created' - | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' - | 'reporting.report_run.failed' - | 'reporting.report_run.succeeded' - | 'reporting.report_type.updated' - | 'review.closed' - | 'review.opened' - | 'setup_intent.canceled' - | 'setup_intent.created' - | 'setup_intent.setup_failed' - | 'setup_intent.succeeded' - | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' - | 'source.canceled' - | 'source.chargeable' - | 'source.failed' - | 'source.mandate_notification' - | 'source.refund_attributes_required' - | 'source.transaction.created' - | 'source.transaction.updated' - | 'subscription_schedule.aborted' - | 'subscription_schedule.canceled' - | 'subscription_schedule.completed' - | 'subscription_schedule.created' - | 'subscription_schedule.expiring' - | 'subscription_schedule.released' - | 'subscription_schedule.updated' - | 'tax_rate.created' - | 'tax_rate.updated' - | 'topup.canceled' - | 'topup.created' - | 'topup.failed' - | 'topup.reversed' - | 'topup.succeeded' - | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' - | 'transfer.reversed' - | 'transfer.updated' - )[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The URL of the webhook endpoint. */ - url: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['webhook_endpoint'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Retrieves the webhook endpoint with the given ID.

*/ - GetWebhookEndpointsWebhookEndpoint: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: unknown[] - } - path: { - webhook_endpoint: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['webhook_endpoint'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ - PostWebhookEndpointsWebhookEndpoint: { - parameters: { - path: { - webhook_endpoint: string - } - body: { - /** Body parameters for the request. */ - payload?: { - /** @description An optional description of what the wehbook is used for. */ - description?: string - /** @description Disable the webhook endpoint if set to true. */ - disabled?: boolean - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events?: ( - | '*' - | 'account.application.authorized' - | 'account.application.deauthorized' - | 'account.external_account.created' - | 'account.external_account.deleted' - | 'account.external_account.updated' - | 'account.updated' - | 'application_fee.created' - | 'application_fee.refund.updated' - | 'application_fee.refunded' - | 'balance.available' - | 'capability.updated' - | 'charge.captured' - | 'charge.dispute.closed' - | 'charge.dispute.created' - | 'charge.dispute.funds_reinstated' - | 'charge.dispute.funds_withdrawn' - | 'charge.dispute.updated' - | 'charge.expired' - | 'charge.failed' - | 'charge.pending' - | 'charge.refund.updated' - | 'charge.refunded' - | 'charge.succeeded' - | 'charge.updated' - | 'checkout.session.completed' - | 'coupon.created' - | 'coupon.deleted' - | 'coupon.updated' - | 'credit_note.created' - | 'credit_note.updated' - | 'credit_note.voided' - | 'customer.created' - | 'customer.deleted' - | 'customer.discount.created' - | 'customer.discount.deleted' - | 'customer.discount.updated' - | 'customer.source.created' - | 'customer.source.deleted' - | 'customer.source.expiring' - | 'customer.source.updated' - | 'customer.subscription.created' - | 'customer.subscription.deleted' - | 'customer.subscription.pending_update_applied' - | 'customer.subscription.pending_update_expired' - | 'customer.subscription.trial_will_end' - | 'customer.subscription.updated' - | 'customer.tax_id.created' - | 'customer.tax_id.deleted' - | 'customer.tax_id.updated' - | 'customer.updated' - | 'file.created' - | 'invoice.created' - | 'invoice.deleted' - | 'invoice.finalized' - | 'invoice.marked_uncollectible' - | 'invoice.payment_action_required' - | 'invoice.payment_failed' - | 'invoice.payment_succeeded' - | 'invoice.sent' - | 'invoice.upcoming' - | 'invoice.updated' - | 'invoice.voided' - | 'invoiceitem.created' - | 'invoiceitem.deleted' - | 'invoiceitem.updated' - | 'issuing_authorization.created' - | 'issuing_authorization.request' - | 'issuing_authorization.updated' - | 'issuing_card.created' - | 'issuing_card.updated' - | 'issuing_cardholder.created' - | 'issuing_cardholder.updated' - | 'issuing_transaction.created' - | 'issuing_transaction.updated' - | 'mandate.updated' - | 'order.created' - | 'order.payment_failed' - | 'order.payment_succeeded' - | 'order.updated' - | 'order_return.created' - | 'payment_intent.amount_capturable_updated' - | 'payment_intent.canceled' - | 'payment_intent.created' - | 'payment_intent.payment_failed' - | 'payment_intent.processing' - | 'payment_intent.succeeded' - | 'payment_method.attached' - | 'payment_method.card_automatically_updated' - | 'payment_method.detached' - | 'payment_method.updated' - | 'payout.canceled' - | 'payout.created' - | 'payout.failed' - | 'payout.paid' - | 'payout.updated' - | 'person.created' - | 'person.deleted' - | 'person.updated' - | 'plan.created' - | 'plan.deleted' - | 'plan.updated' - | 'product.created' - | 'product.deleted' - | 'product.updated' - | 'radar.early_fraud_warning.created' - | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' - | 'reporting.report_run.failed' - | 'reporting.report_run.succeeded' - | 'reporting.report_type.updated' - | 'review.closed' - | 'review.opened' - | 'setup_intent.canceled' - | 'setup_intent.created' - | 'setup_intent.setup_failed' - | 'setup_intent.succeeded' - | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' - | 'source.canceled' - | 'source.chargeable' - | 'source.failed' - | 'source.mandate_notification' - | 'source.refund_attributes_required' - | 'source.transaction.created' - | 'source.transaction.updated' - | 'subscription_schedule.aborted' - | 'subscription_schedule.canceled' - | 'subscription_schedule.completed' - | 'subscription_schedule.created' - | 'subscription_schedule.expiring' - | 'subscription_schedule.released' - | 'subscription_schedule.updated' - | 'tax_rate.created' - | 'tax_rate.updated' - | 'topup.canceled' - | 'topup.created' - | 'topup.failed' - | 'topup.reversed' - | 'topup.succeeded' - | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' - | 'transfer.reversed' - | 'transfer.updated' - )[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: unknown - /** @description The URL of the webhook endpoint. */ - url?: string - } - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['webhook_endpoint'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } - /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ - DeleteWebhookEndpointsWebhookEndpoint: { - parameters: { - path: { - webhook_endpoint: string - } - } - responses: { - /** Successful response. */ - 200: { - schema: definitions['deleted_webhook_endpoint'] - } - /** Error response. */ - default: { - schema: definitions['error'] - } - } - } -} - -export interface external {} diff --git a/test/v2/index.test.js b/test/v2/index.test.js index 415c77d9c..fd71d095d 100644 --- a/test/v2/index.test.js +++ b/test/v2/index.test.js @@ -34,17 +34,6 @@ describe("cli", () => { const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); expect(generated).to.equal(expected); }); - - it(`reads ${schema} spec (v2) from file (alphabetize)`, async () => { - const filename = schema.replace(/\.(json|yaml)/, ".alphabetized.ts"); - - execSync(`${cmd} specs/${schema} -o generated/${filename} --prettier-config fixtures/.prettierrc --alphabetize`, { - cwd, - }); - const generated = fs.readFileSync(new URL(`./generated/${filename}`, cwd), "utf8"); - const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); - expect(generated).to.equal(expected); - }); }); it("reads spec (v2) from remote resource", async () => { diff --git a/test/v3/expected/all-of-string.alphabetized.ts b/test/v3/expected/all-of-string.alphabetized.ts deleted file mode 100644 index b0b8376b6..000000000 --- a/test/v3/expected/all-of-string.alphabetized.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - responses: { - /** A list of types. */ - 200: unknown - } - } - } -} - -export interface components { - schemas: { - /** @description Object with one property that is a string enum */ - Example: { - status?: components['schemas']['ExampleStatus'] - } - /** @enum {string} */ - ExampleStatus: 'ACTIVE' | 'INACTIVE' - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/any-of.alphabetized.ts b/test/v3/expected/any-of.alphabetized.ts deleted file mode 100644 index 57838228d..000000000 --- a/test/v3/expected/any-of.alphabetized.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/cats': { - post: { - responses: { - 200: { - content: { - 'application/json': { - colors: - | string[] - | { - id: string - name: string - }[] - id: string - name: string - } - } - } - } - } - } -} - -export interface components {} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/consts-enums.alphabetized.ts b/test/v3/expected/consts-enums.alphabetized.ts deleted file mode 100644 index 03c04e5bd..000000000 --- a/test/v3/expected/consts-enums.alphabetized.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - responses: { - /** A list of types. */ - 200: unknown - } - } - } -} - -export interface components { - schemas: { - /** @description Enum with null and nullable */ - MyType: { - /** @constant */ - myConstTestField?: 'constant-value' - /** @constant */ - myConstTestFieldNullable?: 4 | null - /** @enum {string|null} */ - myEnumTestField?: ('foo' | 'bar' | null) | null - /** @enum {string|null} */ - myEnumTestFieldNullable?: ('foo' | 'bar' | null) | null - } - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/consts-object.alphabetized.ts b/test/v3/expected/consts-object.alphabetized.ts deleted file mode 100644 index c751d605f..000000000 --- a/test/v3/expected/consts-object.alphabetized.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - responses: { - /** A list of types. */ - 200: unknown - } - } - } -} - -export interface components { - schemas: { - /** @constant */ - TypeA: { hello: 'world' } - /** @constant */ - TypeB: ['content'] - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/falsey-example.alphabetized.ts b/test/v3/expected/falsey-example.alphabetized.ts deleted file mode 100644 index 7469fc3fe..000000000 --- a/test/v3/expected/falsey-example.alphabetized.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - parameters: { - query: { - isEnabled: boolean - count: number - } - } - responses: { - 200: unknown - } - } - } -} - -export interface components { - schemas: { - TestSchema: { - /** - * @default 0 - * @example 0 - */ - count?: number - /** - * @default false - * @example false - */ - isEnabled?: boolean - } - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/github.alphabetized.ts b/test/v3/expected/github.alphabetized.ts deleted file mode 100644 index b7a1dcbe8..000000000 --- a/test/v3/expected/github.alphabetized.ts +++ /dev/null @@ -1,42903 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/': { - /** Get Hypermedia links to resources accessible in GitHub's REST API */ - get: operations['meta/root'] - } - '/app': { - /** - * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-authenticated'] - } - '/app-manifests/{code}/conversions': { - /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ - post: operations['apps/create-from-manifest'] - } - '/app/hook/config': { - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-webhook-config-for-app'] - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - patch: operations['apps/update-webhook-config-for-app'] - } - '/app/hook/deliveries': { - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/list-webhook-deliveries'] - } - '/app/hook/deliveries/{delivery_id}': { - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-webhook-delivery'] - } - '/app/hook/deliveries/{delivery_id}/attempts': { - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - post: operations['apps/redeliver-webhook-delivery'] - } - '/app/installations': { - /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * - * The permissions the installation has are included under the `permissions` key. - */ - get: operations['apps/list-installations'] - } - '/app/installations/{installation_id}': { - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-installation'] - /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - delete: operations['apps/delete-installation'] - } - '/app/installations/{installation_id}/access_tokens': { - /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - post: operations['apps/create-installation-access-token'] - } - '/app/installations/{installation_id}/suspended': { - /** - * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - put: operations['apps/suspend-installation'] - /** - * Removes a GitHub App installation suspension. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - delete: operations['apps/unsuspend-installation'] - } - '/applications/{client_id}/grant': { - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - delete: operations['apps/delete-authorization'] - } - '/applications/{client_id}/token': { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - post: operations['apps/check-token'] - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - delete: operations['apps/delete-token'] - /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - patch: operations['apps/reset-token'] - } - '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - post: operations['apps/scope-token'] - } - '/applications/grants': { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. - */ - get: operations['oauth-authorizations/list-grants'] - } - '/applications/grants/{grant_id}': { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations['oauth-authorizations/get-grant'] - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - delete: operations['oauth-authorizations/delete-grant'] - } - '/apps/{app_slug}': { - /** - * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - get: operations['apps/get-by-slug'] - } - '/authorizations': { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations['oauth-authorizations/list-authorizations'] - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - post: operations['oauth-authorizations/create-authorization'] - } - '/authorizations/{authorization_id}': { - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - get: operations['oauth-authorizations/get-authorization'] - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - delete: operations['oauth-authorizations/delete-authorization'] - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * You can only send one of these scope keys at a time. - */ - patch: operations['oauth-authorizations/update-authorization'] - } - '/authorizations/clients/{client_id}': { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - */ - put: operations['oauth-authorizations/get-or-create-authorization-for-app'] - } - '/authorizations/clients/{client_id}/{fingerprint}': { - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - */ - put: operations['oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint'] - } - '/codes_of_conduct': { - get: operations['codes-of-conduct/get-all-codes-of-conduct'] - } - '/codes_of_conduct/{key}': { - get: operations['codes-of-conduct/get-conduct-code'] - } - '/emojis': { - /** Lists all the emojis available to use on GitHub. */ - get: operations['emojis/get'] - } - '/enterprises/{enterprise}/actions/permissions': { - /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/get-github-actions-permissions-enterprise'] - /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-github-actions-permissions-enterprise'] - } - '/enterprises/{enterprise}/actions/permissions/organizations': { - /** - * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise'] - /** - * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise'] - } - '/enterprises/{enterprise}/actions/permissions/organizations/{org_id}': { - /** - * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/enable-selected-organization-github-actions-enterprise'] - /** - * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/disable-selected-organization-github-actions-enterprise'] - } - '/enterprises/{enterprise}/actions/permissions/selected-actions': { - /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/get-allowed-actions-enterprise'] - /** - * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-allowed-actions-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups': { - /** - * Lists all self-hosted runner groups for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-self-hosted-runner-groups-for-enterprise'] - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - post: operations['enterprise-admin/create-self-hosted-runner-group-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}': { - /** - * Gets a specific self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/get-self-hosted-runner-group-for-enterprise'] - /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/delete-self-hosted-runner-group-from-enterprise'] - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - patch: operations['enterprise-admin/update-self-hosted-runner-group-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations': { - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise'] - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}': { - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise'] - /** - * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners': { - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-self-hosted-runners-in-group-for-enterprise'] - /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-self-hosted-runners-in-group-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}': { - /** - * Adds a self-hosted runner to a runner group configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. - */ - put: operations['enterprise-admin/add-self-hosted-runner-to-group-for-enterprise'] - /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners': { - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-self-hosted-runners-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/{runner_id}': { - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/get-self-hosted-runner-for-enterprise'] - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/delete-self-hosted-runner-from-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/{runner_id}/labels': { - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise'] - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - put: operations['enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise'] - /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - post: operations['enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise'] - /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}': { - /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - delete: operations['enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/downloads': { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - get: operations['enterprise-admin/list-runner-applications-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/registration-token': { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` - */ - post: operations['enterprise-admin/create-registration-token-for-enterprise'] - } - '/enterprises/{enterprise}/actions/runners/remove-token': { - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations['enterprise-admin/create-remove-token-for-enterprise'] - } - '/enterprises/{enterprise}/audit-log': { - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - get: operations['enterprise-admin/get-audit-log'] - } - '/enterprises/{enterprise}/secret-scanning/alerts': { - /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - */ - get: operations['secret-scanning/list-alerts-for-enterprise'] - } - '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-actions-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/advanced-security': { - /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - get: operations['billing/get-github-advanced-security-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-packages-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-shared-storage-billing-ghe'] - } - '/events': { - /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ - get: operations['activity/list-public-events'] - } - '/feeds': { - /** - * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: - * - * * **Timeline**: The GitHub global public timeline - * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) - * * **Current user public**: The public timeline for the authenticated user - * * **Current user**: The private timeline for the authenticated user - * * **Current user actor**: The private timeline for activity created by the authenticated user - * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. - * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. - * - * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. - */ - get: operations['activity/get-feeds'] - } - '/gists': { - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - get: operations['gists/list'] - /** - * Allows you to add a new gist with one or more files. - * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. - */ - post: operations['gists/create'] - } - '/gists/{gist_id}': { - get: operations['gists/get'] - delete: operations['gists/delete'] - /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ - patch: operations['gists/update'] - } - '/gists/{gist_id}/{sha}': { - get: operations['gists/get-revision'] - } - '/gists/{gist_id}/comments': { - get: operations['gists/list-comments'] - post: operations['gists/create-comment'] - } - '/gists/{gist_id}/comments/{comment_id}': { - get: operations['gists/get-comment'] - delete: operations['gists/delete-comment'] - patch: operations['gists/update-comment'] - } - '/gists/{gist_id}/commits': { - get: operations['gists/list-commits'] - } - '/gists/{gist_id}/forks': { - get: operations['gists/list-forks'] - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - post: operations['gists/fork'] - } - '/gists/{gist_id}/star': { - get: operations['gists/check-is-starred'] - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - put: operations['gists/star'] - delete: operations['gists/unstar'] - } - '/gists/public': { - /** - * List public gists sorted by most recently updated to least recently updated. - * - * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. - */ - get: operations['gists/list-public'] - } - '/gists/starred': { - /** List the authenticated user's starred gists: */ - get: operations['gists/list-starred'] - } - '/gitignore/templates': { - /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ - get: operations['gitignore/get-all-templates'] - } - '/gitignore/templates/{name}': { - /** - * The API also allows fetching the source of a single template. - * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. - */ - get: operations['gitignore/get-template'] - } - '/installation/repositories': { - /** - * List repositories that an app installation can access. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - get: operations['apps/list-repos-accessible-to-installation'] - } - '/installation/token': { - /** - * Revokes the installation token you're using to authenticate as an installation and access this endpoint. - * - * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - delete: operations['apps/revoke-installation-access-token'] - } - '/issues': { - /** - * List issues assigned to the authenticated user across all visible repositories including owned repositories, member - * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not - * necessarily assigned to you. - * - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations['issues/list'] - } - '/licenses': { - get: operations['licenses/get-all-commonly-used'] - } - '/licenses/{license}': { - get: operations['licenses/get'] - } - '/markdown': { - post: operations['markdown/render'] - } - '/markdown/raw': { - /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - post: operations['markdown/render-raw'] - } - '/marketplace_listing/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account'] - } - '/marketplace_listing/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans'] - } - '/marketplace_listing/plans/{plan_id}/accounts': { - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan'] - } - '/marketplace_listing/stubbed/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - '/marketplace_listing/stubbed/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans-stubbed'] - } - '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan-stubbed'] - } - '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ - get: operations['meta/get'] - } - '/networks/{owner}/{repo}/events': { - get: operations['activity/list-public-events-for-repo-network'] - } - '/notifications': { - /** List all notifications for the current user, sorted by most recently updated. */ - get: operations['activity/list-notifications-for-authenticated-user'] - /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - put: operations['activity/mark-notifications-as-read'] - } - '/notifications/threads/{thread_id}': { - get: operations['activity/get-thread'] - patch: operations['activity/mark-thread-as-read'] - } - '/notifications/threads/{thread_id}/subscription': { - /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). - * - * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. - */ - get: operations['activity/get-thread-subscription-for-authenticated-user'] - /** - * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. - * - * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. - * - * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. - */ - put: operations['activity/set-thread-subscription'] - /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ - delete: operations['activity/delete-thread-subscription'] - } - '/octocat': { - /** Get the octocat as ASCII art */ - get: operations['meta/get-octocat'] - } - '/organizations': { - /** - * Lists all organizations, in the order that they were created on GitHub. - * - * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. - */ - get: operations['orgs/list'] - } - '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] - } - '/organizations/{organization_id}/custom_roles': { - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - get: operations['orgs/list-custom-roles'] - } - '/orgs/{org}': { - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - get: operations['orgs/get'] - /** - * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). - * - * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. - */ - patch: operations['orgs/update'] - } - '/orgs/{org}/actions/permissions': { - /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations['actions/get-github-actions-permissions-organization'] - /** - * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations['actions/set-github-actions-permissions-organization'] - } - '/orgs/{org}/actions/permissions/repositories': { - /** - * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations['actions/list-selected-repositories-enabled-github-actions-organization'] - /** - * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations['actions/set-selected-repositories-enabled-github-actions-organization'] - } - '/orgs/{org}/actions/permissions/repositories/{repository_id}': { - /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations['actions/enable-selected-repository-github-actions-organization'] - /** - * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - delete: operations['actions/disable-selected-repository-github-actions-organization'] - } - '/orgs/{org}/actions/permissions/selected-actions': { - /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations['actions/get-allowed-actions-organization'] - /** - * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations['actions/set-allowed-actions-organization'] - } - '/orgs/{org}/actions/permissions/workflow': { - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - get: operations['actions/get-github-actions-default-workflow-permissions-organization'] - /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - put: operations['actions/set-github-actions-default-workflow-permissions-organization'] - } - '/orgs/{org}/actions/runner-groups': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-self-hosted-runner-groups-for-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Creates a new self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - post: operations['actions/create-self-hosted-runner-group-for-org'] - } - '/orgs/{org}/actions/runner-groups/{runner_group_id}': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Gets a specific self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/get-self-hosted-runner-group-for-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Deletes a self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/delete-self-hosted-runner-group-from-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - patch: operations['actions/update-self-hosted-runner-group-for-org'] - } - '/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists the repositories with access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-repo-access-to-self-hosted-runner-group-in-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - put: operations['actions/set-repo-access-to-self-hosted-runner-group-in-org'] - } - '/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - put: operations['actions/add-repo-access-to-self-hosted-runner-group-in-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/remove-repo-access-to-self-hosted-runner-group-in-org'] - } - '/orgs/{org}/actions/runner-groups/{runner_group_id}/runners': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists self-hosted runners that are in a specific organization group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-self-hosted-runners-in-group-for-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of self-hosted runners that are part of an organization runner group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - put: operations['actions/set-self-hosted-runners-in-group-for-org'] - } - '/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}': { - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a self-hosted runner to a runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - put: operations['actions/add-self-hosted-runner-to-group-for-org'] - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/remove-self-hosted-runner-from-group-for-org'] - } - '/orgs/{org}/actions/runners': { - /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-self-hosted-runners-for-org'] - } - '/orgs/{org}/actions/runners/{runner_id}': { - /** - * Gets a specific self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/get-self-hosted-runner-for-org'] - /** - * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/delete-self-hosted-runner-from-org'] - } - '/orgs/{org}/actions/runners/{runner_id}/labels': { - /** - * Lists all labels for a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-labels-for-self-hosted-runner-for-org'] - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - put: operations['actions/set-custom-labels-for-self-hosted-runner-for-org'] - /** - * Add custom labels to a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - post: operations['actions/add-custom-labels-to-self-hosted-runner-for-org'] - /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/remove-all-custom-labels-from-self-hosted-runner-for-org'] - } - '/orgs/{org}/actions/runners/{runner_id}/labels/{name}': { - /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - delete: operations['actions/remove-custom-label-from-self-hosted-runner-for-org'] - } - '/orgs/{org}/actions/runners/downloads': { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - get: operations['actions/list-runner-applications-for-org'] - } - '/orgs/{org}/actions/runners/registration-token': { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` - */ - post: operations['actions/create-registration-token-for-org'] - } - '/orgs/{org}/actions/runners/remove-token': { - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations['actions/create-remove-token-for-org'] - } - '/orgs/{org}/actions/secrets': { - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations['actions/list-org-secrets'] - } - '/orgs/{org}/actions/secrets/{secret_name}': { - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations['actions/get-org-secret'] - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['actions/create-or-update-org-secret'] - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - delete: operations['actions/delete-org-secret'] - } - '/orgs/{org}/actions/secrets/{secret_name}/repositories': { - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations['actions/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - put: operations['actions/set-selected-repos-for-org-secret'] - } - '/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - put: operations['actions/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - delete: operations['actions/remove-selected-repo-from-org-secret'] - } - '/orgs/{org}/actions/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - get: operations['actions/get-org-public-key'] - } - '/orgs/{org}/audit-log': { - /** - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - */ - get: operations['orgs/get-audit-log'] - } - '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - get: operations['orgs/list-blocked-users'] - } - '/orgs/{org}/blocks/{username}': { - get: operations['orgs/check-blocked-user'] - put: operations['orgs/block-user'] - delete: operations['orgs/unblock-user'] - } - '/orgs/{org}/code-scanning/alerts': { - /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - get: operations['code-scanning/list-alerts-for-org'] - } - '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations['orgs/list-saml-sso-authorizations'] - } - '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations['orgs/remove-saml-sso-authorization'] - } - '/orgs/{org}/dependabot/secrets': { - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - get: operations['dependabot/list-org-secrets'] - } - '/orgs/{org}/dependabot/secrets/{secret_name}': { - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - get: operations['dependabot/get-org-secret'] - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['dependabot/create-or-update-org-secret'] - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - delete: operations['dependabot/delete-org-secret'] - } - '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - put: operations['dependabot/set-selected-repos-for-org-secret'] - } - '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - delete: operations['dependabot/remove-selected-repo-from-org-secret'] - } - '/orgs/{org}/dependabot/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - get: operations['dependabot/get-org-public-key'] - } - '/orgs/{org}/events': { - get: operations['activity/list-public-org-events'] - } - '/orgs/{org}/external-group/{group_id}': { - /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - get: operations['teams/external-idp-group-info-for-org'] - } - '/orgs/{org}/external-groups': { - /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - get: operations['teams/list-external-idp-groups-for-org'] - } - '/orgs/{org}/failed_invitations': { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations['orgs/list-failed-invitations'] - } - '/orgs/{org}/hooks': { - get: operations['orgs/list-webhooks'] - /** Here's how you can create a hook that posts payloads in JSON format: */ - post: operations['orgs/create-webhook'] - } - '/orgs/{org}/hooks/{hook_id}': { - /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ - get: operations['orgs/get-webhook'] - delete: operations['orgs/delete-webhook'] - /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ - patch: operations['orgs/update-webhook'] - } - '/orgs/{org}/hooks/{hook_id}/config': { - /** - * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. - */ - get: operations['orgs/get-webhook-config-for-org'] - /** - * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. - */ - patch: operations['orgs/update-webhook-config-for-org'] - } - '/orgs/{org}/hooks/{hook_id}/deliveries': { - /** Returns a list of webhook deliveries for a webhook configured in an organization. */ - get: operations['orgs/list-webhook-deliveries'] - } - '/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}': { - /** Returns a delivery for a webhook configured in an organization. */ - get: operations['orgs/get-webhook-delivery'] - } - '/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts': { - /** Redeliver a delivery for a webhook configured in an organization. */ - post: operations['orgs/redeliver-webhook-delivery'] - } - '/orgs/{org}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - post: operations['orgs/ping-webhook'] - } - '/orgs/{org}/installation': { - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-org-installation'] - } - '/orgs/{org}/installations': { - /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ - get: operations['orgs/list-app-installations'] - } - '/orgs/{org}/interaction-limits': { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-org'] - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations['interactions/set-restrictions-for-org'] - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations['interactions/remove-restrictions-for-org'] - } - '/orgs/{org}/invitations': { - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['orgs/create-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}': { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations['orgs/cancel-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}/teams': { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations['orgs/list-invitation-teams'] - } - '/orgs/{org}/issues': { - /** - * List issues in an organization assigned to the authenticated user. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations['issues/list-for-org'] - } - '/orgs/{org}/members': { - /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ - get: operations['orgs/list-members'] - } - '/orgs/{org}/members/{username}': { - /** Check if a user is, publicly or privately, a member of the organization. */ - get: operations['orgs/check-membership-for-user'] - /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ - delete: operations['orgs/remove-member'] - } - '/orgs/{org}/memberships/{username}': { - /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ - get: operations['orgs/get-membership-for-user'] - /** - * Only authenticated organization owners can add a member to the organization or update the member's role. - * - * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. - * - * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. - * - * **Rate limits** - * - * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. - */ - put: operations['orgs/set-membership-for-user'] - /** - * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - * - * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. - */ - delete: operations['orgs/remove-membership-for-user'] - } - '/orgs/{org}/migrations': { - /** Lists the most recent migrations. */ - get: operations['migrations/list-for-org'] - /** Initiates the generation of a migration archive. */ - post: operations['migrations/start-for-org'] - } - '/orgs/{org}/migrations/{migration_id}': { - /** - * Fetches the status of a migration. - * - * The `state` of a migration can be one of the following values: - * - * * `pending`, which means the migration hasn't started yet. - * * `exporting`, which means the migration is in progress. - * * `exported`, which means the migration finished successfully. - * * `failed`, which means the migration failed. - */ - get: operations['migrations/get-status-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations['migrations/delete-archive-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations['migrations/unlock-repo-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - get: operations['migrations/list-repos-for-org'] - } - '/orgs/{org}/outside_collaborators': { - /** List all users who are outside collaborators of an organization. */ - get: operations['orgs/list-outside-collaborators'] - } - '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ - put: operations['orgs/convert-member-to-outside-collaborator'] - /** Removing a user from this list will remove them from all the organization's repositories. */ - delete: operations['orgs/remove-outside-collaborator'] - } - '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-organization'] - } - '/orgs/{org}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-org'] - } - '/orgs/{org}/projects': { - /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - get: operations['projects/list-for-org'] - /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - post: operations['projects/create-for-org'] - } - '/orgs/{org}/public_members': { - /** Members of an organization can choose to have their membership publicized or not. */ - get: operations['orgs/list-public-members'] - } - '/orgs/{org}/public_members/{username}': { - get: operations['orgs/check-public-membership-for-user'] - /** - * The user can publicize their own membership. (A user cannot publicize the membership for another user.) - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations['orgs/set-public-membership-for-authenticated-user'] - delete: operations['orgs/remove-public-membership-for-authenticated-user'] - } - '/orgs/{org}/repos': { - /** Lists repositories for the specified organization. */ - get: operations['repos/list-for-org'] - /** - * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - post: operations['repos/create-in-org'] - } - '/orgs/{org}/secret-scanning/alerts': { - /** - * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations['secret-scanning/list-alerts-for-org'] - } - '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-actions-billing-org'] - } - '/orgs/{org}/settings/billing/advanced-security': { - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - get: operations['billing/get-github-advanced-security-billing-org'] - } - '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-packages-billing-org'] - } - '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-shared-storage-billing-org'] - } - '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - get: operations['teams/list-idp-groups-for-org'] - } - '/orgs/{org}/teams': { - /** Lists all teams in an organization that are visible to the authenticated user. */ - get: operations['teams/list'] - /** - * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". - */ - post: operations['teams/create'] - } - '/orgs/{org}/teams/{team_slug}': { - /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. - */ - get: operations['teams/get-by-name'] - /** - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. - */ - delete: operations['teams/delete-in-org'] - /** - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. - */ - patch: operations['teams/update-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions': { - /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. - */ - get: operations['teams/list-discussions-in-org'] - /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. - */ - post: operations['teams/create-discussion-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}': { - /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - get: operations['teams/get-discussion-in-org'] - /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - delete: operations['teams/delete-discussion-in-org'] - /** - * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - patch: operations['teams/update-discussion-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments': { - /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - get: operations['teams/list-discussion-comments-in-org'] - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - post: operations['teams/create-discussion-comment-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}': { - /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - get: operations['teams/get-discussion-comment-in-org'] - /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - delete: operations['teams/delete-discussion-comment-in-org'] - /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - patch: operations['teams/update-discussion-comment-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions': { - /** - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - get: operations['reactions/list-for-team-discussion-comment-in-org'] - /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - post: operations['reactions/create-for-team-discussion-comment-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations['reactions/delete-for-team-discussion-comment'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions': { - /** - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - get: operations['reactions/list-for-team-discussion-in-org'] - /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - post: operations['reactions/create-for-team-discussion-in-org'] - } - '/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations['reactions/delete-for-team-discussion'] - } - '/orgs/{org}/teams/{team_slug}/external-groups': { - /** - * Deletes a connection between a team and an external group. - * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - */ - delete: operations['teams/unlink-external-idp-group-from-team-for-org'] - /** - * Creates a connection between a team and an external group. Only one external group can be linked to a team. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - patch: operations['teams/link-external-idp-group-to-team-for-org'] - } - '/orgs/{org}/teams/{team_slug}/invitations': { - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations['teams/list-pending-invitations-in-org'] - } - '/orgs/{org}/teams/{team_slug}/members': { - /** - * Team members will include the members of child teams. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - get: operations['teams/list-members-in-org'] - } - '/orgs/{org}/teams/{team_slug}/memberships/{username}': { - /** - * Team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. - * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - get: operations['teams/get-membership-for-user-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - put: operations['teams/add-or-update-membership-for-user-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - delete: operations['teams/remove-membership-for-user-in-org'] - } - '/orgs/{org}/teams/{team_slug}/projects': { - /** - * Lists the organization projects for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. - */ - get: operations['teams/list-projects-in-org'] - } - '/orgs/{org}/teams/{team_slug}/projects/{project_id}': { - /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - get: operations['teams/check-permissions-for-project-in-org'] - /** - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - put: operations['teams/add-or-update-project-permissions-in-org'] - /** - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - delete: operations['teams/remove-project-in-org'] - } - '/orgs/{org}/teams/{team_slug}/repos': { - /** - * Lists a team's repositories visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. - */ - get: operations['teams/list-repos-in-org'] - } - '/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}': { - /** - * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. - * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. - * - * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - get: operations['teams/check-permissions-for-repo-in-org'] - /** - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - */ - put: operations['teams/add-or-update-repo-permissions-in-org'] - /** - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - delete: operations['teams/remove-repo-in-org'] - } - '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } - '/orgs/{org}/teams/{team_slug}/teams': { - /** - * Lists the child teams of the team specified by `{team_slug}`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. - */ - get: operations['teams/list-child-in-org'] - } - '/projects/{project_id}': { - /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - get: operations['projects/get'] - /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - delete: operations['projects/delete'] - /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - patch: operations['projects/update'] - } - '/projects/{project_id}/collaborators': { - /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ - get: operations['projects/list-collaborators'] - } - '/projects/{project_id}/collaborators/{username}': { - /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ - put: operations['projects/add-collaborator'] - /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - delete: operations['projects/remove-collaborator'] - } - '/projects/{project_id}/collaborators/{username}/permission': { - /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ - get: operations['projects/get-permission-for-user'] - } - '/projects/{project_id}/columns': { - get: operations['projects/list-columns'] - post: operations['projects/create-column'] - } - '/projects/columns/{column_id}': { - get: operations['projects/get-column'] - delete: operations['projects/delete-column'] - patch: operations['projects/update-column'] - } - '/projects/columns/{column_id}/cards': { - get: operations['projects/list-cards'] - post: operations['projects/create-card'] - } - '/projects/columns/{column_id}/moves': { - post: operations['projects/move-column'] - } - '/projects/columns/cards/{card_id}': { - get: operations['projects/get-card'] - delete: operations['projects/delete-card'] - patch: operations['projects/update-card'] - } - '/projects/columns/cards/{card_id}/moves': { - post: operations['projects/move-card'] - } - '/rate_limit': { - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. - */ - get: operations['rate-limit/get'] - } - '/reactions/{reaction_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations['reactions/delete-legacy'] - } - '/repos/{owner}/{repo}': { - /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ - get: operations['repos/get'] - /** - * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. - * - * If an organization owner has configured the organization to prevent members from deleting organization-owned - * repositories, you will get a `403 Forbidden` response. - */ - delete: operations['repos/delete'] - /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ - patch: operations['repos/update'] - } - '/repos/{owner}/{repo}/actions/artifacts': { - /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/list-artifacts-for-repo'] - } - '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}': { - /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/get-artifact'] - /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - delete: operations['actions/delete-artifact'] - } - '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}': { - /** - * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in - * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/download-artifact'] - } - '/repos/{owner}/{repo}/actions/jobs/{job_id}': { - /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/get-job-for-workflow-run'] - } - '/repos/{owner}/{repo}/actions/jobs/{job_id}/logs': { - /** - * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look - * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can - * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must - * have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/download-job-logs-for-workflow-run'] - } - '/repos/{owner}/{repo}/actions/permissions': { - /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - get: operations['actions/get-github-actions-permissions-repository'] - /** - * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. - * - * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - put: operations['actions/set-github-actions-permissions-repository'] - } - '/repos/{owner}/{repo}/actions/permissions/selected-actions': { - /** - * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - get: operations['actions/get-allowed-actions-repository'] - /** - * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - put: operations['actions/set-allowed-actions-repository'] - } - '/repos/{owner}/{repo}/actions/runners': { - /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ - get: operations['actions/list-self-hosted-runners-for-repo'] - } - '/repos/{owner}/{repo}/actions/runners/{runner_id}': { - /** - * Gets a specific self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - get: operations['actions/get-self-hosted-runner-for-repo'] - /** - * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `repo` - * scope to use this endpoint. - */ - delete: operations['actions/delete-self-hosted-runner-from-repo'] - } - '/repos/{owner}/{repo}/actions/runners/{runner_id}/labels': { - /** - * Lists all labels for a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - get: operations['actions/list-labels-for-self-hosted-runner-for-repo'] - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - put: operations['actions/set-custom-labels-for-self-hosted-runner-for-repo'] - /** - * Add custom labels to a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - post: operations['actions/add-custom-labels-to-self-hosted-runner-for-repo'] - /** - * Remove all custom labels from a self-hosted runner configured in a - * repository. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - delete: operations['actions/remove-all-custom-labels-from-self-hosted-runner-for-repo'] - } - '/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}': { - /** - * Remove a custom label from a self-hosted runner configured - * in a repository. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - delete: operations['actions/remove-custom-label-from-self-hosted-runner-for-repo'] - } - '/repos/{owner}/{repo}/actions/runners/downloads': { - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. - */ - get: operations['actions/list-runner-applications-for-repo'] - } - '/repos/{owner}/{repo}/actions/runners/registration-token': { - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate - * using an access token with the `repo` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN - * ``` - */ - post: operations['actions/create-registration-token-for-repo'] - } - '/repos/{owner}/{repo}/actions/runners/remove-token': { - /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. - * You must authenticate using an access token with the `repo` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - post: operations['actions/create-remove-token-for-repo'] - } - '/repos/{owner}/{repo}/actions/runs': { - /** - * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/list-workflow-runs-for-repo'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}': { - /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/get-workflow-run'] - /** - * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is - * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use - * this endpoint. - */ - delete: operations['actions/delete-workflow-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approvals': { - /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/get-reviews-for-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - post: operations['actions/approve-workflow-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { - /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/list-workflow-run-artifacts'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}': { - /** - * Gets a specific workflow run attempt. Anyone with read access to the repository - * can use this endpoint. If the repository is private you must use an access token - * with the `repo` scope. GitHub Apps must have the `actions:read` permission to - * use this endpoint. - */ - get: operations['actions/get-workflow-run-attempt'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - get: operations['actions/list-jobs-for-workflow-run-attempt'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { - /** - * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after - * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/download-workflow-run-attempt-logs'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/cancel': { - /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - post: operations['actions/cancel-workflow-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/jobs': { - /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - get: operations['actions/list-jobs-for-workflow-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { - /** - * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for - * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use - * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have - * the `actions:read` permission to use this endpoint. - */ - get: operations['actions/download-workflow-run-logs'] - /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - delete: operations['actions/delete-workflow-run-logs'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments': { - /** - * Get all deployment environments for a workflow run that are waiting for protection rules to pass. - * - * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-pending-deployments-for-run'] - /** - * Approve or reject pending deployments that are waiting on approval by a required reviewer. - * - * Anyone with read access to the repository contents and deployments can use this endpoint. - */ - post: operations['actions/review-pending-deployments-for-run'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun': { - /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - post: operations['actions/re-run-workflow'] - } - '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-run-usage'] - } - '/repos/{owner}/{repo}/actions/secrets': { - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/list-repo-secrets'] - } - '/repos/{owner}/{repo}/actions/secrets/{secret_name}': { - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/get-repo-secret'] - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['actions/create-or-update-repo-secret'] - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - delete: operations['actions/delete-repo-secret'] - } - '/repos/{owner}/{repo}/actions/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/get-repo-public-key'] - } - '/repos/{owner}/{repo}/actions/workflows': { - /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/list-repo-workflows'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}': { - /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['actions/get-workflow'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable': { - /** - * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - put: operations['actions/disable-workflow'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches': { - /** - * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." - */ - post: operations['actions/create-workflow-dispatch'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable': { - /** - * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - put: operations['actions/enable-workflow'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs': { - /** - * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - */ - get: operations['actions/list-workflow-runs'] - } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-usage'] - } - '/repos/{owner}/{repo}/assignees': { - /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - get: operations['issues/list-assignees'] - } - '/repos/{owner}/{repo}/assignees/{assignee}': { - /** - * Checks if a user has permission to be assigned to an issue in this repository. - * - * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. - * - * Otherwise a `404` status code is returned. - */ - get: operations['issues/check-user-can-be-assigned'] - } - '/repos/{owner}/{repo}/autolinks': { - /** - * This returns a list of autolinks configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - get: operations['repos/list-autolinks'] - /** Users with admin access to the repository can create an autolink. */ - post: operations['repos/create-autolink'] - } - '/repos/{owner}/{repo}/autolinks/{autolink_id}': { - /** - * This returns a single autolink reference by ID that was configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - get: operations['repos/get-autolink'] - /** - * This deletes a single autolink reference by ID that was configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - delete: operations['repos/delete-autolink'] - } - '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - delete: operations['repos/disable-automated-security-fixes'] - } - '/repos/{owner}/{repo}/branches': { - get: operations['repos/list-branches'] - } - '/repos/{owner}/{repo}/branches/{branch}': { - get: operations['repos/get-branch'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection': { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['repos/get-branch-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Protecting a branch requires admin or owner permissions to the repository. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - * - * **Note**: The list of users, apps, and teams in total is limited to 100 items. - */ - put: operations['repos/update-branch-protection'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations['repos/delete-branch-protection'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins': { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['repos/get-admin-branch-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - post: operations['repos/set-admin-branch-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - delete: operations['repos/delete-admin-branch-protection'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews': { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['repos/get-pull-request-review-protection'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations['repos/delete-pull-request-review-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - */ - patch: operations['repos/update-pull-request-review-protection'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. - * - * **Note**: You must enable branch protection to require signed commits. - */ - get: operations['repos/get-commit-signature-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. - */ - post: operations['repos/create-commit-signature-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. - */ - delete: operations['repos/delete-commit-signature-protection'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks': { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['repos/get-status-checks-protection'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations['repos/remove-status-check-protection'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - */ - patch: operations['repos/update-status-check-protection'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts': { - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['repos/get-all-status-check-contexts'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - put: operations['repos/set-status-check-contexts'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - post: operations['repos/add-status-check-contexts'] - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - delete: operations['repos/remove-status-check-contexts'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists who has access to this protected branch. - * - * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. - */ - get: operations['repos/get-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - delete: operations['repos/delete-access-restrictions'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - */ - get: operations['repos/get-apps-with-access-to-protected-branch'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - put: operations['repos/set-app-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - post: operations['repos/add-app-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations['repos/remove-app-access-restrictions'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. The list includes child teams. - */ - get: operations['repos/get-teams-with-access-to-protected-branch'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - put: operations['repos/set-team-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. You can also give push access to child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - post: operations['repos/add-team-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. You can also remove push access for child teams. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations['repos/remove-team-access-restrictions'] - } - '/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the people who have push access to this branch. - */ - get: operations['repos/get-users-with-access-to-protected-branch'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - put: operations['repos/set-user-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified people push access for this branch. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - post: operations['repos/add-user-access-restrictions'] - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a user to push to this branch. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - delete: operations['repos/remove-user-access-restrictions'] - } - '/repos/{owner}/{repo}/branches/{branch}/rename': { - /** - * Renames a branch in a repository. - * - * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". - * - * The permissions required to use this endpoint depends on whether you are renaming the default branch. - * - * To rename a non-default branch: - * - * * Users must have push access. - * * GitHub Apps must have the `contents:write` repository permission. - * - * To rename the default branch: - * - * * Users must have admin or owner permissions. - * * GitHub Apps must have the `administration:write` repository permission. - */ - post: operations['repos/rename-branch'] - } - '/repos/{owner}/{repo}/check-runs': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. - * - * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. - */ - post: operations['checks/create'] - } - '/repos/{owner}/{repo}/check-runs/{check_run_id}': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - get: operations['checks/get'] - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. - */ - patch: operations['checks/update'] - } - '/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations': { - /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ - get: operations['checks/list-annotations'] - } - '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { - /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - post: operations['checks/rerequest-run'] - } - '/repos/{owner}/{repo}/check-suites': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - post: operations['checks/create-suite'] - } - '/repos/{owner}/{repo}/check-suites/{check_suite_id}': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - get: operations['checks/get-suite'] - } - '/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - get: operations['checks/list-for-suite'] - } - '/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest': { - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - post: operations['checks/rerequest-suite'] - } - '/repos/{owner}/{repo}/check-suites/preferences': { - /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - patch: operations['checks/set-suites-preferences'] - } - '/repos/{owner}/{repo}/code-scanning/alerts': { - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - get: operations['code-scanning/list-alerts-for-repo'] - } - '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}': { - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - get: operations['code-scanning/get-alert'] - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - patch: operations['code-scanning/update-alert'] - } - '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances': { - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - get: operations['code-scanning/list-alert-instances'] - } - '/repos/{owner}/{repo}/code-scanning/analyses': { - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - get: operations['code-scanning/list-recent-analyses'] - } - '/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}': { - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - */ - get: operations['code-scanning/get-analysis'] - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - delete: operations['code-scanning/delete-analysis'] - } - '/repos/{owner}/{repo}/code-scanning/sarifs': { - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - post: operations['code-scanning/upload-sarif'] - } - '/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}': { - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - get: operations['code-scanning/get-sarif'] - } - '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-in-repository-for-authenticated-user'] - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/repo-machines-for-authenticated-user'] - } - '/repos/{owner}/{repo}/collaborators': { - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - get: operations['repos/list-collaborators'] - } - '/repos/{owner}/{repo}/collaborators/{username}': { - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - get: operations['repos/check-collaborator'] - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - put: operations['repos/add-collaborator'] - delete: operations['repos/remove-collaborator'] - } - '/repos/{owner}/{repo}/collaborators/{username}/permission': { - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - get: operations['repos/get-collaborator-permission-level'] - } - '/repos/{owner}/{repo}/comments': { - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - get: operations['repos/list-commit-comments-for-repo'] - } - '/repos/{owner}/{repo}/comments/{comment_id}': { - get: operations['repos/get-commit-comment'] - delete: operations['repos/delete-commit-comment'] - patch: operations['repos/update-commit-comment'] - } - '/repos/{owner}/{repo}/comments/{comment_id}/reactions': { - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - post: operations['reactions/create-for-commit-comment'] - } - '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - delete: operations['reactions/delete-for-commit-comment'] - } - '/repos/{owner}/{repo}/commits': { - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - get: operations['repos/list-commits'] - } - '/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head': { - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - get: operations['repos/list-branches-for-head-commit'] - } - '/repos/{owner}/{repo}/commits/{commit_sha}/comments': { - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - get: operations['repos/list-comments-for-commit'] - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['repos/create-commit-comment'] - } - '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - get: operations['repos/list-pull-requests-associated-with-commit'] - } - '/repos/{owner}/{repo}/commits/{ref}': { - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - get: operations['repos/get-commit'] - } - '/repos/{owner}/{repo}/commits/{ref}/check-runs': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - get: operations['checks/list-for-ref'] - } - '/repos/{owner}/{repo}/commits/{ref}/check-suites': { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - get: operations['checks/list-suites-for-ref'] - } - '/repos/{owner}/{repo}/commits/{ref}/status': { - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - get: operations['repos/get-combined-status-for-ref'] - } - '/repos/{owner}/{repo}/commits/{ref}/statuses': { - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - get: operations['repos/list-commit-statuses-for-ref'] - } - '/repos/{owner}/{repo}/community/profile': { - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations['repos/get-community-profile-metrics'] - } - '/repos/{owner}/{repo}/compare/{basehead}': { - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - get: operations['repos/compare-commits'] - } - '/repos/{owner}/{repo}/contents/{path}': { - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent - * object format. - * - * **Note**: - * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees - * API](https://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * The response will be an array of objects, one object for each item in the directory. - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value - * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). - * In the next major version of the API, the type will be returned as "submodule". - * - * #### If the content is a symlink - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the - * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific - * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out - * the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the - * github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - get: operations['repos/get-content'] - /** Creates a new file or replaces an existing file in a repository. */ - put: operations['repos/create-or-update-file-contents'] - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - delete: operations['repos/delete-file'] - } - '/repos/{owner}/{repo}/contributors': { - /** - * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. - * - * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. - */ - get: operations['repos/list-contributors'] - } - '/repos/{owner}/{repo}/dependabot/secrets': { - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - get: operations['dependabot/list-repo-secrets'] - } - '/repos/{owner}/{repo}/dependabot/secrets/{secret_name}': { - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - get: operations['dependabot/get-repo-secret'] - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['dependabot/create-or-update-repo-secret'] - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - delete: operations['dependabot/delete-repo-secret'] - } - '/repos/{owner}/{repo}/dependabot/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - get: operations['dependabot/get-repo-public-key'] - } - '/repos/{owner}/{repo}/deployments': { - /** Simple filtering of deployments is available via query parameters: */ - get: operations['repos/list-deployments'] - /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts - * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. - * - * #### Merge conflict response - * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't - * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. - * - * #### Failed commit status checks - * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` - * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. - */ - post: operations['repos/create-deployment'] - } - '/repos/{owner}/{repo}/deployments/{deployment_id}': { - get: operations['repos/get-deployment'] - /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. - * - * To set a deployment as inactive, you must: - * - * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * * Mark the active deployment as inactive by adding any non-successful deployment status. - * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." - */ - delete: operations['repos/delete-deployment'] - } - '/repos/{owner}/{repo}/deployments/{deployment_id}/statuses': { - /** Users with pull access can view deployment statuses for a deployment: */ - get: operations['repos/list-deployment-statuses'] - /** - * Users with `push` access can create deployment statuses for a given deployment. - * - * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. - */ - post: operations['repos/create-deployment-status'] - } - '/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}': { - /** Users with pull access can view a deployment status for a deployment: */ - get: operations['repos/get-deployment-status'] - } - '/repos/{owner}/{repo}/dispatches': { - /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. - */ - post: operations['repos/create-dispatch-event'] - } - '/repos/{owner}/{repo}/environments': { - /** - * Get all environments for a repository. - * - * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['repos/get-all-environments'] - } - '/repos/{owner}/{repo}/environments/{environment_name}': { - /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - get: operations['repos/get-environment'] - /** - * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." - * - * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." - * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." - * - * You must authenticate using an access token with the repo scope to use this endpoint. - */ - put: operations['repos/create-or-update-environment'] - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - delete: operations['repos/delete-an-environment'] - } - '/repos/{owner}/{repo}/events': { - get: operations['activity/list-repo-events'] - } - '/repos/{owner}/{repo}/forks': { - get: operations['repos/list-forks'] - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - post: operations['repos/create-fork'] - } - '/repos/{owner}/{repo}/git/blobs': { - post: operations['git/create-blob'] - } - '/repos/{owner}/{repo}/git/blobs/{file_sha}': { - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - get: operations['git/get-blob'] - } - '/repos/{owner}/{repo}/git/commits': { - /** - * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - post: operations['git/create-commit'] - } - '/repos/{owner}/{repo}/git/commits/{commit_sha}': { - /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - get: operations['git/get-commit'] - } - '/repos/{owner}/{repo}/git/matching-refs/{ref}': { - /** - * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - * - * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. - */ - get: operations['git/list-matching-refs'] - } - '/repos/{owner}/{repo}/git/ref/{ref}': { - /** - * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - */ - get: operations['git/get-ref'] - } - '/repos/{owner}/{repo}/git/refs': { - /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ - post: operations['git/create-ref'] - } - '/repos/{owner}/{repo}/git/refs/{ref}': { - delete: operations['git/delete-ref'] - patch: operations['git/update-ref'] - } - '/repos/{owner}/{repo}/git/tags': { - /** - * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - post: operations['git/create-tag'] - } - '/repos/{owner}/{repo}/git/tags/{tag_sha}': { - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - get: operations['git/get-tag'] - } - '/repos/{owner}/{repo}/git/trees': { - /** - * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - * - * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." - */ - post: operations['git/create-tree'] - } - '/repos/{owner}/{repo}/git/trees/{tree_sha}': { - /** - * Returns a single tree using the SHA1 value for that tree. - * - * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. - */ - get: operations['git/get-tree'] - } - '/repos/{owner}/{repo}/hooks': { - get: operations['repos/list-webhooks'] - /** - * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can - * share the same `config` as long as those webhooks do not have any `events` that overlap. - */ - post: operations['repos/create-webhook'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}': { - /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ - get: operations['repos/get-webhook'] - delete: operations['repos/delete-webhook'] - /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ - patch: operations['repos/update-webhook'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/config': { - /** - * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." - * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. - */ - get: operations['repos/get-webhook-config-for-repo'] - /** - * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." - * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. - */ - patch: operations['repos/update-webhook-config-for-repo'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries': { - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - get: operations['repos/list-webhook-deliveries'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}': { - /** Returns a delivery for a webhook configured in a repository. */ - get: operations['repos/get-webhook-delivery'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts': { - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - post: operations['repos/redeliver-webhook-delivery'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - post: operations['repos/ping-webhook'] - } - '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - post: operations['repos/test-push-webhook'] - } - '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - delete: operations['migrations/cancel-import'] - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - patch: operations['migrations/update-import'] - } - '/repos/{owner}/{repo}/import/authors': { - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations['migrations/get-commit-authors'] - } - '/repos/{owner}/{repo}/import/authors/{author_id}': { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations['migrations/map-commit-author'] - } - '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - get: operations['migrations/get-large-files'] - } - '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - patch: operations['migrations/set-lfs-preference'] - } - '/repos/{owner}/{repo}/installation': { - /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-repo-installation'] - } - '/repos/{owner}/{repo}/interaction-limits': { - /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-repo'] - /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - put: operations['interactions/set-restrictions-for-repo'] - /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - delete: operations['interactions/remove-restrictions-for-repo'] - } - '/repos/{owner}/{repo}/invitations': { - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - get: operations['repos/list-invitations'] - } - '/repos/{owner}/{repo}/invitations/{invitation_id}': { - delete: operations['repos/delete-invitation'] - patch: operations['repos/update-invitation'] - } - '/repos/{owner}/{repo}/issues': { - /** - * List issues in a repository. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations['issues/list-for-repo'] - /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. - * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['issues/create'] - } - '/repos/{owner}/{repo}/issues/{issue_number}': { - /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations['issues/get'] - /** Issue owners and users with push access can edit an issue. */ - patch: operations['issues/update'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/assignees': { - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - post: operations['issues/add-assignees'] - /** Removes one or more assignees from an issue. */ - delete: operations['issues/remove-assignees'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/comments': { - /** Issue Comments are ordered by ascending ID. */ - get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - post: operations['issues/create-comment'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/events': { - get: operations['issues/list-events'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/labels': { - get: operations['issues/list-labels-on-issue'] - /** Removes any previous labels and sets the new labels for an issue. */ - put: operations['issues/set-labels'] - post: operations['issues/add-labels'] - delete: operations['issues/remove-all-labels'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}': { - /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ - delete: operations['issues/remove-label'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/lock': { - /** - * Users with push access can lock an issue or pull request's conversation. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations['issues/lock'] - /** Users with push access can unlock an issue's conversation. */ - delete: operations['issues/unlock'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/reactions': { - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - post: operations['reactions/create-for-issue'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. - * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). - */ - delete: operations['reactions/delete-for-issue'] - } - '/repos/{owner}/{repo}/issues/{issue_number}/timeline': { - get: operations['issues/list-events-for-timeline'] - } - '/repos/{owner}/{repo}/issues/comments': { - /** By default, Issue Comments are ordered by ascending ID. */ - get: operations['issues/list-comments-for-repo'] - } - '/repos/{owner}/{repo}/issues/comments/{comment_id}': { - get: operations['issues/get-comment'] - delete: operations['issues/delete-comment'] - patch: operations['issues/update-comment'] - } - '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions': { - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - post: operations['reactions/create-for-issue-comment'] - } - '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). - */ - delete: operations['reactions/delete-for-issue-comment'] - } - '/repos/{owner}/{repo}/issues/events': { - get: operations['issues/list-events-for-repo'] - } - '/repos/{owner}/{repo}/issues/events/{event_id}': { - get: operations['issues/get-event'] - } - '/repos/{owner}/{repo}/keys': { - get: operations['repos/list-deploy-keys'] - /** You can create a read-only deploy key. */ - post: operations['repos/create-deploy-key'] - } - '/repos/{owner}/{repo}/keys/{key_id}': { - get: operations['repos/get-deploy-key'] - /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ - delete: operations['repos/delete-deploy-key'] - } - '/repos/{owner}/{repo}/labels': { - get: operations['issues/list-labels-for-repo'] - post: operations['issues/create-label'] - } - '/repos/{owner}/{repo}/labels/{name}': { - get: operations['issues/get-label'] - delete: operations['issues/delete-label'] - patch: operations['issues/update-label'] - } - '/repos/{owner}/{repo}/languages': { - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - get: operations['repos/list-languages'] - } - '/repos/{owner}/{repo}/lfs': { - put: operations['repos/enable-lfs-for-repo'] - delete: operations['repos/disable-lfs-for-repo'] - } - '/repos/{owner}/{repo}/license': { - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - get: operations['licenses/get-for-repo'] - } - '/repos/{owner}/{repo}/merge-upstream': { - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - post: operations['repos/merge-upstream'] - } - '/repos/{owner}/{repo}/merges': { - post: operations['repos/merge'] - } - '/repos/{owner}/{repo}/milestones': { - get: operations['issues/list-milestones'] - post: operations['issues/create-milestone'] - } - '/repos/{owner}/{repo}/milestones/{milestone_number}': { - get: operations['issues/get-milestone'] - delete: operations['issues/delete-milestone'] - patch: operations['issues/update-milestone'] - } - '/repos/{owner}/{repo}/milestones/{milestone_number}/labels': { - get: operations['issues/list-labels-for-milestone'] - } - '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ - get: operations['activity/list-repo-notifications-for-authenticated-user'] - /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - put: operations['activity/mark-repo-notifications-as-read'] - } - '/repos/{owner}/{repo}/pages': { - get: operations['repos/get-pages'] - /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ - put: operations['repos/update-information-about-pages-site'] - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - post: operations['repos/create-pages-site'] - delete: operations['repos/delete-pages-site'] - } - '/repos/{owner}/{repo}/pages/builds': { - get: operations['repos/list-pages-builds'] - /** - * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. - * - * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. - */ - post: operations['repos/request-pages-build'] - } - '/repos/{owner}/{repo}/pages/builds/{build_id}': { - get: operations['repos/get-pages-build'] - } - '/repos/{owner}/{repo}/pages/builds/latest': { - get: operations['repos/get-latest-pages-build'] - } - '/repos/{owner}/{repo}/pages/health': { - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - get: operations['repos/get-pages-health-check'] - } - '/repos/{owner}/{repo}/projects': { - /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - get: operations['projects/list-for-repo'] - /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - post: operations['projects/create-for-repo'] - } - '/repos/{owner}/{repo}/pulls': { - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - get: operations['pulls/list'] - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - post: operations['pulls/create'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}': { - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - get: operations['pulls/get'] - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - patch: operations['pulls/update'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-pr-for-authenticated-user'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - get: operations['pulls/list-review-comments'] - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['pulls/create-review-comment'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies': { - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['pulls/create-reply-for-review-comment'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - get: operations['pulls/list-commits'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/files': { - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - get: operations['pulls/list-files'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { - get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - put: operations['pulls/merge'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { - get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - post: operations['pulls/request-reviewers'] - delete: operations['pulls/remove-requested-reviewers'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/reviews': { - /** The list of reviews returns in chronological order. */ - get: operations['pulls/list-reviews'] - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - post: operations['pulls/create-review'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}': { - get: operations['pulls/get-review'] - /** Update the review summary comment with new text. */ - put: operations['pulls/update-review'] - delete: operations['pulls/delete-pending-review'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments': { - /** List comments for a specific pull request review. */ - get: operations['pulls/list-comments-for-review'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals': { - /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ - put: operations['pulls/dismiss-review'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events': { - post: operations['pulls/submit-review'] - } - '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { - /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - put: operations['pulls/update-branch'] - } - '/repos/{owner}/{repo}/pulls/comments': { - /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ - get: operations['pulls/list-review-comments-for-repo'] - } - '/repos/{owner}/{repo}/pulls/comments/{comment_id}': { - /** Provides details for a review comment. */ - get: operations['pulls/get-review-comment'] - /** Deletes a review comment. */ - delete: operations['pulls/delete-review-comment'] - /** Enables you to edit a review comment. */ - patch: operations['pulls/update-review-comment'] - } - '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions': { - /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ - get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - post: operations['reactions/create-for-pull-request-review-comment'] - } - '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). - */ - delete: operations['reactions/delete-for-pull-request-comment'] - } - '/repos/{owner}/{repo}/readme': { - /** - * Gets the preferred README for a repository. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - get: operations['repos/get-readme'] - } - '/repos/{owner}/{repo}/readme/{dir}': { - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - get: operations['repos/get-readme-in-directory'] - } - '/repos/{owner}/{repo}/releases': { - /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). - * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. - */ - get: operations['repos/list-releases'] - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['repos/create-release'] - } - '/repos/{owner}/{repo}/releases/{release_id}': { - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - get: operations['repos/get-release'] - /** Users with push access to the repository can delete a release. */ - delete: operations['repos/delete-release'] - /** Users with push access to the repository can edit a release. */ - patch: operations['repos/update-release'] - } - '/repos/{owner}/{repo}/releases/{release_id}/assets': { - get: operations['repos/list-release-assets'] - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - post: operations['repos/upload-release-asset'] - } - '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - post: operations['reactions/create-for-release'] - } - '/repos/{owner}/{repo}/releases/assets/{asset_id}': { - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ - get: operations['repos/get-release-asset'] - delete: operations['repos/delete-release-asset'] - /** Users with push access to the repository can edit a release asset. */ - patch: operations['repos/update-release-asset'] - } - '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - post: operations['repos/generate-release-notes'] - } - '/repos/{owner}/{repo}/releases/latest': { - /** - * View the latest published full release for the repository. - * - * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. - */ - get: operations['repos/get-latest-release'] - } - '/repos/{owner}/{repo}/releases/tags/{tag}': { - /** Get a published release with the specified tag. */ - get: operations['repos/get-release-by-tag'] - } - '/repos/{owner}/{repo}/secret-scanning/alerts': { - /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations['secret-scanning/list-alerts-for-repo'] - } - '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}': { - /** - * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations['secret-scanning/get-alert'] - /** - * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. - */ - patch: operations['secret-scanning/update-alert'] - } - '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - get: operations['secret-scanning/list-locations-for-alert'] - } - '/repos/{owner}/{repo}/stargazers': { - /** - * Lists the people that have starred the repository. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations['activity/list-stargazers-for-repo'] - } - '/repos/{owner}/{repo}/stats/code_frequency': { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - get: operations['repos/get-code-frequency-stats'] - } - '/repos/{owner}/{repo}/stats/commit_activity': { - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - get: operations['repos/get-commit-activity-stats'] - } - '/repos/{owner}/{repo}/stats/contributors': { - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - get: operations['repos/get-contributors-stats'] - } - '/repos/{owner}/{repo}/stats/participation': { - /** - * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. - * - * The array order is oldest week (index 0) to most recent week. - */ - get: operations['repos/get-participation-stats'] - } - '/repos/{owner}/{repo}/stats/punch_card': { - /** - * Each array contains the day number, hour number, and number of commits: - * - * * `0-6`: Sunday - Saturday - * * `0-23`: Hour of day - * * Number of commits - * - * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. - */ - get: operations['repos/get-punch-card-stats'] - } - '/repos/{owner}/{repo}/statuses/{sha}': { - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - post: operations['repos/create-commit-status'] - } - '/repos/{owner}/{repo}/subscribers': { - /** Lists the people watching the specified repository. */ - get: operations['activity/list-watchers-for-repo'] - } - '/repos/{owner}/{repo}/subscription': { - get: operations['activity/get-repo-subscription'] - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - put: operations['activity/set-repo-subscription'] - /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ - delete: operations['activity/delete-repo-subscription'] - } - '/repos/{owner}/{repo}/tags': { - get: operations['repos/list-tags'] - } - '/repos/{owner}/{repo}/tarball/{ref}': { - /** - * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - get: operations['repos/download-tarball-archive'] - } - '/repos/{owner}/{repo}/teams': { - get: operations['repos/list-teams'] - } - '/repos/{owner}/{repo}/topics': { - get: operations['repos/get-all-topics'] - put: operations['repos/replace-all-topics'] - } - '/repos/{owner}/{repo}/traffic/clones': { - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-clones'] - } - '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations['repos/get-top-paths'] - } - '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - get: operations['repos/get-top-referrers'] - } - '/repos/{owner}/{repo}/traffic/views': { - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-views'] - } - '/repos/{owner}/{repo}/transfer': { - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - post: operations['repos/transfer'] - } - '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - delete: operations['repos/disable-vulnerability-alerts'] - } - '/repos/{owner}/{repo}/zipball/{ref}': { - /** - * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - get: operations['repos/download-zipball-archive'] - } - '/repos/{template_owner}/{template_repo}/generate': { - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - post: operations['repos/create-using-template'] - } - '/repositories': { - /** - * Lists all public repositories in the order that they were created. - * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. - */ - get: operations['repos/list-public'] - } - '/repositories/{repository_id}/environments/{environment_name}/secrets': { - /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/list-environment-secrets'] - } - '/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}': { - /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/get-environment-secret'] - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['actions/create-or-update-environment-secret'] - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - delete: operations['actions/delete-environment-secret'] - } - '/repositories/{repository_id}/environments/{environment_name}/secrets/public-key': { - /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - get: operations['actions/get-environment-public-key'] - } - '/scim/v2/enterprises/{enterprise}/Groups': { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations['enterprise-admin/list-provisioned-groups-enterprise'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. - */ - post: operations['enterprise-admin/provision-and-invite-enterprise-group'] - } - '/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}': { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations['enterprise-admin/get-provisioning-information-for-enterprise-group'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. - */ - put: operations['enterprise-admin/set-information-for-provisioned-enterprise-group'] - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - delete: operations['enterprise-admin/delete-scim-group-from-enterprise'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - */ - patch: operations['enterprise-admin/update-attribute-for-enterprise-group'] - } - '/scim/v2/enterprises/{enterprise}/Users': { - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. - * - * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. - */ - get: operations['enterprise-admin/list-provisioned-identities-enterprise'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. - * - * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. - */ - post: operations['enterprise-admin/provision-and-invite-enterprise-user'] - } - '/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}': { - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - get: operations['enterprise-admin/get-provisioning-information-for-enterprise-user'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - put: operations['enterprise-admin/set-information-for-provisioned-enterprise-user'] - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - delete: operations['enterprise-admin/delete-user-from-enterprise'] - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - patch: operations['enterprise-admin/update-attribute-for-enterprise-user'] - } - '/scim/v2/organizations/{org}/Users': { - /** - * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub organization. - * - * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. - */ - get: operations['scim/list-provisioned-identities'] - /** Provision organization membership for a user, and send an activation email to the email address. */ - post: operations['scim/provision-and-invite-user'] - } - '/scim/v2/organizations/{org}/Users/{scim_user_id}': { - get: operations['scim/get-provisioning-information-for-user'] - /** - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - put: operations['scim/set-information-for-provisioned-user'] - delete: operations['scim/delete-user-from-org'] - /** - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - patch: operations['scim/update-attribute-for-user'] - } - '/search/code': { - /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. - */ - get: operations['search/code'] - } - '/search/commits': { - /** - * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match - * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: - * - * `q=repo:octocat/Spoon-Knife+css` - */ - get: operations['search/commits'] - } - '/search/issues': { - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted - * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` - * - * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. - * - * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." - */ - get: operations['search/issues-and-pull-requests'] - } - '/search/labels': { - /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: - * - * `q=bug+defect+enhancement&repository_id=64778136` - * - * The labels that best match the query appear first in the search results. - */ - get: operations['search/labels'] - } - '/search/repositories': { - /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: - * - * `q=tetris+language:assembly&sort=stars&order=desc` - * - * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. - */ - get: operations['search/repos'] - } - '/search/topics': { - /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` - * - * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. - */ - get: operations['search/topics'] - } - '/search/users': { - /** - * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you're looking for a list of popular users, you might try this query: - * - * `q=tom+repos:%3E42+followers:%3E1000` - * - * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. - */ - get: operations['search/users'] - } - '/teams/{team_id}': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ - get: operations['teams/get-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. - * - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - */ - delete: operations['teams/delete-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. - * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. - */ - patch: operations['teams/update-legacy'] - } - '/teams/{team_id}/discussions': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. - * - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['teams/list-discussions-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. - * - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['teams/create-discussion-legacy'] - } - '/teams/{team_id}/discussions/{discussion_number}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. - * - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['teams/get-discussion-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. - * - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations['teams/delete-discussion-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. - * - * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - patch: operations['teams/update-discussion-legacy'] - } - '/teams/{team_id}/discussions/{discussion_number}/comments': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. - * - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['teams/list-discussion-comments-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. - * - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['teams/create-discussion-comment-legacy'] - } - '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['teams/get-discussion-comment-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. - * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - delete: operations['teams/delete-discussion-comment-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. - * - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - patch: operations['teams/update-discussion-comment-legacy'] - } - '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['reactions/list-for-team-discussion-comment-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - */ - post: operations['reactions/create-for-team-discussion-comment-legacy'] - } - '/teams/{team_id}/discussions/{discussion_number}/reactions': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. - * - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - get: operations['reactions/list-for-team-discussion-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. - * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - */ - post: operations['reactions/create-for-team-discussion-legacy'] - } - '/teams/{team_id}/invitations': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - get: operations['teams/list-pending-invitations-legacy'] - } - '/teams/{team_id}/members': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. - * - * Team members will include the members of child teams. - */ - get: operations['teams/list-members-legacy'] - } - '/teams/{team_id}/members/{username}': { - /** - * The "Get team member" endpoint (described below) is deprecated. - * - * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - get: operations['teams/get-member-legacy'] - /** - * The "Add team member" endpoint (described below) is deprecated. - * - * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations['teams/add-member-legacy'] - /** - * The "Remove team member" endpoint (described below) is deprecated. - * - * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - delete: operations['teams/remove-member-legacy'] - } - '/teams/{team_id}/memberships/{username}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. - * - * Team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. - * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - get: operations['teams/get-membership-for-user-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. - */ - put: operations['teams/add-or-update-membership-for-user-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - delete: operations['teams/remove-membership-for-user-legacy'] - } - '/teams/{team_id}/projects': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. - * - * Lists the organization projects for a team. - */ - get: operations['teams/list-projects-legacy'] - } - '/teams/{team_id}/projects/{project_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. - * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - */ - get: operations['teams/check-permissions-for-project-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. - * - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - */ - put: operations['teams/add-or-update-project-permissions-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. - * - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. - */ - delete: operations['teams/remove-project-legacy'] - } - '/teams/{team_id}/repos': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - get: operations['teams/list-repos-legacy'] - } - '/teams/{team_id}/repos/{owner}/{repo}': { - /** - * **Note**: Repositories inherited through a parent team will also be checked. - * - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. - * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations['teams/check-permissions-for-repo-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - put: operations['teams/add-or-update-repo-permissions-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. - * - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. - */ - delete: operations['teams/remove-repo-legacy'] - } - '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } - '/teams/{team_id}/teams': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - get: operations['teams/list-child-legacy'] - } - '/user': { - /** - * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. - * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. - */ - get: operations['users/get-authenticated'] - /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ - patch: operations['users/update-authenticated'] - } - '/user/blocks': { - /** List the users you've blocked on your personal account. */ - get: operations['users/list-blocked-by-authenticated-user'] - } - '/user/blocks/{username}': { - get: operations['users/check-blocked'] - put: operations['users/block'] - delete: operations['users/unblock'] - } - '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - patch: operations['codespaces/update-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/export-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-export-details-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/start-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/stop-for-authenticated-user'] - } - '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-secrets-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - get: operations['codespaces/get-public-key-for-authenticated-user'] - } - '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } - '/user/emails': { - /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ - get: operations['users/list-emails-for-authenticated-user'] - /** This endpoint is accessible with the `user` scope. */ - post: operations['users/add-email-for-authenticated-user'] - /** This endpoint is accessible with the `user` scope. */ - delete: operations['users/delete-email-for-authenticated-user'] - } - '/user/followers': { - /** Lists the people following the authenticated user. */ - get: operations['users/list-followers-for-authenticated-user'] - } - '/user/following': { - /** Lists the people who the authenticated user follows. */ - get: operations['users/list-followed-by-authenticated-user'] - } - '/user/following/{username}': { - get: operations['users/check-person-is-followed-by-authenticated'] - /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - put: operations['users/follow'] - /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ - delete: operations['users/unfollow'] - } - '/user/gpg_keys': { - /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - post: operations['users/create-gpg-key-for-authenticated-user'] - } - '/user/gpg_keys/{gpg_key_id}': { - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - delete: operations['users/delete-gpg-key-for-authenticated-user'] - } - '/user/installations': { - /** - * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You can find the permissions for the installation under the `permissions` key. - */ - get: operations['apps/list-installations-for-authenticated-user'] - } - '/user/installations/{installation_id}/repositories': { - /** - * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The access the user has to each repository is included in the hash under the `permissions` key. - */ - get: operations['apps/list-installation-repos-for-authenticated-user'] - } - '/user/installations/{installation_id}/repositories/{repository_id}': { - /** - * Add a single repository to an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - put: operations['apps/add-repo-to-installation-for-authenticated-user'] - /** - * Remove a single repository from an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] - } - '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - get: operations['interactions/get-restrictions-for-authenticated-user'] - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } - '/user/issues': { - /** - * List issues across owned and member repositories assigned to the authenticated user. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - get: operations['issues/list-for-authenticated-user'] - } - '/user/keys': { - /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - post: operations['users/create-public-ssh-key-for-authenticated-user'] - } - '/user/keys/{key_id}': { - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - delete: operations['users/delete-public-ssh-key-for-authenticated-user'] - } - '/user/marketplace_purchases': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user'] - } - '/user/marketplace_purchases/stubbed': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } - '/user/memberships/orgs': { - get: operations['orgs/list-memberships-for-authenticated-user'] - } - '/user/memberships/orgs/{org}': { - get: operations['orgs/get-membership-for-authenticated-user'] - patch: operations['orgs/update-membership-for-authenticated-user'] - } - '/user/migrations': { - /** Lists all migrations a user has started. */ - get: operations['migrations/list-for-authenticated-user'] - /** Initiates the generation of a user migration archive. */ - post: operations['migrations/start-for-authenticated-user'] - } - '/user/migrations/{migration_id}': { - /** - * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: - * - * * `pending` - the migration hasn't started yet. - * * `exporting` - the migration is in progress. - * * `exported` - the migration finished successfully. - * * `failed` - the migration failed. - * - * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). - */ - get: operations['migrations/get-status-for-authenticated-user'] - } - '/user/migrations/{migration_id}/archive': { - /** - * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: - * - * * attachments - * * bases - * * commit\_comments - * * issue\_comments - * * issue\_events - * * issues - * * milestones - * * organizations - * * projects - * * protected\_branches - * * pull\_request\_reviews - * * pull\_requests - * * releases - * * repositories - * * review\_comments - * * schema - * * users - * - * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. - */ - get: operations['migrations/get-archive-for-authenticated-user'] - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - delete: operations['migrations/delete-archive-for-authenticated-user'] - } - '/user/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - delete: operations['migrations/unlock-repo-for-authenticated-user'] - } - '/user/migrations/{migration_id}/repositories': { - /** Lists all the repositories for this user migration. */ - get: operations['migrations/list-repos-for-authenticated-user'] - } - '/user/orgs': { - /** - * List organizations for the authenticated user. - * - * **OAuth scope requirements** - * - * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. - */ - get: operations['orgs/list-for-authenticated-user'] - } - '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}': { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-version-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-version-for-authenticated-user'] - } - '/user/projects': { - post: operations['projects/create-for-authenticated-user'] - } - '/user/public_emails': { - /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ - get: operations['users/list-public-emails-for-authenticated-user'] - } - '/user/repos': { - /** - * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - */ - get: operations['repos/list-for-authenticated-user'] - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository. - */ - post: operations['repos/create-for-authenticated-user'] - } - '/user/repository_invitations': { - /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ - get: operations['repos/list-invitations-for-authenticated-user'] - } - '/user/repository_invitations/{invitation_id}': { - delete: operations['repos/decline-invitation-for-authenticated-user'] - patch: operations['repos/accept-invitation-for-authenticated-user'] - } - '/user/starred': { - /** - * Lists repositories the authenticated user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations['activity/list-repos-starred-by-authenticated-user'] - } - '/user/starred/{owner}/{repo}': { - get: operations['activity/check-repo-is-starred-by-authenticated-user'] - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - put: operations['activity/star-repo-for-authenticated-user'] - delete: operations['activity/unstar-repo-for-authenticated-user'] - } - '/user/subscriptions': { - /** Lists repositories the authenticated user is watching. */ - get: operations['activity/list-watched-repos-for-authenticated-user'] - } - '/user/teams': { - /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ - get: operations['teams/list-for-authenticated-user'] - } - '/users': { - /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. - * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. - */ - get: operations['users/list'] - } - '/users/{username}': { - /** - * Provides publicly available information about someone with a GitHub account. - * - * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" - * - * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). - * - * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". - */ - get: operations['users/get-by-username'] - } - '/users/{username}/events': { - /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ - get: operations['activity/list-events-for-authenticated-user'] - } - '/users/{username}/events/orgs/{org}': { - /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ - get: operations['activity/list-org-events-for-authenticated-user'] - } - '/users/{username}/events/public': { - get: operations['activity/list-public-events-for-user'] - } - '/users/{username}/followers': { - /** Lists the people following the specified user. */ - get: operations['users/list-followers-for-user'] - } - '/users/{username}/following': { - /** Lists the people who the specified user follows. */ - get: operations['users/list-following-for-user'] - } - '/users/{username}/following/{target_user}': { - get: operations['users/check-following-for-user'] - } - '/users/{username}/gists': { - /** Lists public gists for the specified user: */ - get: operations['gists/list-for-user'] - } - '/users/{username}/gpg_keys': { - /** Lists the GPG keys for a user. This information is accessible by anyone. */ - get: operations['users/list-gpg-keys-for-user'] - } - '/users/{username}/hovercard': { - /** - * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. - * - * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: - * - * ```shell - * curl -u username:token - * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 - * ``` - */ - get: operations['users/get-context-for-user'] - } - '/users/{username}/installation': { - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - get: operations['apps/get-user-installation'] - } - '/users/{username}/keys': { - /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ - get: operations['users/list-public-keys-for-user'] - } - '/users/{username}/orgs': { - /** - * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. - */ - get: operations['orgs/list-for-user'] - } - '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-user'] - } - '/users/{username}/projects': { - get: operations['projects/list-for-user'] - } - '/users/{username}/received_events': { - /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ - get: operations['activity/list-received-events-for-user'] - } - '/users/{username}/received_events/public': { - get: operations['activity/list-received-public-events-for-user'] - } - '/users/{username}/repos': { - /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ - get: operations['repos/list-for-user'] - } - '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-actions-billing-user'] - } - '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-packages-billing-user'] - } - '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-shared-storage-billing-user'] - } - '/users/{username}/starred': { - /** - * Lists repositories a user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - get: operations['activity/list-repos-starred-by-user'] - } - '/users/{username}/subscriptions': { - /** Lists repositories a user is watching. */ - get: operations['activity/list-repos-watched-by-user'] - } - '/zen': { - /** Get a random sentence from the Zen of GitHub */ - get: operations['meta/get-zen'] - } -} - -export interface components { - schemas: { - 'actions-billing-usage': { - /** @description The amount of free GitHub Actions minutes available. */ - included_minutes: number - minutes_used_breakdown: { - /** @description Total minutes used on macOS runner machines. */ - MACOS?: number - /** @description Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number - /** @description Total minutes used on Windows runner machines. */ - WINDOWS?: number - } - /** @description The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number - } - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - 'actions-can-approve-pull-request-reviews': boolean - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions is enabled on the repository. */ - 'actions-enabled': boolean - 'actions-enterprise-permissions': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled_organizations: components['schemas']['enabled-organizations'] - selected_actions_url?: components['schemas']['selected-actions-url'] - /** @description The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. */ - selected_organizations_url?: string - } - 'actions-get-default-workflow-permissions': { - can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - } - 'actions-organization-permissions': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled_repositories: components['schemas']['enabled-repositories'] - selected_actions_url?: components['schemas']['selected-actions-url'] - /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ - selected_repositories_url?: string - } - /** - * ActionsPublicKey - * @description The public key used for setting Actions Secrets. - */ - 'actions-public-key': { - /** @example 2011-01-26T19:01:12Z */ - created_at?: string - /** @example 2 */ - id?: number - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ - title?: string - /** @example https://api.github.com/user/keys/2 */ - url?: string - } - 'actions-repository-permissions': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled: components['schemas']['actions-enabled'] - selected_actions_url?: components['schemas']['selected-actions-url'] - } - /** - * Actions Secret - * @description Set secrets for GitHub Actions. - */ - 'actions-secret': { - /** Format: date-time */ - created_at: string - /** - * @description The name of the secret. - * @example SECRET_TOKEN - */ - name: string - /** Format: date-time */ - updated_at: string - } - 'actions-set-default-workflow-permissions': { - can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - } - /** - * Actor - * @description Actor - */ - actor: { - /** Format: uri */ - avatar_url: string - display_login?: string - gravatar_id: string | null - id: number - login: string - /** Format: uri */ - url: string - } - /** - * Added to Project Issue Event - * @description Added to Project Issue Event - */ - 'added-to-project-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - project_card?: { - column_name: string - id: number - previous_column_name?: string - project_id: number - /** Format: uri */ - project_url: string - /** Format: uri */ - url: string - } - url: string - } - 'advanced-security-active-committers': { - repositories: components['schemas']['advanced-security-active-committers-repository'][] - /** @example 25 */ - total_advanced_security_committers?: number - } - 'advanced-security-active-committers-repository': { - /** @example 25 */ - advanced_security_committers: number - advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] - /** @example octocat/Hello-World */ - name: string - } - 'advanced-security-active-committers-user': { - /** @example 2021-11-03 */ - last_pushed_date: string - user_login: string - } - /** - * Format: date-time - * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - 'alert-created-at': string - /** - * Format: uri - * @description The GitHub URL of the alert resource. - */ - 'alert-html-url': string - /** - * Format: uri - * @description The REST API URL for fetching the list of instances for an alert. - */ - 'alert-instances-url': string - /** @description The security alert number. */ - 'alert-number': number - /** - * Format: date-time - * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - 'alert-updated-at': string - /** - * Format: uri - * @description The REST API URL of the alert resource. - */ - 'alert-url': string - /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. - * @enum {string} - */ - 'allowed-actions': 'all' | 'local_only' | 'selected' - /** - * Api Overview - * @description Api Overview - */ - 'api-overview': { - /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] - */ - actions?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - api?: string[] - /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] - */ - dependabot?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - git?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - hooks?: string[] - /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] - */ - importer?: string[] - /** - * @example [ - * "13.65.0.0/16", - * "157.55.204.33/32", - * "2a01:111:f403:f90c::/62" - * ] - */ - packages?: string[] - /** - * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" - * ] - */ - pages?: string[] - ssh_key_fingerprints?: { - SHA256_DSA?: string - SHA256_ECDSA?: string - SHA256_ED25519?: string - SHA256_RSA?: string - } - /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] - */ - ssh_keys?: string[] - /** @example true */ - verifiable_password_authentication: boolean - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - web?: string[] - } - /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } - */ - 'app-permissions': { - /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} - */ - actions?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} - */ - administration?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} - */ - checks?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} - */ - contents?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} - */ - deployments?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} - */ - environments?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} - */ - issues?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} - */ - members?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} - */ - metadata?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_administration?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_hooks?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_packages?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} - */ - organization_plan?: 'read' - /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} - */ - organization_projects?: 'read' | 'write' | 'admin' - /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_secrets?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_self_hosted_runners?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_user_blocking?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} - */ - packages?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} - */ - pages?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. - * @enum {string} - */ - pull_requests?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} - */ - repository_hooks?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} - */ - repository_projects?: 'read' | 'write' | 'admin' - /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} - */ - secret_scanning_alerts?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} - */ - secrets?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} - */ - security_events?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} - */ - single_file?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} - */ - statuses?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} - */ - team_discussions?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} - */ - vulnerability_alerts?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} - */ - workflows?: 'write' - } - /** - * Application Grant - * @description The authorization associated with an OAuth Access. - */ - 'application-grant': { - app: { - client_id: string - name: string - /** Format: uri */ - url: string - } - /** - * Format: date-time - * @example 2011-09-06T17:26:27Z - */ - created_at: string - /** @example 1 */ - id: number - /** - * @example [ - * "public_repo" - * ] - */ - scopes: string[] - /** - * Format: date-time - * @example 2011-09-06T20:39:23Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/applications/grants/1 - */ - url: string - user?: components['schemas']['nullable-simple-user'] - } - /** - * Artifact - * @description An artifact - */ - artifact: { - /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ - archive_download_url: string - /** Format: date-time */ - created_at: string | null - /** @description Whether or not the artifact has expired. */ - expired: boolean - /** Format: date-time */ - expires_at: string | null - /** @example 5 */ - id: number - /** - * @description The name of the artifact. - * @example AdventureWorks.Framework - */ - name: string - /** @example MDEwOkNoZWNrU3VpdGU1 */ - node_id: string - /** - * @description The size in bytes of the artifact. - * @example 12345 - */ - size_in_bytes: number - /** Format: date-time */ - updated_at: string | null - /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ - url: string - } - /** - * Assigned Issue Event - * @description Assigned Issue Event - */ - 'assigned-issue-event': { - actor: components['schemas']['simple-user'] - assignee: components['schemas']['simple-user'] - assigner: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['integration'] - url: string - } - 'audit-log-event': { - /** @description A unique identifier for an audit event. */ - _document_id?: string - /** @description The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ - '@timestamp'?: number - /** @description The name of the action that was performed, for example `user.login` or `repo.create`. */ - action?: string - active?: boolean - active_was?: boolean - /** @description The actor who performed the action. */ - actor?: string - /** @description The id of the actor who performed the action. */ - actor_id?: number - actor_location?: { - country_name?: string - } - /** @description The username of the account being blocked. */ - blocked_user?: string - business?: string - config?: { [key: string]: unknown }[] - config_was?: { [key: string]: unknown }[] - content_type?: string - /** @description The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ - created_at?: number - data?: { [key: string]: unknown } - deploy_key_fingerprint?: string - emoji?: string - events?: { [key: string]: unknown }[] - events_were?: { [key: string]: unknown }[] - explanation?: string - fingerprint?: string - hook_id?: number - limited_availability?: boolean - message?: string - name?: string - old_user?: string - openssh_public_key?: string - org?: string - org_id?: number - previous_visibility?: string - read_only?: boolean - /** @description The name of the repository. */ - repo?: string - /** @description The name of the repository. */ - repository?: string - repository_public?: boolean - target_login?: string - team?: string - /** @description The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ - transport_protocol?: number - /** @description A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ - transport_protocol_name?: string - /** @description The user that was affected by the action performed (if available). */ - user?: string - /** @description The repository visibility, for example `public` or `private`. */ - visibility?: string - } - /** - * Authentication Token - * @description Authentication Token - */ - 'authentication-token': { - /** - * Format: date-time - * @description The time this token expires - * @example 2016-07-11T22:14:10Z - */ - expires_at: string - /** - * @example { - * "issues": "read", - * "deployments": "write" - * } - */ - permissions?: { [key: string]: unknown } - /** @description The repositories this token has access to */ - repositories?: components['schemas']['repository'][] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection?: 'all' | 'selected' - /** @example config.yaml */ - single_file?: string | null - /** - * @description The token used for authentication - * @example v1.1f699f1069f60xxx - */ - token: string - } - /** - * author_association - * @description How the author is associated with the repository. - * @example OWNER - * @enum {string} - */ - author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - authorization: { - app: { - client_id: string - name: string - /** Format: uri */ - url: string - } - /** Format: date-time */ - created_at: string - /** Format: date-time */ - expires_at: string | null - fingerprint: string | null - hashed_token: string | null - id: number - installation?: components['schemas']['nullable-scoped-installation'] - note: string | null - /** Format: uri */ - note_url: string | null - /** @description A list of scopes that this authorization is in. */ - scopes: string[] | null - token: string - token_last_eight: string | null - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - user?: components['schemas']['nullable-simple-user'] - } - /** - * Auto merge - * @description The status of auto merging a pull request. - */ - auto_merge: { - /** @description Commit message for the merge commit. */ - commit_message: string - /** @description Title for the merge commit message. */ - commit_title: string - enabled_by: components['schemas']['simple-user'] - /** - * @description The merge method to use. - * @enum {string} - */ - merge_method: 'merge' | 'squash' | 'rebase' - } | null - /** - * Autolink reference - * @description An autolink reference. - */ - autolink: { - /** @example 3 */ - id: number - /** - * @description The prefix of a key that is linkified. - * @example TICKET- - */ - key_prefix: string - /** - * @description A template for the target URL that is generated if a key was found. - * @example https://example.com/TICKET?query= - */ - url_template: string - } - /** - * Base Gist - * @description Base Gist - */ - 'base-gist': { - comments: number - /** Format: uri */ - comments_url: string - /** Format: uri */ - commits_url: string - /** Format: date-time */ - created_at: string - description: string | null - files: { - [key: string]: { - filename?: string - language?: string - raw_url?: string - size?: number - type?: string - } - } - forks?: unknown[] - /** Format: uri */ - forks_url: string - /** Format: uri */ - git_pull_url: string - /** Format: uri */ - git_push_url: string - history?: unknown[] - /** Format: uri */ - html_url: string - id: string - node_id: string - owner?: components['schemas']['simple-user'] - public: boolean - truncated?: boolean - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Basic Error - * @description Basic Error - */ - 'basic-error': { - documentation_url?: string - message?: string - status?: string - url?: string - } - /** - * Blob - * @description Blob - */ - blob: { - content: string - encoding: string - highlighted_content?: string - node_id: string - sha: string - size: number | null - /** Format: uri */ - url: string - } - /** - * Branch Protection - * @description Branch Protection - */ - 'branch-protection': { - allow_deletions?: { - enabled?: boolean - } - allow_force_pushes?: { - enabled?: boolean - } - enabled?: boolean - enforce_admins?: components['schemas']['protected-branch-admin-enforced'] - /** @example "branch/with/protection" */ - name?: string - /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ - protection_url?: string - required_conversation_resolution?: { - enabled?: boolean - } - required_linear_history?: { - enabled?: boolean - } - required_pull_request_reviews?: components['schemas']['protected-branch-pull-request-review'] - required_signatures?: { - /** @example true */ - enabled: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures - */ - url: string - } - required_status_checks?: components['schemas']['protected-branch-required-status-check'] - restrictions?: components['schemas']['branch-restriction-policy'] - url?: string - } - /** - * Branch Restriction Policy - * @description Branch Restriction Policy - */ - 'branch-restriction-policy': { - apps: { - created_at?: string - description?: string - events?: string[] - external_url?: string - html_url?: string - id?: number - name?: string - node_id?: string - owner?: { - avatar_url?: string - description?: string - events_url?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ - followers_url?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ - following_url?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ - gists_url?: string - /** @example "" */ - gravatar_id?: string - hooks_url?: string - /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ - html_url?: string - id?: number - issues_url?: string - login?: string - members_url?: string - node_id?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ - organizations_url?: string - public_members_url?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ - received_events_url?: string - repos_url?: string - /** @example false */ - site_admin?: boolean - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ - starred_url?: string - /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ - subscriptions_url?: string - /** @example "Organization" */ - type?: string - url?: string - } - permissions?: { - contents?: string - issues?: string - metadata?: string - single_file?: string - } - slug?: string - updated_at?: string - }[] - /** Format: uri */ - apps_url: string - teams: { - description?: string | null - html_url?: string - id?: number - members_url?: string - name?: string - node_id?: string - parent?: string | null - permission?: string - privacy?: string - repositories_url?: string - slug?: string - url?: string - }[] - /** Format: uri */ - teams_url: string - /** Format: uri */ - url: string - users: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - }[] - /** Format: uri */ - users_url: string - } - /** - * Branch Short - * @description Branch Short - */ - 'branch-short': { - commit: { - sha: string - url: string - } - name: string - protected: boolean - } - /** - * Branch With Protection - * @description Branch With Protection - */ - 'branch-with-protection': { - _links: { - html: string - /** Format: uri */ - self: string - } - commit: components['schemas']['commit'] - name: string - /** @example "mas*" */ - pattern?: string - protected: boolean - protection: components['schemas']['branch-protection'] - /** Format: uri */ - protection_url: string - /** @example 1 */ - required_approving_review_count?: number - } - /** - * Check Annotation - * @description Check Annotation - */ - 'check-annotation': { - /** @example warning */ - annotation_level: string | null - blob_href: string - /** @example 10 */ - end_column: number | null - /** @example 2 */ - end_line: number - /** @example Check your spelling for 'banaas'. */ - message: string | null - /** @example README.md */ - path: string - /** @example Do you mean 'bananas' or 'banana'? */ - raw_details: string | null - /** @example 5 */ - start_column: number | null - /** @example 2 */ - start_line: number - /** @example Spell Checker */ - title: string | null - } - /** - * CheckRun - * @description A check performed on the code of a given code change - */ - 'check-run': { - app: components['schemas']['nullable-integration'] - check_suite: { - id: number - } | null - /** - * Format: date-time - * @example 2018-05-04T01:14:52Z - */ - completed_at: string | null - /** - * @example neutral - * @enum {string|null} - */ - conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null - deployment?: components['schemas']['deployment-simple'] - /** @example https://example.com */ - details_url: string | null - /** @example 42 */ - external_id: string | null - /** - * @description The SHA of the commit that is being checked. - * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d - */ - head_sha: string - /** @example https://github.com/github/hello-world/runs/4 */ - html_url: string | null - /** - * @description The id of the check. - * @example 21 - */ - id: number - /** - * @description The name of the check. - * @example test-coverage - */ - name: string - /** @example MDg6Q2hlY2tSdW40 */ - node_id: string - output: { - annotations_count: number - /** Format: uri */ - annotations_url: string - summary: string | null - text: string | null - title: string | null - } - pull_requests: components['schemas']['pull-request-minimal'][] - /** - * Format: date-time - * @example 2018-05-04T01:14:52Z - */ - started_at: string | null - /** - * @description The phase of the lifecycle that the check is currently in. - * @example queued - * @enum {string} - */ - status: 'queued' | 'in_progress' | 'completed' - /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ - url: string - } - /** - * CheckSuite - * @description A suite of checks performed on the code of a given code change - */ - 'check-suite': { - /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ - after: string | null - app: components['schemas']['nullable-integration'] - /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ - before: string | null - check_runs_url: string - /** - * @example neutral - * @enum {string|null} - */ - conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null - /** Format: date-time */ - created_at: string | null - /** @example master */ - head_branch: string | null - head_commit: components['schemas']['simple-commit'] - /** - * @description The SHA of the head commit that is being checked. - * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d - */ - head_sha: string - /** @example 5 */ - id: number - latest_check_runs_count: number - /** @example MDEwOkNoZWNrU3VpdGU1 */ - node_id: string - pull_requests: components['schemas']['pull-request-minimal'][] | null - repository: components['schemas']['minimal-repository'] - rerequestable?: boolean - runs_rerequestable?: boolean - /** - * @example completed - * @enum {string|null} - */ - status: ('queued' | 'in_progress' | 'completed') | null - /** Format: date-time */ - updated_at: string | null - /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ - url: string | null - } - /** - * Check Suite Preference - * @description Check suite configuration preferences for a repository. - */ - 'check-suite-preference': { - preferences: { - auto_trigger_checks?: { - app_id: number - setting: boolean - }[] - } - repository: components['schemas']['minimal-repository'] - } - /** - * Clone Traffic - * @description Clone Traffic - */ - 'clone-traffic': { - clones: components['schemas']['traffic'][] - /** @example 173 */ - count: number - /** @example 128 */ - uniques: number - } - /** - * Code Frequency Stat - * @description Code Frequency Stat - */ - 'code-frequency-stat': number[] - /** - * Code Of Conduct - * @description Code Of Conduct - */ - 'code-of-conduct': { - /** - * @example # Contributor Covenant Code of Conduct - * - * ## Our Pledge - * - * In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - * - * ## Our Standards - * - * Examples of behavior that contributes to creating a positive environment include: - * - * * Using welcoming and inclusive language - * * Being respectful of differing viewpoints and experiences - * * Gracefully accepting constructive criticism - * * Focusing on what is best for the community - * * Showing empathy towards other community members - * - * Examples of unacceptable behavior by participants include: - * - * * The use of sexualized language or imagery and unwelcome sexual attention or advances - * * Trolling, insulting/derogatory comments, and personal or political attacks - * * Public or private harassment - * * Publishing others' private information, such as a physical or electronic address, without explicit permission - * * Other conduct which could reasonably be considered inappropriate in a professional setting - * - * ## Our Responsibilities - * - * Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response - * to any instances of unacceptable behavior. - * - * Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - * - * ## Scope - * - * This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, - * posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - * - * ## Enforcement - * - * Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - * - * Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - * - * ## Attribution - * - * This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - * - * [homepage]: http://contributor-covenant.org - * [version]: http://contributor-covenant.org/version/1/4/ - */ - body?: string - /** Format: uri */ - html_url: string | null - /** @example contributor_covenant */ - key: string - /** @example Contributor Covenant */ - name: string - /** - * Format: uri - * @example https://api.github.com/codes_of_conduct/contributor_covenant - */ - url: string - } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'code-of-conduct-simple': { - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - } - 'code-scanning-alert': { - created_at: components['schemas']['alert-created-at'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] - dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] - html_url: components['schemas']['alert-html-url'] - instances_url: components['schemas']['alert-instances-url'] - most_recent_instance: components['schemas']['code-scanning-alert-instance'] - number: components['schemas']['alert-number'] - rule: components['schemas']['code-scanning-alert-rule'] - state: components['schemas']['code-scanning-alert-state'] - tool: components['schemas']['code-scanning-analysis-tool'] - updated_at?: components['schemas']['alert-updated-at'] - url: components['schemas']['alert-url'] - } - /** - * @description A classification of the file. For example to identify it as generated. - * @enum {string|null} - */ - 'code-scanning-alert-classification': ('source' | 'generated' | 'test' | 'library') | null - /** - * Format: date-time - * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - 'code-scanning-alert-dismissed-at': string | null - /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. - * @enum {string|null} - */ - 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null - /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ - 'code-scanning-alert-environment': string - /** - * Format: date-time - * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - 'code-scanning-alert-fixed-at': string | null - 'code-scanning-alert-instance': { - analysis_key?: components['schemas']['code-scanning-analysis-analysis-key'] - category?: components['schemas']['code-scanning-analysis-category'] - /** - * @description Classifications that have been applied to the file that triggered the alert. - * For example identifying it as documentation, or a generated file. - */ - classifications?: components['schemas']['code-scanning-alert-classification'][] - commit_sha?: string - environment?: components['schemas']['code-scanning-alert-environment'] - html_url?: string - location?: components['schemas']['code-scanning-alert-location'] - message?: { - text?: string - } - ref?: components['schemas']['code-scanning-ref'] - state?: components['schemas']['code-scanning-alert-state'] - } - 'code-scanning-alert-items': { - created_at: components['schemas']['alert-created-at'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] - dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] - html_url: components['schemas']['alert-html-url'] - instances_url: components['schemas']['alert-instances-url'] - most_recent_instance: components['schemas']['code-scanning-alert-instance'] - number: components['schemas']['alert-number'] - rule: components['schemas']['code-scanning-alert-rule-summary'] - state: components['schemas']['code-scanning-alert-state'] - tool: components['schemas']['code-scanning-analysis-tool'] - updated_at?: components['schemas']['alert-updated-at'] - url: components['schemas']['alert-url'] - } - /** @description Describe a region within a file for the alert. */ - 'code-scanning-alert-location': { - end_column?: number - end_line?: number - path?: string - start_column?: number - start_line?: number - } - 'code-scanning-alert-rule': { - /** @description A short description of the rule used to detect the alert. */ - description?: string - /** @description description of the rule used to detect the alert. */ - full_description?: string - /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ - help?: string | null - /** @description A unique identifier for the rule used to detect the alert. */ - id?: string | null - /** @description The name of the rule used to detect the alert. */ - name?: string - /** - * @description The security severity of the alert. - * @enum {string|null} - */ - security_severity_level?: ('low' | 'medium' | 'high' | 'critical') | null - /** - * @description The severity of the alert. - * @enum {string|null} - */ - severity?: ('none' | 'note' | 'warning' | 'error') | null - /** @description A set of tags applicable for the rule. */ - tags?: string[] | null - } - 'code-scanning-alert-rule-summary': { - /** @description A short description of the rule used to detect the alert. */ - description?: string - /** @description A unique identifier for the rule used to detect the alert. */ - id?: string | null - /** @description The name of the rule used to detect the alert. */ - name?: string - /** - * @description The severity of the alert. - * @enum {string|null} - */ - severity?: ('none' | 'note' | 'warning' | 'error') | null - /** @description A set of tags applicable for the rule. */ - tags?: string[] | null - } - /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. - * @enum {string} - */ - 'code-scanning-alert-set-state': 'open' | 'dismissed' - /** - * @description State of a code scanning alert. - * @enum {string} - */ - 'code-scanning-alert-state': 'open' | 'closed' | 'dismissed' | 'fixed' - 'code-scanning-analysis': { - analysis_key: components['schemas']['code-scanning-analysis-analysis-key'] - category?: components['schemas']['code-scanning-analysis-category'] - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - created_at: components['schemas']['code-scanning-analysis-created-at'] - deletable: boolean - environment: components['schemas']['code-scanning-analysis-environment'] - /** @example error reading field xyz */ - error: string - /** @description Unique identifier for this analysis. */ - id: number - ref: components['schemas']['code-scanning-ref'] - /** @description The total number of results in the analysis. */ - results_count: number - /** @description The total number of rules used in the analysis. */ - rules_count: number - sarif_id: components['schemas']['code-scanning-analysis-sarif-id'] - tool: components['schemas']['code-scanning-analysis-tool'] - url: components['schemas']['code-scanning-analysis-url'] - /** - * @description Warning generated when processing the analysis - * @example 123 results were ignored - */ - warning: string - } - /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ - 'code-scanning-analysis-analysis-key': string - /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ - 'code-scanning-analysis-category': string - /** @description The SHA of the commit to which the analysis you are uploading relates. */ - 'code-scanning-analysis-commit-sha': string - /** - * Format: date-time - * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - 'code-scanning-analysis-created-at': string - /** - * Analysis deletion - * @description Successful deletion of a code scanning analysis - */ - 'code-scanning-analysis-deletion': { - /** - * Format: uri - * @description Next deletable analysis in chain, with last analysis deletion confirmation - */ - confirm_delete_url: string | null - /** - * Format: uri - * @description Next deletable analysis in chain, without last analysis deletion confirmation - */ - next_analysis_url: string | null - } - /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ - 'code-scanning-analysis-environment': string - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ - 'code-scanning-analysis-sarif-file': string - /** - * @description An identifier for the upload. - * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 - */ - 'code-scanning-analysis-sarif-id': string - 'code-scanning-analysis-tool': { - guid?: components['schemas']['code-scanning-analysis-tool-guid'] - name?: components['schemas']['code-scanning-analysis-tool-name'] - version?: components['schemas']['code-scanning-analysis-tool-version'] - } - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - 'code-scanning-analysis-tool-guid': string | null - /** @description The name of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-name': string - /** @description The version of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-version': string | null - /** - * Format: uri - * @description The REST API URL of the analysis resource. - */ - 'code-scanning-analysis-url': string - 'code-scanning-organization-alert-items': { - created_at: components['schemas']['alert-created-at'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] - dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] - html_url: components['schemas']['alert-html-url'] - instances_url: components['schemas']['alert-instances-url'] - most_recent_instance: components['schemas']['code-scanning-alert-instance'] - number: components['schemas']['alert-number'] - repository: components['schemas']['minimal-repository'] - rule: components['schemas']['code-scanning-alert-rule'] - state: components['schemas']['code-scanning-alert-state'] - tool: components['schemas']['code-scanning-analysis-tool'] - updated_at?: components['schemas']['alert-updated-at'] - url: components['schemas']['alert-url'] - } - /** - * @description The full Git reference, formatted as `refs/heads/`, - * `refs/pull//merge`, or `refs/pull//head`. - */ - 'code-scanning-ref': string - 'code-scanning-sarifs-receipt': { - id?: components['schemas']['code-scanning-analysis-sarif-id'] - /** - * Format: uri - * @description The REST API URL for checking the status of the upload. - */ - url?: string - } - 'code-scanning-sarifs-status': { - /** - * Format: uri - * @description The REST API URL for getting the analyses associated with the upload. - */ - analyses_url?: string | null - /** @description Any errors that ocurred during processing of the delivery. */ - errors?: string[] | null - /** - * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. - * @enum {string} - */ - processing_status?: 'pending' | 'complete' | 'failed' - } - /** - * Code Search Result Item - * @description Code Search Result Item - */ - 'code-search-result-item': { - file_size?: number - /** Format: uri */ - git_url: string - /** Format: uri */ - html_url: string - language?: string | null - /** Format: date-time */ - last_modified_at?: string - /** - * @example [ - * "73..77", - * "77..78" - * ] - */ - line_numbers?: string[] - name: string - path: string - repository: components['schemas']['minimal-repository'] - score: number - sha: string - text_matches?: components['schemas']['search-result-text-matches'] - /** Format: uri */ - url: string - } - /** - * Codespace - * @description A codespace. - */ - codespace: { - billable_owner: components['schemas']['simple-user'] - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - environment_id: string | null - /** @description Details about the codespace's git repository. */ - git_status: { - /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 - */ - ahead?: number - /** - * @description The number of commits the local repository is behind the remote. - * @example 0 - */ - behind?: number - /** @description Whether the local repository has uncommitted changes. */ - has_uncommitted_changes?: boolean - /** @description Whether the local repository has unpushed changes. */ - has_unpushed_changes?: boolean - /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main - */ - ref?: string - } - /** @example 1 */ - id: number - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - idle_timeout_minutes: number | null - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - last_used_at: string - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - machine: components['schemas']['nullable-codespace-machine'] - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - machines_url: string - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - name: string - owner: components['schemas']['simple-user'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - prebuild: boolean | null - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - pulls_url: string | null - recent_folders: string[] - repository: components['schemas']['minimal-repository'] - runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - allowed_port_privacy_settings?: string[] | null - } - /** - * Format: uri - * @description API URL to start this codespace. - */ - start_url: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL to stop this codespace. - */ - stop_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: uri - * @description API URL for this codespace. - */ - url: string - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - web_url: string - } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - 'codespace-export-details': { - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - branch?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - completed_at?: string | null - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - export_url?: string - /** - * @description Id for the export details - * @example latest - */ - id?: string - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - sha?: string | null - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - state?: string | null - } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'codespace-machine': { - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - 'codespaces-secret': { - /** Format: date-time */ - created_at: string - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - name: string - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - selected_repositories_url: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - 'codespaces-user-public-key': { - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - } - /** - * Collaborator - * @description Collaborator - */ - collaborator: { - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - email?: string | null - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - /** @example octocat */ - login: string - name?: string | null - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - /** @example admin */ - role_name: string - site_admin: boolean - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** @example User */ - type: string - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - } - 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number - } - /** - * Combined Commit Status - * @description Combined Commit Status - */ - 'combined-commit-status': { - /** Format: uri */ - commit_url: string - repository: components['schemas']['minimal-repository'] - sha: string - state: string - statuses: components['schemas']['simple-commit-status'][] - total_count: number - /** Format: uri */ - url: string - } - /** - * Commit - * @description Commit - */ - commit: { - author: components['schemas']['nullable-simple-user'] - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments - */ - comments_url: string - commit: { - author: components['schemas']['nullable-git-user'] - /** @example 0 */ - comment_count: number - committer: components['schemas']['nullable-git-user'] - /** @example Fix all the bugs */ - message: string - tree: { - /** @example 827efc6d56897b048c772eb4087f854f46256132 */ - sha: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 - */ - url: string - } - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - url: string - verification?: components['schemas']['verification'] - } - committer: components['schemas']['nullable-simple-user'] - files?: components['schemas']['diff-entry'][] - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - html_url: string - /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ - node_id: string - parents: { - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd - */ - html_url?: string - /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ - sha: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd - */ - url: string - }[] - /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ - sha: string - stats?: { - additions?: number - deletions?: number - total?: number - } - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - url: string - } - /** - * Commit Activity - * @description Commit Activity - */ - 'commit-activity': { - /** - * @example [ - * 0, - * 3, - * 26, - * 20, - * 39, - * 1, - * 0 - * ] - */ - days: number[] - /** @example 89 */ - total: number - /** @example 1336280400 */ - week: number - } - /** - * Commit Comment - * @description Commit Comment - */ - 'commit-comment': { - author_association: components['schemas']['author_association'] - body: string - commit_id: string - /** Format: date-time */ - created_at: string - /** Format: uri */ - html_url: string - id: number - line: number | null - node_id: string - path: string | null - position: number | null - reactions?: components['schemas']['reaction-rollup'] - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Commit Comparison - * @description Commit Comparison - */ - 'commit-comparison': { - /** @example 4 */ - ahead_by: number - base_commit: components['schemas']['commit'] - /** @example 5 */ - behind_by: number - commits: components['schemas']['commit'][] - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/compare/master...topic.diff - */ - diff_url: string - files?: components['schemas']['diff-entry'][] - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/compare/master...topic - */ - html_url: string - merge_base_commit: components['schemas']['commit'] - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/compare/master...topic.patch - */ - patch_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 - */ - permalink_url: string - /** - * @example ahead - * @enum {string} - */ - status: 'diverged' | 'ahead' | 'behind' | 'identical' - /** @example 6 */ - total_commits: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic - */ - url: string - } - /** - * Commit Search Result Item - * @description Commit Search Result Item - */ - 'commit-search-result-item': { - author: components['schemas']['nullable-simple-user'] - /** Format: uri */ - comments_url: string - commit: { - author: { - /** Format: date-time */ - date: string - email: string - name: string - } - comment_count: number - committer: components['schemas']['nullable-git-user'] - message: string - tree: { - sha: string - /** Format: uri */ - url: string - } - /** Format: uri */ - url: string - verification?: components['schemas']['verification'] - } - committer: components['schemas']['nullable-git-user'] - /** Format: uri */ - html_url: string - node_id: string - parents: { - html_url?: string - sha?: string - url?: string - }[] - repository: components['schemas']['minimal-repository'] - score: number - sha: string - text_matches?: components['schemas']['search-result-text-matches'] - /** Format: uri */ - url: string - } - /** - * Community Profile - * @description Community Profile - */ - 'community-profile': { - /** @example true */ - content_reports_enabled?: boolean - /** @example My first repository on GitHub! */ - description: string | null - /** @example example.com */ - documentation: string | null - files: { - code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - code_of_conduct_file: components['schemas']['nullable-community-health-file'] - contributing: components['schemas']['nullable-community-health-file'] - issue_template: components['schemas']['nullable-community-health-file'] - license: components['schemas']['nullable-license-simple'] - pull_request_template: components['schemas']['nullable-community-health-file'] - readme: components['schemas']['nullable-community-health-file'] - } - /** @example 100 */ - health_percentage: number - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - updated_at: string | null - } - /** - * Content Directory - * @description A list of directory items - */ - 'content-directory': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - content?: string - /** Format: uri */ - download_url: string | null - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - type: string - /** Format: uri */ - url: string - }[] - /** - * Content File - * @description Content File - */ - 'content-file': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - content: string - /** Format: uri */ - download_url: string | null - encoding: string - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - /** @example "git://example.com/defunkt/dotjs.git" */ - submodule_git_url?: string - /** @example "actual/actual.md" */ - target?: string - type: string - /** Format: uri */ - url: string - } - /** - * Symlink Content - * @description An object describing a symlink - */ - 'content-submodule': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - /** Format: uri */ - download_url: string | null - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - /** Format: uri */ - submodule_git_url: string - type: string - /** Format: uri */ - url: string - } - /** - * Symlink Content - * @description An object describing a symlink - */ - 'content-symlink': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - /** Format: uri */ - download_url: string | null - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - target: string - type: string - /** Format: uri */ - url: string - } - /** - * Content Traffic - * @description Content Traffic - */ - 'content-traffic': { - /** @example 3542 */ - count: number - /** @example /github/hubot */ - path: string - /** @example github/hubot: A customizable life embetterment robot. */ - title: string - /** @example 2225 */ - uniques: number - } - /** - * Content Tree - * @description Content Tree - */ - 'content-tree': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - /** Format: uri */ - download_url: string | null - entries?: { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - content?: string - /** Format: uri */ - download_url: string | null - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - type: string - /** Format: uri */ - url: string - }[] - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - name: string - path: string - sha: string - size: number - type: string - /** Format: uri */ - url: string - } & { - content: unknown - encoding: unknown - } - /** - * Contributor - * @description Contributor - */ - contributor: { - /** Format: uri */ - avatar_url?: string - contributions: number - email?: string - events_url?: string - /** Format: uri */ - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string | null - /** Format: uri */ - html_url?: string - id?: number - login?: string - name?: string - node_id?: string - /** Format: uri */ - organizations_url?: string - /** Format: uri */ - received_events_url?: string - /** Format: uri */ - repos_url?: string - site_admin?: boolean - starred_url?: string - /** Format: uri */ - subscriptions_url?: string - type: string - /** Format: uri */ - url?: string - } - /** - * Contributor Activity - * @description Contributor Activity - */ - 'contributor-activity': { - author: components['schemas']['nullable-simple-user'] - /** @example 135 */ - total: number - /** - * @example [ - * { - * "w": "1367712000", - * "a": 6898, - * "d": 77, - * "c": 10 - * } - * ] - */ - weeks: { - a?: number - c?: number - d?: number - w?: number - }[] - } - /** - * Converted Note to Issue Issue Event - * @description Converted Note to Issue Issue Event - */ - 'converted-note-to-issue-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['integration'] - project_card?: { - column_name: string - id: number - previous_column_name?: string - project_id: number - /** Format: uri */ - project_url: string - /** Format: uri */ - url: string - } - url: string - } - /** - * Credential Authorization - * @description Credential Authorization - */ - 'credential-authorization': { - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - authorized_credential_expires_at?: string | null - /** @example 12345678 */ - authorized_credential_id: number | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - authorized_credential_note?: string | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - authorized_credential_title?: string | null - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - credential_accessed_at: string | null - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - credential_authorized_at: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - credential_type: string - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - fingerprint?: string - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - login: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - scopes?: string[] - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - token_last_eight?: string - } - /** - * Demilestoned Issue Event - * @description Demilestoned Issue Event - */ - 'demilestoned-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - milestone: { - title: string - } - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * DependabotPublicKey - * @description The public key used for setting Dependabot Secrets. - */ - 'dependabot-public-key': { - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - } - /** - * Dependabot Secret - * @description Set secrets for Dependabot. - */ - 'dependabot-secret': { - /** Format: date-time */ - created_at: string - /** - * @description The name of the secret. - * @example MY_ARTIFACTORY_PASSWORD - */ - name: string - /** Format: date-time */ - updated_at: string - } - /** - * Deploy Key - * @description An SSH key granting access to a single repository. - */ - 'deploy-key': { - created_at: string - id: number - key: string - read_only: boolean - title: string - url: string - verified: boolean - } - /** - * Deployment - * @description A request for a specific ref(branch,sha,tag) to be deployed - */ - deployment: { - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** @example Deploy request from hubot */ - description: string | null - /** - * @description Name for the target deployment environment. - * @example production - */ - environment: string - /** - * @description Unique identifier of the deployment - * @example 42 - */ - id: number - /** @example MDEwOkRlcGxveW1lbnQx */ - node_id: string - /** @example staging */ - original_environment?: string - payload: { [key: string]: unknown } | string - performed_via_github_app?: components['schemas']['nullable-integration'] - /** - * @description Specifies if the given environment is one that end-users directly interact with. Default: false. - * @example true - */ - production_environment?: boolean - /** - * @description The ref to deploy. This can be a branch, tag, or sha. - * @example topic-branch - */ - ref: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example - */ - repository_url: string - /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ - sha: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/1/statuses - */ - statuses_url: string - /** - * @description Parameter to specify a task to execute - * @example deploy - */ - task: string - /** - * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. - * @example true - */ - transient_environment?: boolean - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/1 - */ - url: string - } - /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: { - /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ - custom_branch_policies: boolean - /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ - protected_branches: boolean - } | null - /** - * @description The type of reviewer. Must be one of: `User` or `Team` - * @example User - * @enum {string} - */ - 'deployment-reviewer-type': 'User' | 'Team' - /** - * Deployment - * @description A deployment created as the result of an Actions check run from a workflow that references an environment - */ - 'deployment-simple': { - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - created_at: string - /** @example Deploy request from hubot */ - description: string | null - /** - * @description Name for the target deployment environment. - * @example production - */ - environment: string - /** - * @description Unique identifier of the deployment - * @example 42 - */ - id: number - /** @example MDEwOkRlcGxveW1lbnQx */ - node_id: string - /** @example staging */ - original_environment?: string - performed_via_github_app?: components['schemas']['nullable-integration'] - /** - * @description Specifies if the given environment is one that end-users directly interact with. Default: false. - * @example true - */ - production_environment?: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example - */ - repository_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/1/statuses - */ - statuses_url: string - /** - * @description Parameter to specify a task to execute - * @example deploy - */ - task: string - /** - * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. - * @example true - */ - transient_environment?: boolean - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/1 - */ - url: string - } - /** - * Deployment Status - * @description The status of a deployment. - */ - 'deployment-status': { - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/42 - */ - deployment_url: string - /** - * @description A short description of the status. - * @default - * @example Deployment finished successfully. - */ - description: string - /** - * @description The environment of the deployment that the status is for. - * @default - * @example production - */ - environment?: string - /** - * Format: uri - * @description The URL for accessing your environment. - * @default - * @example https://staging.example.com/ - */ - environment_url?: string - /** @example 1 */ - id: number - /** - * Format: uri - * @description The URL to associate with this status. - * @default - * @example https://example.com/deployment/42/output - */ - log_url?: string - /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ - node_id: string - performed_via_github_app?: components['schemas']['nullable-integration'] - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example - */ - repository_url: string - /** - * @description The state of the status. - * @example success - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'pending' | 'success' | 'queued' | 'in_progress' - /** - * Format: uri - * @description Deprecated: the URL to associate with this status. - * @default - * @example https://example.com/deployment/42/output - */ - target_url: string - /** - * Format: date-time - * @example 2012-07-20T01:19:13Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 - */ - url: string - } - /** - * Diff Entry - * @description Diff Entry - */ - 'diff-entry': { - /** @example 103 */ - additions: number - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt - */ - blob_url: string - /** @example 124 */ - changes: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - contents_url: string - /** @example 21 */ - deletions: number - /** @example file1.txt */ - filename: string - /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ - patch?: string - /** @example file.txt */ - previous_filename?: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt - */ - raw_url: string - /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ - sha: string - /** - * @example added - * @enum {string} - */ - status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied' | 'changed' | 'unchanged' - } - /** - * Email - * @description Email - */ - email: { - /** - * Format: email - * @example octocat@github.com - */ - email: string - /** @example true */ - primary: boolean - /** @example true */ - verified: boolean - /** @example public */ - visibility: string | null - } - /** - * Empty Object - * @description An object without any properties. - */ - 'empty-object': { [key: string]: unknown } - /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. - * @enum {string} - */ - 'enabled-organizations': 'all' | 'none' | 'selected' - /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. - * @enum {string} - */ - 'enabled-repositories': 'all' | 'none' | 'selected' - /** - * Enterprise - * @description An enterprise account - */ - enterprise: { - /** Format: uri */ - avatar_url: string - /** - * Format: date-time - * @example 2019-01-26T19:01:12Z - */ - created_at: string | null - /** @description A short description of the enterprise. */ - description?: string | null - /** - * Format: uri - * @example https://github.com/enterprises/octo-business - */ - html_url: string - /** - * @description Unique identifier of the enterprise - * @example 42 - */ - id: number - /** - * @description The name of the enterprise. - * @example Octo Business - */ - name: string - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** - * @description The slug url identifier for the enterprise. - * @example octo-business - */ - slug: string - /** - * Format: date-time - * @example 2019-01-26T19:14:43Z - */ - updated_at: string | null - /** - * Format: uri - * @description The enterprise's website URL. - */ - website_url?: string | null - } - /** - * Environment - * @description Details of a deployment environment - */ - environment: { - /** - * Format: date-time - * @description The time that the environment was created, in ISO 8601 format. - * @example 2020-11-23T22:00:40Z - */ - created_at: string - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ - html_url: string - /** - * @description The id of the environment. - * @example 56780428 - */ - id: number - /** - * @description The name of the environment. - * @example staging - */ - name: string - /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ - node_id: string - protection_rules?: ( - | { - /** @example 3515 */ - id: number - /** @example MDQ6R2F0ZTM1MTU= */ - node_id: string - /** @example wait_timer */ - type: string - wait_timer?: components['schemas']['wait-timer'] - } - | { - /** @example 3755 */ - id: number - /** @example MDQ6R2F0ZTM3NTU= */ - node_id: string - /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: { - reviewer?: components['schemas']['simple-user'] | components['schemas']['team'] - type?: components['schemas']['deployment-reviewer-type'] - }[] - /** @example required_reviewers */ - type: string - } - | { - /** @example 3515 */ - id: number - /** @example MDQ6R2F0ZTM1MTU= */ - node_id: string - /** @example branch_policy */ - type: string - } - )[] - /** - * Format: date-time - * @description The time that the environment was last updated, in ISO 8601 format. - * @example 2020-11-23T22:00:40Z - */ - updated_at: string - /** @example https://api.github.com/repos/github/hello-world/environments/staging */ - url: string - } - /** - * Environment Approval - * @description An entry in the reviews log for environment deployments - */ - 'environment-approvals': { - /** - * @description The comment submitted with the deployment review - * @example Ship it! - */ - comment: string - /** @description The list of environments that were approved or rejected */ - environments: { - /** - * Format: date-time - * @description The time that the environment was created, in ISO 8601 format. - * @example 2020-11-23T22:00:40Z - */ - created_at?: string - /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ - html_url?: string - /** - * @description The id of the environment. - * @example 56780428 - */ - id?: number - /** - * @description The name of the environment. - * @example staging - */ - name?: string - /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ - node_id?: string - /** - * Format: date-time - * @description The time that the environment was last updated, in ISO 8601 format. - * @example 2020-11-23T22:00:40Z - */ - updated_at?: string - /** @example https://api.github.com/repos/github/hello-world/environments/staging */ - url?: string - }[] - /** - * @description Whether deployment to the environment(s) was approved or rejected - * @example approved - * @enum {string} - */ - state: 'approved' | 'rejected' - user: components['schemas']['simple-user'] - } - /** - * Event - * @description Event - */ - event: { - actor: components['schemas']['actor'] - /** Format: date-time */ - created_at: string | null - id: string - org?: components['schemas']['actor'] - payload: { - action?: string - comment?: components['schemas']['issue-comment'] - issue?: components['schemas']['issue'] - pages?: { - action?: string - html_url?: string - page_name?: string - sha?: string - summary?: string | null - title?: string - }[] - } - public: boolean - repo: { - id: number - name: string - /** Format: uri */ - url: string - } - type: string | null - } - /** - * ExternalGroup - * @description Information about an external group's usage and its members - */ - 'external-group': { - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name for the group - * @example group-azuread-test - */ - group_name: string - /** - * @description An array of external members linked to this group - * @example [ - * { - * "member_id": 1, - * "member_login": "mona-lisa_eocsaxrs", - * "member_name": "Mona Lisa", - * "member_email": "mona_lisa@github.com" - * }, - * { - * "member_id": 2, - * "member_login": "octo-lisa_eocsaxrs", - * "member_name": "Octo Lisa", - * "member_email": "octo_lisa@github.com" - * } - * ] - */ - members: { - /** - * @description An email attached to a user - * @example mona_lisa@github.com - */ - member_email: string - /** - * @description The internal user ID of the identity - * @example 1 - */ - member_id: number - /** - * @description The handle/login for the user - * @example mona-lisa_eocsaxrs - */ - member_login: string - /** - * @description The user display name/profile name - * @example Mona Lisa - */ - member_name: string - }[] - /** - * @description An array of teams linked to this group - * @example [ - * { - * "team_id": 1, - * "team_name": "team-test" - * }, - * { - * "team_id": 2, - * "team_name": "team-test2" - * } - * ] - */ - teams: { - /** - * @description The id for a team - * @example 1 - */ - team_id: number - /** - * @description The name of the team - * @example team-test - */ - team_name: string - }[] - /** - * @description The date when the group was last updated_at - * @example 2021-01-03 22:27:15:000 -700 - */ - updated_at?: string - } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - groups?: { - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - updated_at: string - }[] - } - /** - * Feed - * @description Feed - */ - feed: { - _links: { - current_user?: components['schemas']['link-with-type'] - current_user_actor?: components['schemas']['link-with-type'] - current_user_organization?: components['schemas']['link-with-type'] - current_user_organizations?: components['schemas']['link-with-type'][] - current_user_public?: components['schemas']['link-with-type'] - security_advisories?: components['schemas']['link-with-type'] - timeline: components['schemas']['link-with-type'] - user: components['schemas']['link-with-type'] - } - /** @example https://github.com/octocat.private.actor?token=abc123 */ - current_user_actor_url?: string - /** @example https://github.com/octocat-org */ - current_user_organization_url?: string - /** - * @example [ - * "https://github.com/organizations/github/octocat.private.atom?token=abc123" - * ] - */ - current_user_organization_urls?: string[] - /** @example https://github.com/octocat */ - current_user_public_url?: string - /** @example https://github.com/octocat.private?token=abc123 */ - current_user_url?: string - /** @example https://github.com/security-advisories */ - security_advisories_url?: string - /** @example https://github.com/timeline */ - timeline_url: string - /** @example https://github.com/{user} */ - user_url: string - } - /** - * File Commit - * @description File Commit - */ - 'file-commit': { - commit: { - author?: { - date?: string - email?: string - name?: string - } - committer?: { - date?: string - email?: string - name?: string - } - html_url?: string - message?: string - node_id?: string - parents?: { - html_url?: string - sha?: string - url?: string - }[] - sha?: string - tree?: { - sha?: string - url?: string - } - url?: string - verification?: { - payload?: string | null - reason?: string - signature?: string | null - verified?: boolean - } - } - content: { - _links?: { - git?: string - html?: string - self?: string - } - download_url?: string - git_url?: string - html_url?: string - name?: string - path?: string - sha?: string - size?: number - type?: string - url?: string - } | null - } - /** - * Full Repository - * @description Full Repository - */ - 'full-repository': { - /** @example false */ - allow_auto_merge?: boolean - /** @example true */ - allow_forking?: boolean - /** @example true */ - allow_merge_commit?: boolean - /** @example true */ - allow_rebase_merge?: boolean - /** @example true */ - allow_squash_merge?: boolean - /** - * @description Whether anonymous git access is allowed. - * @default true - */ - anonymous_access_enabled?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - archived: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string - code_of_conduct?: components['schemas']['code-of-conduct-simple'] - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** @example master */ - default_branch: string - /** @example false */ - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - forks: number - /** @example 9 */ - forks_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** @example true */ - has_downloads: boolean - /** @example true */ - has_issues: boolean - has_pages: boolean - /** @example true */ - has_projects: boolean - /** @example true */ - has_wiki: boolean - /** - * Format: uri - * @example https://github.com - */ - homepage: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example 1296269 */ - id: number - /** @example true */ - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World - */ - mirror_url: string | null - /** @example Hello-World */ - name: string - /** @example 0 */ - network_count: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - open_issues: number - /** @example 0 */ - open_issues_count: number - organization?: components['schemas']['nullable-simple-user'] - owner: components['schemas']['simple-user'] - parent?: components['schemas']['repository'] - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - security_and_analysis?: { - advanced_security?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - secret_scanning?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - } | null - /** @example 108 */ - size: number - source?: components['schemas']['repository'] - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string - /** @example 80 */ - stargazers_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** @example 42 */ - subscribers_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example https://svn.github.com/octocat/Hello-World - */ - svn_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string | null - template_repository?: components['schemas']['nullable-repository'] - /** - * @example [ - * "octocat", - * "atom", - * "electron", - * "API" - * ] - */ - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** - * @description The repository visibility: public, private, or internal. - * @example public - */ - visibility?: string - watchers: number - /** @example 80 */ - watchers_count: number - } - /** - * Gist Comment - * @description A comment made to a gist. - */ - 'gist-comment': { - author_association: components['schemas']['author_association'] - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - /** - * Format: date-time - * @example 2011-04-18T23:23:56Z - */ - created_at: string - /** @example 1 */ - id: number - /** @example MDExOkdpc3RDb21tZW50MQ== */ - node_id: string - /** - * Format: date-time - * @example 2011-04-18T23:23:56Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Gist Commit - * @description Gist Commit - */ - 'gist-commit': { - change_status: { - additions?: number - deletions?: number - total?: number - } - /** - * Format: date-time - * @example 2010-04-14T02:15:15Z - */ - committed_at: string - /** - * Format: uri - * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f - */ - url: string - user: components['schemas']['nullable-simple-user'] - /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ - version: string - } - /** - * Gist History - * @description Gist History - */ - 'gist-history': { - change_status?: { - additions?: number - deletions?: number - total?: number - } - /** Format: date-time */ - committed_at?: string - /** Format: uri */ - url?: string - user?: components['schemas']['nullable-simple-user'] - version?: string - } - /** - * Gist Simple - * @description Gist Simple - */ - 'gist-simple': { - comments?: number - comments_url?: string - commits_url?: string - created_at?: string - description?: string | null - files?: { - [key: string]: { - content?: string - filename?: string - language?: string - raw_url?: string - size?: number - truncated?: boolean - type?: string - } | null - } - /** - * Gist - * @description Gist - */ - fork_of?: { - comments: number - /** Format: uri */ - comments_url: string - /** Format: uri */ - commits_url: string - /** Format: date-time */ - created_at: string - description: string | null - files: { - [key: string]: { - filename?: string - language?: string - raw_url?: string - size?: number - type?: string - } - } - forks?: unknown[] - /** Format: uri */ - forks_url: string - /** Format: uri */ - git_pull_url: string - /** Format: uri */ - git_push_url: string - history?: unknown[] - /** Format: uri */ - html_url: string - id: string - node_id: string - owner?: components['schemas']['nullable-simple-user'] - public: boolean - truncated?: boolean - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - user: components['schemas']['nullable-simple-user'] - } | null - /** @deprecated */ - forks?: - | { - /** Format: date-time */ - created_at?: string - id?: string - /** Format: date-time */ - updated_at?: string - /** Format: uri */ - url?: string - user?: components['schemas']['public-user'] - }[] - | null - forks_url?: string - git_pull_url?: string - git_push_url?: string - /** @deprecated */ - history?: components['schemas']['gist-history'][] | null - html_url?: string - id?: string - node_id?: string - owner?: components['schemas']['simple-user'] - public?: boolean - truncated?: boolean - updated_at?: string - url?: string - user?: string | null - } - /** - * Git Commit - * @description Low-level Git commit operations within a repository - */ - 'git-commit': { - /** @description Identifying information for the git-user */ - author: { - /** - * Format: date-time - * @description Timestamp of the commit - * @example 2014-08-09T08:02:04+12:00 - */ - date: string - /** - * @description Git email address of the user - * @example monalisa.octocat@example.com - */ - email: string - /** - * @description Name of the git user - * @example Monalisa Octocat - */ - name: string - } - /** @description Identifying information for the git-user */ - committer: { - /** - * Format: date-time - * @description Timestamp of the commit - * @example 2014-08-09T08:02:04+12:00 - */ - date: string - /** - * @description Git email address of the user - * @example monalisa.octocat@example.com - */ - email: string - /** - * @description Name of the git user - * @example Monalisa Octocat - */ - name: string - } - /** Format: uri */ - html_url: string - /** - * @description Message describing the purpose of the commit - * @example Fix #42 - */ - message: string - node_id: string - parents: { - /** Format: uri */ - html_url: string - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - /** Format: uri */ - url: string - }[] - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - tree: { - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - /** Format: uri */ - url: string - } - /** Format: uri */ - url: string - verification: { - payload: string | null - reason: string - signature: string | null - verified: boolean - } - } - /** - * Git Reference - * @description Git references within a repository - */ - 'git-ref': { - node_id: string - object: { - /** - * @description SHA for the reference - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - type: string - /** Format: uri */ - url: string - } - ref: string - /** Format: uri */ - url: string - } - /** - * Git Tag - * @description Metadata for a Git tag - */ - 'git-tag': { - /** - * @description Message describing the purpose of the tag - * @example Initial public release - */ - message: string - /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ - node_id: string - object: { - sha: string - type: string - /** Format: uri */ - url: string - } - /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ - sha: string - /** - * @description Name of the tag - * @example v0.0.1 - */ - tag: string - tagger: { - date: string - email: string - name: string - } - /** - * Format: uri - * @description URL for the tag - * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac - */ - url: string - verification?: components['schemas']['verification'] - } - /** - * Git Tree - * @description The hierarchy between files in a Git repository. - */ - 'git-tree': { - sha: string - /** - * @description Objects specifying a tree structure - * @example [ - * { - * "path": "file.rb", - * "mode": "100644", - * "type": "blob", - * "size": 30, - * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", - * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", - * "properties": { - * "path": { - * "type": "string" - * }, - * "mode": { - * "type": "string" - * }, - * "type": { - * "type": "string" - * }, - * "size": { - * "type": "integer" - * }, - * "sha": { - * "type": "string" - * }, - * "url": { - * "type": "string" - * } - * }, - * "required": [ - * "path", - * "mode", - * "type", - * "sha", - * "url", - * "size" - * ] - * } - * ] - */ - tree: { - /** @example 040000 */ - mode?: string - /** @example test/file.rb */ - path?: string - /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ - sha?: string - /** @example 12 */ - size?: number - /** @example tree */ - type?: string - /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ - url?: string - }[] - truncated: boolean - /** Format: uri */ - url: string - } - /** - * Gitignore Template - * @description Gitignore Template - */ - 'gitignore-template': { - /** @example C */ - name: string - /** - * @example # Object files - * *.o - * - * # Libraries - * *.lib - * *.a - * - * # Shared objects (inc. Windows DLLs) - * *.dll - * *.so - * *.so.* - * *.dylib - * - * # Executables - * *.exe - * *.out - * *.app - */ - source: string - } - /** - * GPG Key - * @description A unique encryption key - */ - 'gpg-key': { - /** @example true */ - can_certify: boolean - can_encrypt_comms: boolean - can_encrypt_storage: boolean - /** @example true */ - can_sign: boolean - /** - * Format: date-time - * @example 2016-03-24T11:31:04-06:00 - */ - created_at: string - /** - * @example [ - * { - * "email": "mastahyeti@users.noreply.github.com", - * "verified": true - * } - * ] - */ - emails: { - email?: string - verified?: boolean - }[] - /** Format: date-time */ - expires_at: string | null - /** @example 3 */ - id: number - /** @example 3262EFF25BA0D270 */ - key_id: string - primary_key_id: number | null - /** @example xsBNBFayYZ... */ - public_key: string - raw_key: string | null - /** - * @example [ - * { - * "id": 4, - * "primary_key_id": 3, - * "key_id": "4A595D4C72EE49C7", - * "public_key": "zsBNBFayYZ...", - * "emails": [], - * "subkeys": [], - * "can_sign": false, - * "can_encrypt_comms": true, - * "can_encrypt_storage": true, - * "can_certify": false, - * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null - * } - * ] - */ - subkeys: { - can_certify?: boolean - can_encrypt_comms?: boolean - can_encrypt_storage?: boolean - can_sign?: boolean - created_at?: string - emails?: unknown[] - expires_at?: string | null - id?: number - key_id?: string - primary_key_id?: number - public_key?: string - raw_key?: string | null - subkeys?: unknown[] - }[] - } - /** - * GroupMapping - * @description External Groups to be mapped to a team for membership - */ - 'group-mapping': { - /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] - */ - groups?: { - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - group_description: string - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - group_name: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - synced_at?: string | null - }[] - } - /** - * Webhook - * @description Webhooks for repositories. - */ - hook: { - /** - * @description Determines whether the hook is actually triggered on pushes. - * @example true - */ - active: boolean - config: { - content_type?: components['schemas']['webhook-config-content-type'] - /** @example "sha256" */ - digest?: string - /** @example "foo@bar.com" */ - email?: string - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - /** @example "foo" */ - password?: string - /** @example "roomer" */ - room?: string - secret?: components['schemas']['webhook-config-secret'] - /** @example "foo" */ - subdomain?: string - /** @example "abc" */ - token?: string - url?: components['schemas']['webhook-config-url'] - } - /** - * Format: date-time - * @example 2011-09-06T17:26:27Z - */ - created_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries - */ - deliveries_url?: string - /** - * @description Determines what events the hook is triggered for. Default: ['push']. - * @example [ - * "push", - * "pull_request" - * ] - */ - events: string[] - /** - * @description Unique identifier of the webhook. - * @example 42 - */ - id: number - last_response: components['schemas']['hook-response'] - /** - * @description The name of a valid service, use 'web' for a webhook. - * @example web - */ - name: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings - */ - ping_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test - */ - test_url: string - type: string - /** - * Format: date-time - * @example 2011-09-06T20:39:23Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 - */ - url: string - } - /** - * Webhook delivery - * @description Delivery made by a webhook. - */ - 'hook-delivery': { - /** - * @description The type of activity for the event that triggered the delivery. - * @example opened - */ - action: string | null - /** - * Format: date-time - * @description Time when the delivery was delivered. - * @example 2021-05-12T20:33:44Z - */ - delivered_at: string - /** - * @description Time spent delivering. - * @example 0.03 - */ - duration: number - /** - * @description The event that triggered the delivery. - * @example issues - */ - event: string - /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe - */ - guid: string - /** - * @description Unique identifier of the delivery. - * @example 42 - */ - id: number - /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 - */ - installation_id: number | null - /** - * @description Whether the delivery is a redelivery. - * @example false - */ - redelivery: boolean - /** - * @description The id of the repository associated with this event. - * @example 123 - */ - repository_id: number | null - request: { - /** @description The request headers sent with the webhook delivery. */ - headers: { [key: string]: unknown } | null - /** @description The webhook payload. */ - payload: { [key: string]: unknown } | null - } - response: { - /** @description The response headers received when the delivery was made. */ - headers: { [key: string]: unknown } | null - /** @description The response payload received. */ - payload: string | null - } - /** - * @description Description of the status of the attempted delivery - * @example failed to connect - */ - status: string - /** - * @description Status code received when delivery was made. - * @example 502 - */ - status_code: number - /** - * @description The URL target of the delivery. - * @example https://www.example.com - */ - url?: string - } - /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. - */ - 'hook-delivery-item': { - /** - * @description The type of activity for the event that triggered the delivery. - * @example opened - */ - action: string | null - /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z - */ - delivered_at: string - /** - * @description Time spent delivering. - * @example 0.03 - */ - duration: number - /** - * @description The event that triggered the delivery. - * @example issues - */ - event: string - /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe - */ - guid: string - /** - * @description Unique identifier of the webhook delivery. - * @example 42 - */ - id: number - /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 - */ - installation_id: number | null - /** - * @description Whether the webhook delivery is a redelivery. - * @example false - */ - redelivery: boolean - /** - * @description The id of the repository associated with this event. - * @example 123 - */ - repository_id: number | null - /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect - */ - status: string - /** - * @description Status code received when delivery was made. - * @example 502 - */ - status_code: number - } - /** Hook Response */ - 'hook-response': { - code: number | null - message: string | null - status: string | null - } - /** - * Hovercard - * @description Hovercard - */ - hovercard: { - contexts: { - message: string - octicon: string - }[] - } - /** - * Import - * @description A repository import from an external source. - */ - import: { - authors_count?: number | null - /** Format: uri */ - authors_url: string - commit_count?: number | null - error_message?: string | null - failed_step?: string | null - has_large_files?: boolean - /** Format: uri */ - html_url: string - import_percent?: number | null - large_files_count?: number - large_files_size?: number - message?: string - project_choices?: { - human_name?: string - tfvc_project?: string - vcs?: string - }[] - push_percent?: number | null - /** Format: uri */ - repository_url: string - /** @enum {string} */ - status: - | 'auth' - | 'error' - | 'none' - | 'detecting' - | 'choose' - | 'auth_failed' - | 'importing' - | 'mapping' - | 'waiting_to_push' - | 'pushing' - | 'complete' - | 'setup' - | 'unknown' - | 'detection_found_multiple' - | 'detection_found_nothing' - | 'detection_needs_auth' - status_text?: string | null - svc_root?: string - svn_root?: string - tfvc_project?: string - /** Format: uri */ - url: string - use_lfs?: boolean - vcs: string | null - /** @description The URL of the originating repository. */ - vcs_url: string - } - /** - * Installation - * @description Installation - */ - installation: { - /** - * Format: uri - * @example https://api.github.com/installations/1/access_tokens - */ - access_tokens_url: string - account: (components['schemas']['simple-user'] | components['schemas']['enterprise']) | null - /** @example 1 */ - app_id: number - /** @example github-actions */ - app_slug: string - /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ - contact_email?: string | null - /** Format: date-time */ - created_at: string - events: string[] - /** @example true */ - has_multiple_single_files?: boolean - /** - * Format: uri - * @example https://github.com/organizations/github/settings/installations/1 - */ - html_url: string - /** - * @description The ID of the installation. - * @example 1 - */ - id: number - permissions: components['schemas']['app-permissions'] - /** - * Format: uri - * @example https://api.github.com/installation/repositories - */ - repositories_url: string - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - /** Format: date-time */ - suspended_at: string | null - suspended_by: components['schemas']['nullable-simple-user'] - /** @description The ID of the user or organization this token is being scoped to. */ - target_id: number - /** @example Organization */ - target_type: string - /** Format: date-time */ - updated_at: string - } - /** - * Installation Token - * @description Authentication token for a GitHub App installed on a user or org. - */ - 'installation-token': { - expires_at: string - /** @example true */ - has_multiple_single_files?: boolean - permissions?: components['schemas']['app-permissions'] - repositories?: components['schemas']['repository'][] - /** @enum {string} */ - repository_selection?: 'all' | 'selected' - /** @example README.md */ - single_file?: string - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - token: string - } - /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. - */ - integration: { - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 - */ - created_at: string - /** @example The description of the app. */ - description: string | null - /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] - */ - events: string[] - /** - * Format: uri - * @example https://example.com - */ - external_url: string - /** - * Format: uri - * @example https://github.com/apps/super-ci - */ - html_url: string - /** - * @description Unique identifier of the GitHub app - * @example 37 - */ - id: number - /** - * @description The number of installations associated with the GitHub app - * @example 5 - */ - installations_count?: number - /** - * @description The name of the GitHub app - * @example Probot Owners - */ - name: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } - */ - permissions: { - checks?: string - contents?: string - deployments?: string - issues?: string - metadata?: string - } & { [key: string]: string } - /** - * @description The slug name of the GitHub app - * @example probot-owners - */ - slug?: string - /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 - */ - updated_at: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - } - /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} - */ - 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' - /** - * Interaction Restrictions - * @description Limit interactions to a specific type of user for a specified duration - */ - 'interaction-limit': { - expiry?: components['schemas']['interaction-expiry'] - limit: components['schemas']['interaction-group'] - } - /** - * Interaction Limits - * @description Interaction limit settings. - */ - 'interaction-limit-response': { - /** - * Format: date-time - * @example 2018-08-17T04:18:39Z - */ - expires_at: string - limit: components['schemas']['interaction-group'] - /** @example repository */ - origin: string - } - /** - * Issue - * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. - */ - issue: { - active_lock_reason?: string | null - assignee: components['schemas']['nullable-simple-user'] - assignees?: components['schemas']['simple-user'][] | null - author_association: components['schemas']['author_association'] - /** - * @description Contents of the issue - * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? - */ - body?: string | null - body_html?: string - body_text?: string - /** Format: date-time */ - closed_at: string | null - closed_by?: components['schemas']['nullable-simple-user'] - comments: number - /** Format: uri */ - comments_url: string - /** Format: date-time */ - created_at: string - draft?: boolean - /** Format: uri */ - events_url: string - /** Format: uri */ - html_url: string - id: number - /** - * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository - * @example [ - * "bug", - * "registration" - * ] - */ - labels: ( - | string - | { - color?: string | null - default?: boolean - description?: string | null - /** Format: int64 */ - id?: number - name?: string - node_id?: string - /** Format: uri */ - url?: string - } - )[] - labels_url: string - locked: boolean - milestone: components['schemas']['nullable-milestone'] - node_id: string - /** - * @description Number uniquely identifying the issue within its repository - * @example 42 - */ - number: number - performed_via_github_app?: components['schemas']['nullable-integration'] - pull_request?: { - /** Format: uri */ - diff_url: string | null - /** Format: uri */ - html_url: string | null - /** Format: date-time */ - merged_at?: string | null - /** Format: uri */ - patch_url: string | null - /** Format: uri */ - url: string | null - } - reactions?: components['schemas']['reaction-rollup'] - repository?: components['schemas']['repository'] - /** Format: uri */ - repository_url: string - /** - * @description State of the issue; either 'open' or 'closed' - * @example open - */ - state: string - /** Format: uri */ - timeline_url?: string - /** - * @description Title of the issue - * @example Widget creation fails in Safari on OS X 10.8 - */ - title: string - /** Format: date-time */ - updated_at: string - /** - * Format: uri - * @description URL for the issue - * @example https://api.github.com/repositories/42/issues/1 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Issue Comment - * @description Comments provide a way for people to collaborate on an issue. - */ - 'issue-comment': { - author_association: components['schemas']['author_association'] - /** - * @description Contents of the issue comment - * @example What version of Safari were you using when you observed this bug? - */ - body?: string - body_html?: string - body_text?: string - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - created_at: string - /** Format: uri */ - html_url: string - /** - * @description Unique identifier of the issue comment - * @example 42 - */ - id: number - /** Format: uri */ - issue_url: string - node_id: string - performed_via_github_app?: components['schemas']['nullable-integration'] - reactions?: components['schemas']['reaction-rollup'] - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - updated_at: string - /** - * Format: uri - * @description URL for the issue comment - * @example https://api.github.com/repositories/42/issues/comments/1 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Issue Event - * @description Issue Event - */ - 'issue-event': { - actor: components['schemas']['nullable-simple-user'] - assignee?: components['schemas']['nullable-simple-user'] - assigner?: components['schemas']['nullable-simple-user'] - author_association?: components['schemas']['author_association'] - /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ - commit_id: string | null - /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ - commit_url: string | null - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - created_at: string - dismissed_review?: components['schemas']['issue-event-dismissed-review'] - /** @example closed */ - event: string - /** @example 1 */ - id: number - issue?: components['schemas']['nullable-issue'] - label?: components['schemas']['issue-event-label'] - lock_reason?: string | null - milestone?: components['schemas']['issue-event-milestone'] - /** @example MDEwOklzc3VlRXZlbnQx */ - node_id: string - performed_via_github_app?: components['schemas']['nullable-integration'] - project_card?: components['schemas']['issue-event-project-card'] - rename?: components['schemas']['issue-event-rename'] - requested_reviewer?: components['schemas']['nullable-simple-user'] - requested_team?: components['schemas']['team'] - review_requester?: components['schemas']['nullable-simple-user'] - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 - */ - url: string - } - /** Issue Event Dismissed Review */ - 'issue-event-dismissed-review': { - dismissal_commit_id?: string | null - dismissal_message: string | null - review_id: number - state: string - } - /** - * Issue Event for Issue - * @description Issue Event for Issue - */ - 'issue-event-for-issue': - | components['schemas']['labeled-issue-event'] - | components['schemas']['unlabeled-issue-event'] - | components['schemas']['assigned-issue-event'] - | components['schemas']['unassigned-issue-event'] - | components['schemas']['milestoned-issue-event'] - | components['schemas']['demilestoned-issue-event'] - | components['schemas']['renamed-issue-event'] - | components['schemas']['review-requested-issue-event'] - | components['schemas']['review-request-removed-issue-event'] - | components['schemas']['review-dismissed-issue-event'] - | components['schemas']['locked-issue-event'] - | components['schemas']['added-to-project-issue-event'] - | components['schemas']['moved-column-in-project-issue-event'] - | components['schemas']['removed-from-project-issue-event'] - | components['schemas']['converted-note-to-issue-issue-event'] - /** - * Issue Event Label - * @description Issue Event Label - */ - 'issue-event-label': { - color: string | null - name: string | null - } - /** - * Issue Event Milestone - * @description Issue Event Milestone - */ - 'issue-event-milestone': { - title: string - } - /** - * Issue Event Project Card - * @description Issue Event Project Card - */ - 'issue-event-project-card': { - column_name: string - id: number - previous_column_name?: string - project_id: number - /** Format: uri */ - project_url: string - /** Format: uri */ - url: string - } - /** - * Issue Event Rename - * @description Issue Event Rename - */ - 'issue-event-rename': { - from: string - to: string - } - /** - * Issue Search Result Item - * @description Issue Search Result Item - */ - 'issue-search-result-item': { - active_lock_reason?: string | null - assignee: components['schemas']['nullable-simple-user'] - assignees?: components['schemas']['simple-user'][] | null - author_association: components['schemas']['author_association'] - body?: string - body_html?: string - body_text?: string - /** Format: date-time */ - closed_at: string | null - comments: number - /** Format: uri */ - comments_url: string - /** Format: date-time */ - created_at: string - draft?: boolean - /** Format: uri */ - events_url: string - /** Format: uri */ - html_url: string - id: number - labels: { - color?: string - default?: boolean - description?: string | null - /** Format: int64 */ - id?: number - name?: string - node_id?: string - url?: string - }[] - labels_url: string - locked: boolean - milestone: components['schemas']['nullable-milestone'] - node_id: string - number: number - performed_via_github_app?: components['schemas']['nullable-integration'] - pull_request?: { - /** Format: uri */ - diff_url: string | null - /** Format: uri */ - html_url: string | null - /** Format: date-time */ - merged_at?: string | null - /** Format: uri */ - patch_url: string | null - /** Format: uri */ - url: string | null - } - reactions?: components['schemas']['reaction-rollup'] - repository?: components['schemas']['repository'] - /** Format: uri */ - repository_url: string - score: number - state: string - text_matches?: components['schemas']['search-result-text-matches'] - /** Format: uri */ - timeline_url?: string - title: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Job - * @description Information of a job execution in a workflow run - */ - job: { - /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ - check_run_url: string - /** - * Format: date-time - * @description The time that the job finished, in ISO 8601 format. - * @example 2019-08-08T08:00:00-07:00 - */ - completed_at: string | null - /** - * @description The outcome of the job. - * @example success - */ - conclusion: string | null - /** - * @description The SHA of the commit that is being run. - * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d - */ - head_sha: string - /** @example https://github.com/github/hello-world/runs/4 */ - html_url: string | null - /** - * @description The id of the job. - * @example 21 - */ - id: number - /** - * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. - * @example [ - * "self-hosted", - * "foo", - * "bar" - * ] - */ - labels: string[] - /** - * @description The name of the job. - * @example test-coverage - */ - name: string - /** @example MDg6Q2hlY2tSdW40 */ - node_id: string - /** - * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. - * @example 1 - */ - run_attempt?: number - /** - * @description The id of the associated workflow run. - * @example 5 - */ - run_id: number - /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ - run_url: string - /** - * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) - * @example 2 - */ - runner_group_id: number | null - /** - * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) - * @example my runner group - */ - runner_group_name: string | null - /** - * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) - * @example 1 - */ - runner_id: number | null - /** - * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) - * @example my runner - */ - runner_name: string | null - /** - * Format: date-time - * @description The time that the job started, in ISO 8601 format. - * @example 2019-08-08T08:00:00-07:00 - */ - started_at: string - /** - * @description The phase of the lifecycle that the job is currently in. - * @example queued - * @enum {string} - */ - status: 'queued' | 'in_progress' | 'completed' - /** @description Steps in this job. */ - steps?: { - /** - * Format: date-time - * @description The time that the job finished, in ISO 8601 format. - * @example 2019-08-08T08:00:00-07:00 - */ - completed_at?: string | null - /** - * @description The outcome of the job. - * @example success - */ - conclusion: string | null - /** - * @description The name of the job. - * @example test-coverage - */ - name: string - /** @example 1 */ - number: number - /** - * Format: date-time - * @description The time that the step started, in ISO 8601 format. - * @example 2019-08-08T08:00:00-07:00 - */ - started_at?: string | null - /** - * @description The phase of the lifecycle that the job is currently in. - * @example queued - * @enum {string} - */ - status: 'queued' | 'in_progress' | 'completed' - }[] - /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ - url: string - } - /** - * Key - * @description Key - */ - key: { - /** Format: date-time */ - created_at: string - id: number - key: string - read_only: boolean - title: string - url: string - verified: boolean - } - /** - * Key Simple - * @description Key Simple - */ - 'key-simple': { - id: number - key: string - } - /** - * Label - * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). - */ - label: { - /** - * @description 6-character hex code, without the leading #, identifying the color - * @example FFFFFF - */ - color: string - /** @example true */ - default: boolean - /** @example Something isn't working */ - description: string | null - /** - * Format: int64 - * @example 208045946 - */ - id: number - /** - * @description The name of the label. - * @example bug - */ - name: string - /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ - node_id: string - /** - * Format: uri - * @description URL for the label - * @example https://api.github.com/repositories/42/labels/bug - */ - url: string - } - /** - * Label Search Result Item - * @description Label Search Result Item - */ - 'label-search-result-item': { - color: string - default: boolean - description: string | null - id: number - name: string - node_id: string - score: number - text_matches?: components['schemas']['search-result-text-matches'] - /** Format: uri */ - url: string - } - /** - * Labeled Issue Event - * @description Labeled Issue Event - */ - 'labeled-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - label: { - color: string - name: string - } - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Language - * @description Language - */ - language: { [key: string]: number } - /** - * License - * @description License - */ - license: { - /** - * @example - * - * The MIT License (MIT) - * - * Copyright (c) [year] [fullname] - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - body: string - /** - * @example [ - * "include-copyright" - * ] - */ - conditions: string[] - /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ - description: string - /** @example true */ - featured: boolean - /** - * Format: uri - * @example http://choosealicense.com/licenses/mit/ - */ - html_url: string - /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ - implementation: string - /** @example mit */ - key: string - /** - * @example [ - * "no-liability" - * ] - */ - limitations: string[] - /** @example MIT License */ - name: string - /** @example MDc6TGljZW5zZW1pdA== */ - node_id: string - /** - * @example [ - * "commercial-use", - * "modifications", - * "distribution", - * "sublicense", - * "private-use" - * ] - */ - permissions: string[] - /** @example MIT */ - spdx_id: string | null - /** - * Format: uri - * @example https://api.github.com/licenses/mit - */ - url: string | null - } - /** - * License Content - * @description License Content - */ - 'license-content': { - _links: { - /** Format: uri */ - git: string | null - /** Format: uri */ - html: string | null - /** Format: uri */ - self: string - } - content: string - /** Format: uri */ - download_url: string | null - encoding: string - /** Format: uri */ - git_url: string | null - /** Format: uri */ - html_url: string | null - license: components['schemas']['nullable-license-simple'] - name: string - path: string - sha: string - size: number - type: string - /** Format: uri */ - url: string - } - /** - * License Simple - * @description License Simple - */ - 'license-simple': { - /** Format: uri */ - html_url?: string - /** @example mit */ - key: string - /** @example MIT License */ - name: string - /** @example MDc6TGljZW5zZW1pdA== */ - node_id: string - /** @example MIT */ - spdx_id: string | null - /** - * Format: uri - * @example https://api.github.com/licenses/mit - */ - url: string | null - } - /** - * Link - * @description Hypermedia Link - */ - link: { - href: string - } - /** - * Link With Type - * @description Hypermedia Link with Type - */ - 'link-with-type': { - href: string - type: string - } - /** - * Locked Issue Event - * @description Locked Issue Event - */ - 'locked-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - /** @example "off-topic" */ - lock_reason: string | null - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** Marketplace Account */ - 'marketplace-account': { - /** Format: email */ - email?: string | null - id: number - login: string - node_id?: string - /** Format: email */ - organization_billing_email?: string | null - type: string - /** Format: uri */ - url: string - } - /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan - */ - 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts - */ - accounts_url: string - /** - * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" - * ] - */ - bullets: string[] - /** @example A professional-grade CI solution */ - description: string - /** @example true */ - has_free_trial: boolean - /** @example 1313 */ - id: number - /** @example 1099 */ - monthly_price_in_cents: number - /** @example Pro */ - name: string - /** @example 3 */ - number: number - /** @example flat-rate */ - price_model: string - /** @example published */ - state: string - unit_name: string | null - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - url: string - /** @example 11870 */ - yearly_price_in_cents: number - } - /** - * Marketplace Purchase - * @description Marketplace Purchase - */ - 'marketplace-purchase': { - email?: string | null - id: number - login: string - marketplace_pending_change?: { - effective_date?: string - id?: number - is_installed?: boolean - plan?: components['schemas']['marketplace-listing-plan'] - unit_count?: number | null - } | null - marketplace_purchase: { - billing_cycle?: string - free_trial_ends_on?: string | null - is_installed?: boolean - next_billing_date?: string | null - on_free_trial?: boolean - plan?: components['schemas']['marketplace-listing-plan'] - unit_count?: number | null - updated_at?: string - } - organization_billing_email?: string - type: string - url: string - } - /** - * Merged upstream - * @description Results of a successful merge upstream request - */ - 'merged-upstream': { - base_branch?: string - /** @enum {string} */ - merge_type?: 'merge' | 'fast-forward' | 'none' - message?: string - } - /** - * Migration - * @description A migration. - */ - migration: { - /** Format: uri */ - archive_url?: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - created_at: string - exclude?: unknown[] - exclude_attachments: boolean - exclude_git_data: boolean - exclude_metadata: boolean - exclude_owner_projects: boolean - exclude_releases: boolean - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - guid: string - /** @example 79 */ - id: number - /** @example true */ - lock_repositories: boolean - node_id: string - owner: components['schemas']['nullable-simple-user'] - repositories: components['schemas']['repository'][] - /** @example pending */ - state: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - url: string - } - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - milestone: { - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - closed_at: string | null - /** @example 8 */ - closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** @example Tracking milestone for version 1.0 */ - description: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z - */ - due_on: string | null - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - html_url: string - /** @example 1002604 */ - id: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - labels_url: string - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - number: number - /** @example 4 */ - open_issues: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - title: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - url: string - } - /** - * Milestoned Issue Event - * @description Milestoned Issue Event - */ - 'milestoned-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - milestone: { - title: string - } - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Minimal Repository - * @description Minimal Repository - */ - 'minimal-repository': { - allow_forking?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - archived?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - clone_url?: string - code_of_conduct?: components['schemas']['code-of-conduct'] - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - default_branch?: string - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - disabled?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - /** @example 0 */ - forks?: number - forks_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example 1296269 */ - id: number - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license?: { - key?: string - name?: string - node_id?: string - spdx_id?: string - url?: string - } | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - mirror_url?: string | null - /** @example Hello-World */ - name: string - network_count?: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example 0 */ - open_issues?: number - open_issues_count?: number - owner: components['schemas']['simple-user'] - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example admin */ - role_name?: string - size?: number - ssh_url?: string - stargazers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - subscribers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - svn_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string - template_repository?: components['schemas']['nullable-repository'] - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - visibility?: string - /** @example 0 */ - watchers?: number - watchers_count?: number - } - /** - * Moved Column in Project Issue Event - * @description Moved Column in Project Issue Event - */ - 'moved-column-in-project-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - project_card?: { - column_name: string - id: number - previous_column_name?: string - project_id: number - /** Format: uri */ - project_url: string - /** Format: uri */ - url: string - } - url: string - } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'nullable-code-of-conduct-simple': { - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - } | null - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'nullable-codespace-machine': { - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - } | null - /** - * Collaborator - * @description Collaborator - */ - 'nullable-collaborator': { - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - email?: string | null - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - /** @example octocat */ - login: string - name?: string | null - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - /** @example admin */ - role_name: string - site_admin: boolean - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** @example User */ - type: string - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - } | null - /** Community Health File */ - 'nullable-community-health-file': { - /** Format: uri */ - html_url: string - /** Format: uri */ - url: string - } | null - /** - * Git User - * @description Metaproperties for Git author/committer information. - */ - 'nullable-git-user': { - /** @example "2007-10-29T02:42:39.000-07:00" */ - date?: string - /** @example "chris@ozmm.org" */ - email?: string - /** @example "Chris Wanstrath" */ - name?: string - } | null - /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. - */ - 'nullable-integration': { - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 - */ - created_at: string - /** @example The description of the app. */ - description: string | null - /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] - */ - events: string[] - /** - * Format: uri - * @example https://example.com - */ - external_url: string - /** - * Format: uri - * @example https://github.com/apps/super-ci - */ - html_url: string - /** - * @description Unique identifier of the GitHub app - * @example 37 - */ - id: number - /** - * @description The number of installations associated with the GitHub app - * @example 5 - */ - installations_count?: number - /** - * @description The name of the GitHub app - * @example Probot Owners - */ - name: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } - */ - permissions: { - checks?: string - contents?: string - deployments?: string - issues?: string - metadata?: string - } & { [key: string]: string } - /** - * @description The slug name of the GitHub app - * @example probot-owners - */ - slug?: string - /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 - */ - updated_at: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - } | null - /** - * Issue - * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. - */ - 'nullable-issue': { - active_lock_reason?: string | null - assignee: components['schemas']['nullable-simple-user'] - assignees?: components['schemas']['simple-user'][] | null - author_association: components['schemas']['author_association'] - /** - * @description Contents of the issue - * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? - */ - body?: string | null - body_html?: string - body_text?: string - /** Format: date-time */ - closed_at: string | null - closed_by?: components['schemas']['nullable-simple-user'] - comments: number - /** Format: uri */ - comments_url: string - /** Format: date-time */ - created_at: string - draft?: boolean - /** Format: uri */ - events_url: string - /** Format: uri */ - html_url: string - id: number - /** - * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository - * @example [ - * "bug", - * "registration" - * ] - */ - labels: ( - | string - | { - color?: string | null - default?: boolean - description?: string | null - /** Format: int64 */ - id?: number - name?: string - node_id?: string - /** Format: uri */ - url?: string - } - )[] - labels_url: string - locked: boolean - milestone: components['schemas']['nullable-milestone'] - node_id: string - /** - * @description Number uniquely identifying the issue within its repository - * @example 42 - */ - number: number - performed_via_github_app?: components['schemas']['nullable-integration'] - pull_request?: { - /** Format: uri */ - diff_url: string | null - /** Format: uri */ - html_url: string | null - /** Format: date-time */ - merged_at?: string | null - /** Format: uri */ - patch_url: string | null - /** Format: uri */ - url: string | null - } - reactions?: components['schemas']['reaction-rollup'] - repository?: components['schemas']['repository'] - /** Format: uri */ - repository_url: string - /** - * @description State of the issue; either 'open' or 'closed' - * @example open - */ - state: string - /** Format: uri */ - timeline_url?: string - /** - * @description Title of the issue - * @example Widget creation fails in Safari on OS X 10.8 - */ - title: string - /** Format: date-time */ - updated_at: string - /** - * Format: uri - * @description URL for the issue - * @example https://api.github.com/repositories/42/issues/1 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } | null - /** - * License Simple - * @description License Simple - */ - 'nullable-license-simple': { - /** Format: uri */ - html_url?: string - /** @example mit */ - key: string - /** @example MIT License */ - name: string - /** @example MDc6TGljZW5zZW1pdA== */ - node_id: string - /** @example MIT */ - spdx_id: string | null - /** - * Format: uri - * @example https://api.github.com/licenses/mit - */ - url: string | null - } | null - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - 'nullable-milestone': { - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - closed_at: string | null - /** @example 8 */ - closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** @example Tracking milestone for version 1.0 */ - description: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z - */ - due_on: string | null - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - html_url: string - /** @example 1002604 */ - id: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - labels_url: string - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - number: number - /** @example 4 */ - open_issues: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - title: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - url: string - } | null - /** - * Minimal Repository - * @description Minimal Repository - */ - 'nullable-minimal-repository': { - allow_forking?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - archived?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - clone_url?: string - code_of_conduct?: components['schemas']['code-of-conduct'] - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - default_branch?: string - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - disabled?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - /** @example 0 */ - forks?: number - forks_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example 1296269 */ - id: number - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license?: { - key?: string - name?: string - node_id?: string - spdx_id?: string - url?: string - } | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - mirror_url?: string | null - /** @example Hello-World */ - name: string - network_count?: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example 0 */ - open_issues?: number - open_issues_count?: number - owner: components['schemas']['simple-user'] - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example admin */ - role_name?: string - size?: number - ssh_url?: string - stargazers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - subscribers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - svn_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string - template_repository?: components['schemas']['nullable-repository'] - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - visibility?: string - /** @example 0 */ - watchers?: number - watchers_count?: number - } | null - /** - * Repository - * @description A git repository - */ - 'nullable-repository': { - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - allow_rebase_merge?: boolean - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** - * @description Whether the repository is archived. - * @default false - */ - archived: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string | null - /** - * @description The default branch of the repository. - * @example master - */ - default_branch: string - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - forks: number - /** @example 9 */ - forks_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** - * @description Whether downloads are enabled. - * @default true - * @example true - */ - has_downloads: boolean - /** - * @description Whether issues are enabled. - * @default true - * @example true - */ - has_issues: boolean - has_pages: boolean - /** - * @description Whether projects are enabled. - * @default true - * @example true - */ - has_projects: boolean - /** - * @description Whether the wiki is enabled. - * @default true - * @example true - */ - has_wiki: boolean - /** - * Format: uri - * @example https://github.com - */ - homepage: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** - * @description Unique identifier of the repository - * @example 42 - */ - id: number - /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true - */ - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World - */ - mirror_url: string | null - /** - * @description The name of the repository. - * @example Team Environment - */ - name: string - network_count?: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - open_issues: number - /** @example 0 */ - open_issues_count: number - organization?: components['schemas']['nullable-simple-user'] - owner: components['schemas']['simple-user'] - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - /** - * @description Whether the repository is private or public. - * @default false - */ - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at: string | null - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example 108 */ - size: number - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string - /** @example 80 */ - stargazers_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - subscribers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example https://svn.github.com/octocat/Hello-World - */ - svn_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - visibility?: string - watchers_count?: number - } | null - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** - * @description The repository visibility: public, private, or internal. - * @default public - */ - visibility?: string - watchers: number - /** @example 80 */ - watchers_count: number - } | null - /** Scoped Installation */ - 'nullable-scoped-installation': { - account: components['schemas']['simple-user'] - /** @example true */ - has_multiple_single_files?: boolean - permissions: components['schemas']['app-permissions'] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repositories_url: string - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - } | null - /** - * Simple Commit - * @description Simple Commit - */ - 'nullable-simple-commit': { - author: { - email: string - name: string - } | null - committer: { - email: string - name: string - } | null - id: string - message: string - /** Format: date-time */ - timestamp: string - tree_id: string - } | null - /** - * Simple User - * @description Simple User - */ - 'nullable-simple-user': { - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - email?: string | null - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - /** @example octocat */ - login: string - name?: string | null - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** @example User */ - type: string - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - } | null - /** - * Team Simple - * @description Groups of organization members that gives permissions on specified repositories. - */ - 'nullable-team-simple': { - /** - * @description Description of the team - * @example A great team. - */ - description: string | null - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - /** - * @description Unique identifier of the team - * @example 1 - */ - id: number - /** - * @description Distinguished Name (DN) that team maps to within LDAP environment - * @example uid=example,ou=users,dc=github,dc=com - */ - ldap_dn?: string - /** @example https://api.github.com/organizations/1/team/1/members{/member} */ - members_url: string - /** - * @description Name of the team - * @example Justice League - */ - name: string - /** @example MDQ6VGVhbTE= */ - node_id: string - /** - * @description Permission that the team will have for its repositories - * @example admin - */ - permission: string - /** - * @description The level of privacy this team should have - * @example closed - */ - privacy?: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/1/repos - */ - repositories_url: string - /** @example justice-league */ - slug: string - /** - * Format: uri - * @description URL for the team - * @example https://api.github.com/organizations/1/team/1 - */ - url: string - } | null - /** - * Org Hook - * @description Org Hook - */ - 'org-hook': { - /** @example true */ - active: boolean - config: { - /** @example "form" */ - content_type?: string - /** @example "0" */ - insecure_ssl?: string - /** @example "********" */ - secret?: string - /** @example "http://example.com/2" */ - url?: string - } - /** - * Format: date-time - * @example 2011-09-06T17:26:27Z - */ - created_at: string - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1/deliveries - */ - deliveries_url?: string - /** - * @example [ - * "push", - * "pull_request" - * ] - */ - events: string[] - /** @example 1 */ - id: number - /** @example web */ - name: string - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1/pings - */ - ping_url: string - type: string - /** - * Format: date-time - * @example 2011-09-06T20:39:23Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1 - */ - url: string - } - /** - * Org Membership - * @description Org Membership - */ - 'org-membership': { - organization: components['schemas']['organization-simple'] - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - organization_url: string - permissions?: { - can_create_repository: boolean - } - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - role: 'admin' | 'member' | 'billing_manager' - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - state: 'active' | 'pending' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Actions Secret for an Organization - * @description Secrets for GitHub Actions for an organization. - */ - 'organization-actions-secret': { - /** Format: date-time */ - created_at: string - /** - * @description The name of the secret. - * @example SECRET_TOKEN - */ - name: string - /** - * Format: uri - * @example https://api.github.com/organizations/org/secrets/my_secret/repositories - */ - selected_repositories_url?: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - } - /** - * Organization Custom Repository Role - * @description Custom repository roles created by organization administrators - */ - 'organization-custom-repository-role': { - id: number - name: string - } - /** - * Dependabot Secret for an Organization - * @description Secrets for GitHub Dependabot for an organization. - */ - 'organization-dependabot-secret': { - /** Format: date-time */ - created_at: string - /** - * @description The name of the secret. - * @example SECRET_TOKEN - */ - name: string - /** - * Format: uri - * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories - */ - selected_repositories_url?: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - } - /** - * Organization Full - * @description Organization Full - */ - 'organization-full': { - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** - * Format: email - * @example org@example.com - */ - billing_email?: string | null - /** - * Format: uri - * @example https://github.com/blog - */ - blog?: string - /** @example 8 */ - collaborators?: number | null - /** @example GitHub */ - company?: string - /** - * Format: date-time - * @example 2008-01-14T04:33:35Z - */ - created_at: string - default_repository_permission?: string | null - /** @example A great organization */ - description: string | null - /** @example 10000 */ - disk_usage?: number | null - /** - * Format: email - * @example octocat@github.com - */ - email?: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example 20 */ - followers: number - /** @example 0 */ - following: number - /** @example true */ - has_organization_projects: boolean - /** @example true */ - has_repository_projects: boolean - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - /** @example true */ - is_verified?: boolean - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example San Francisco */ - location?: string - /** @example github */ - login: string - /** @example all */ - members_allowed_repository_creation_type?: string - /** @example true */ - members_can_create_internal_repositories?: boolean - /** @example true */ - members_can_create_pages?: boolean - /** @example true */ - members_can_create_private_pages?: boolean - /** @example true */ - members_can_create_private_repositories?: boolean - /** @example true */ - members_can_create_public_pages?: boolean - /** @example true */ - members_can_create_public_repositories?: boolean - /** @example true */ - members_can_create_repositories?: boolean | null - /** @example false */ - members_can_fork_private_repositories?: boolean | null - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example github */ - name?: string - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** @example 100 */ - owned_private_repos?: number - plan?: { - filled_seats?: number - name: string - private_repos: number - seats?: number - space: number - } - /** @example 81 */ - private_gists?: number | null - /** @example 1 */ - public_gists: number - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** @example 2 */ - public_repos: number - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** @example 100 */ - total_private_repos?: number - /** @example github */ - twitter_username?: string | null - /** @example true */ - two_factor_requirement_enabled?: boolean | null - /** @example Organization */ - type: string - /** Format: date-time */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - } - /** - * Organization Invitation - * @description Organization Invitation - */ - 'organization-invitation': { - created_at: string - email: string | null - failed_at?: string | null - failed_reason?: string | null - id: number - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - invitation_teams_url: string - inviter: components['schemas']['simple-user'] - login: string | null - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - node_id: string - role: string - team_count: number - } - 'organization-secret-scanning-alert': { - created_at?: components['schemas']['alert-created-at'] - html_url?: components['schemas']['alert-html-url'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - locations_url?: string - number?: components['schemas']['alert-number'] - repository?: components['schemas']['minimal-repository'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - resolved_at?: string | null - resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The secret that was detected. */ - secret?: string - /** @description The type of secret that secret scanning detected. */ - secret_type?: string - state?: components['schemas']['secret-scanning-alert-state'] - url?: components['schemas']['alert-url'] - } - /** - * Organization Simple - * @description Organization Simple - */ - 'organization-simple': { - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** @example A great organization */ - description: string | null - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** @example 1 */ - id: number - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example github */ - login: string - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - } - /** - * Package - * @description A software package - */ - package: { - /** Format: date-time */ - created_at: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - html_url: string - /** - * @description Unique identifier of the package. - * @example 1 - */ - id: number - /** - * @description The name of the package. - * @example super-linter - */ - name: string - owner?: components['schemas']['nullable-simple-user'] - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ - updated_at: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - url: string - /** - * @description The number of versions of the package. - * @example 1 - */ - version_count: number - /** - * @example private - * @enum {string} - */ - visibility: 'private' | 'public' - } - /** - * Package Version - * @description A version of a software package - */ - 'package-version': { - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - deleted_at?: string - description?: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - html_url?: string - /** - * @description Unique identifier of the package version. - * @example 1 - */ - id: number - /** @example MIT */ - license?: string - /** Package Version Metadata */ - metadata?: { - /** Container Metadata */ - container?: { - tags: string[] - } - /** Docker Metadata */ - docker?: { - tag?: string[] - } & { - tags: unknown - } - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - } - /** - * @description The name of the package version. - * @example latest - */ - name: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - package_html_url: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ - url: string - } - 'packages-billing-usage': { - /** @description Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number - } - /** - * GitHub Pages - * @description The configuration for GitHub Pages for a repository. - */ - page: { - /** - * @description The Pages site's custom domain - * @example example.com - */ - cname: string | null - /** - * @description Whether the Page has a custom 404 page. - * @default false - * @example false - */ - custom_404: boolean - /** - * Format: uri - * @description The web address the Page can be accessed from. - * @example https://example.com - */ - html_url?: string - https_certificate?: components['schemas']['pages-https-certificate'] - /** - * @description Whether https is enabled on the domain - * @example true - */ - https_enforced?: boolean - /** - * Format: date-time - * @description The timestamp when a pending domain becomes unverified. - */ - pending_domain_unverified_at?: string | null - /** - * @description The state if the domain is verified - * @example pending - * @enum {string|null} - */ - protected_domain_state?: ('pending' | 'verified' | 'unverified') | null - /** - * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. - * @example true - */ - public: boolean - source?: components['schemas']['pages-source-hash'] - /** - * @description The status of the most recent build of the Page. - * @example built - * @enum {string|null} - */ - status: ('built' | 'building' | 'errored') | null - /** - * Format: uri - * @description The API address for accessing this Page resource. - * @example https://api.github.com/repos/github/hello-world/pages - */ - url: string - } - /** - * Page Build - * @description Page Build - */ - 'page-build': { - commit: string - /** Format: date-time */ - created_at: string - duration: number - error: { - message: string | null - } - pusher: components['schemas']['nullable-simple-user'] - status: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - } - /** - * Page Build Status - * @description Page Build Status - */ - 'page-build-status': { - /** @example queued */ - status: string - /** - * Format: uri - * @example https://api.github.com/repos/github/hello-world/pages/builds/latest - */ - url: string - } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - 'pages-health-check': { - alt_domain?: { - caa_error?: string | null - dns_resolves?: boolean - enforces_https?: boolean - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - host?: string - https_error?: string | null - is_a_record?: boolean | null - is_apex_domain?: boolean - is_cloudflare_ip?: boolean | null - is_cname_to_fastly?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_fastly_ip?: boolean | null - is_https_eligible?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_old_ip_address?: boolean | null - is_pages_domain?: boolean - is_pointed_to_github_pages_ip?: boolean | null - is_proxied?: boolean | null - is_served_by_pages?: boolean | null - is_valid?: boolean - is_valid_domain?: boolean - nameservers?: string - reason?: string | null - responds_to_https?: boolean - should_be_a_record?: boolean | null - uri?: string - } | null - domain?: { - caa_error?: string | null - dns_resolves?: boolean - enforces_https?: boolean - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - host?: string - https_error?: string | null - is_a_record?: boolean | null - is_apex_domain?: boolean - is_cloudflare_ip?: boolean | null - is_cname_to_fastly?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_fastly_ip?: boolean | null - is_https_eligible?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_old_ip_address?: boolean | null - is_pages_domain?: boolean - is_pointed_to_github_pages_ip?: boolean | null - is_proxied?: boolean | null - is_served_by_pages?: boolean | null - is_valid?: boolean - is_valid_domain?: boolean - nameservers?: string - reason?: string | null - responds_to_https?: boolean - should_be_a_record?: boolean | null - uri?: string - } - } - /** Pages Https Certificate */ - 'pages-https-certificate': { - /** @example Certificate is approved */ - description: string - /** - * @description Array of the domain set and its alternate name (if it is configured) - * @example [ - * "example.com", - * "www.example.com" - * ] - */ - domains: string[] - /** Format: date */ - expires_at?: string - /** - * @example approved - * @enum {string} - */ - state: - | 'new' - | 'authorization_created' - | 'authorization_pending' - | 'authorized' - | 'authorization_revoked' - | 'issued' - | 'uploaded' - | 'approved' - | 'errored' - | 'bad_authz' - | 'destroy_pending' - | 'dns_changed' - } - /** Pages Source Hash */ - 'pages-source-hash': { - branch: string - path: string - } - /** Participation Stats */ - 'participation-stats': { - all: number[] - owner: number[] - } - /** - * Pending Deployment - * @description Details of a deployment that is waiting for protection rules to pass - */ - 'pending-deployment': { - /** - * @description Whether the currently authenticated user can approve the deployment - * @example true - */ - current_user_can_approve: boolean - environment: { - /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ - html_url?: string - /** - * @description The id of the environment. - * @example 56780428 - */ - id?: number - /** - * @description The name of the environment. - * @example staging - */ - name?: string - /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ - node_id?: string - /** @example https://api.github.com/repos/github/hello-world/environments/staging */ - url?: string - } - /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers: { - reviewer?: components['schemas']['simple-user'] | components['schemas']['team'] - type?: components['schemas']['deployment-reviewer-type'] - }[] - /** - * @description The set duration of the wait timer - * @example 30 - */ - wait_timer: number - /** - * Format: date-time - * @description The time that the wait timer began. - * @example 2020-11-23T22:00:40Z - */ - wait_timer_started_at: string | null - } - /** - * Porter Author - * @description Porter Author - */ - 'porter-author': { - email: string - id: number - /** Format: uri */ - import_url: string - name: string - remote_id: string - remote_name: string - /** Format: uri */ - url: string - } - /** - * Porter Large File - * @description Porter Large File - */ - 'porter-large-file': { - oid: string - path: string - ref_name: string - size: number - } - /** - * Private User - * @description Private User - */ - 'private-user': { - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - /** @example There once was... */ - bio: string | null - /** @example https://github.com/blog */ - blog: string | null - business_plus?: boolean - /** @example 8 */ - collaborators: number - /** @example GitHub */ - company: string | null - /** - * Format: date-time - * @example 2008-01-14T04:33:35Z - */ - created_at: string - /** @example 10000 */ - disk_usage: number - /** - * Format: email - * @example octocat@github.com - */ - email: string | null - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** @example 20 */ - followers: number - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example 0 */ - following: number - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - hireable: boolean | null - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - ldap_dn?: string - /** @example San Francisco */ - location: string | null - /** @example octocat */ - login: string - /** @example monalisa octocat */ - name: string | null - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - /** @example 100 */ - owned_private_repos: number - plan?: { - collaborators: number - name: string - private_repos: number - space: number - } - /** @example 81 */ - private_gists: number - /** @example 1 */ - public_gists: number - /** @example 2 */ - public_repos: number - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - site_admin: boolean - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** Format: date-time */ - suspended_at?: string | null - /** @example 100 */ - total_private_repos: number - /** @example monalisa */ - twitter_username?: string | null - /** @example true */ - two_factor_authentication: boolean - /** @example User */ - type: string - /** - * Format: date-time - * @example 2008-01-14T04:33:35Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - } - /** - * Project - * @description Projects are a way to organize columns and cards of work. - */ - project: { - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body: string | null - /** - * Format: uri - * @example https://api.github.com/projects/1002604/columns - */ - columns_url: string - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** - * Format: uri - * @example https://github.com/api-playground/projects-test/projects/12 - */ - html_url: string - /** @example 1002604 */ - id: number - /** - * @description Name of the project - * @example Week One Sprint - */ - name: string - /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ - node_id: string - /** @example 1 */ - number: number - /** - * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. - * @enum {string} - */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test - */ - owner_url: string - /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - private?: boolean - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604 - */ - url: string - } - /** - * Project Card - * @description Project cards represent a scope of work. - */ - 'project-card': { - /** - * @description Whether or not the card is archived - * @example false - */ - archived?: boolean - column_name?: string - /** - * Format: uri - * @example https://api.github.com/projects/columns/367 - */ - column_url: string - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test/issues/3 - */ - content_url?: string - /** - * Format: date-time - * @example 2016-09-05T14:21:06Z - */ - created_at: string - creator: components['schemas']['nullable-simple-user'] - /** - * @description The project card's ID - * @example 42 - */ - id: number - /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ - node_id: string - /** @example Add payload for delete Project column */ - note: string | null - project_id?: string - /** - * Format: uri - * @example https://api.github.com/projects/120 - */ - project_url: string - /** - * Format: date-time - * @example 2016-09-05T14:20:22Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/projects/columns/cards/1478 - */ - url: string - } - /** - * Project Collaborator Permission - * @description Project Collaborator Permission - */ - 'project-collaborator-permission': { - permission: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Project Column - * @description Project columns contain cards of work. - */ - 'project-column': { - /** - * Format: uri - * @example https://api.github.com/projects/columns/367/cards - */ - cards_url: string - /** - * Format: date-time - * @example 2016-09-05T14:18:44Z - */ - created_at: string - /** - * @description The unique identifier of the project column - * @example 42 - */ - id: number - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string - /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/projects/120 - */ - project_url: string - /** - * Format: date-time - * @example 2016-09-05T14:22:28Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/projects/columns/367 - */ - url: string - } - /** - * Protected Branch - * @description Branch protections protect branches - */ - 'protected-branch': { - allow_deletions?: { - enabled: boolean - } - allow_force_pushes?: { - enabled: boolean - } - enforce_admins?: { - enabled: boolean - /** Format: uri */ - url: string - } - required_conversation_resolution?: { - enabled?: boolean - } - required_linear_history?: { - enabled: boolean - } - required_pull_request_reviews?: { - bypass_pull_request_allowances?: { - teams: components['schemas']['team'][] - users: components['schemas']['simple-user'][] - } - dismiss_stale_reviews?: boolean - dismissal_restrictions?: { - teams: components['schemas']['team'][] - /** Format: uri */ - teams_url: string - /** Format: uri */ - url: string - users: components['schemas']['simple-user'][] - /** Format: uri */ - users_url: string - } - require_code_owner_reviews?: boolean - required_approving_review_count?: number - /** Format: uri */ - url: string - } - required_signatures?: { - /** @example true */ - enabled: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures - */ - url: string - } - required_status_checks?: components['schemas']['status-check-policy'] - restrictions?: components['schemas']['branch-restriction-policy'] - /** Format: uri */ - url: string - } - /** - * Protected Branch Admin Enforced - * @description Protected Branch Admin Enforced - */ - 'protected-branch-admin-enforced': { - /** @example true */ - enabled: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins - */ - url: string - } - /** - * Protected Branch Pull Request Review - * @description Protected Branch Pull Request Review - */ - 'protected-branch-pull-request-review': { - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: { - /** @description The list of teams allowed to bypass pull request requirements. */ - teams?: components['schemas']['team'][] - /** @description The list of users allowed to bypass pull request requirements. */ - users?: components['schemas']['simple-user'][] - } | null - /** @example true */ - dismiss_stale_reviews: boolean - dismissal_restrictions?: { - /** @description The list of teams with review dismissal access. */ - teams?: components['schemas']['team'][] - /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ - teams_url?: string - /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ - url?: string - /** @description The list of users with review dismissal access. */ - users?: components['schemas']['simple-user'][] - /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ - users_url?: string - } - /** @example true */ - require_code_owner_reviews: boolean - /** @example 2 */ - required_approving_review_count?: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions - */ - url?: string - } - /** - * Protected Branch Required Status Check - * @description Protected Branch Required Status Check - */ - 'protected-branch-required-status-check': { - checks: { - app_id: number | null - context: string - }[] - contexts: string[] - contexts_url?: string - enforcement_level?: string - strict?: boolean - url?: string - } - /** - * Public User - * @description Public User - */ - 'public-user': { - /** Format: uri */ - avatar_url: string - bio: string | null - blog: string | null - /** @example 3 */ - collaborators?: number - company: string | null - /** Format: date-time */ - created_at: string - /** @example 1 */ - disk_usage?: number - /** Format: email */ - email: string | null - events_url: string - followers: number - /** Format: uri */ - followers_url: string - following: number - following_url: string - gists_url: string - gravatar_id: string | null - hireable: boolean | null - /** Format: uri */ - html_url: string - id: number - location: string | null - login: string - name: string | null - node_id: string - /** Format: uri */ - organizations_url: string - /** @example 2 */ - owned_private_repos?: number - plan?: { - collaborators: number - name: string - private_repos: number - space: number - } - /** @example 1 */ - private_gists?: number - public_gists: number - public_repos: number - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - /** Format: date-time */ - suspended_at?: string | null - /** @example 2 */ - total_private_repos?: number - twitter_username?: string | null - type: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - } - /** - * Pull Request - * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. - */ - 'pull-request': { - _links: { - comments: components['schemas']['link'] - commits: components['schemas']['link'] - html: components['schemas']['link'] - issue: components['schemas']['link'] - review_comment: components['schemas']['link'] - review_comments: components['schemas']['link'] - self: components['schemas']['link'] - statuses: components['schemas']['link'] - } - /** @example too heated */ - active_lock_reason?: string | null - /** @example 100 */ - additions: number - assignee: components['schemas']['nullable-simple-user'] - assignees?: components['schemas']['simple-user'][] | null - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] - base: { - label: string - ref: string - repo: { - allow_forking?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - archive_url: string - archived: boolean - assignees_url: string - blobs_url: string - branches_url: string - clone_url: string - collaborators_url: string - comments_url: string - commits_url: string - compare_url: string - contents_url: string - /** Format: uri */ - contributors_url: string - /** Format: date-time */ - created_at: string - default_branch: string - /** Format: uri */ - deployments_url: string - description: string | null - disabled: boolean - /** Format: uri */ - downloads_url: string - /** Format: uri */ - events_url: string - fork: boolean - forks: number - forks_count: number - /** Format: uri */ - forks_url: string - full_name: string - git_commits_url: string - git_refs_url: string - git_tags_url: string - git_url: string - has_downloads: boolean - has_issues: boolean - has_pages: boolean - has_projects: boolean - has_wiki: boolean - /** Format: uri */ - homepage: string | null - /** Format: uri */ - hooks_url: string - /** Format: uri */ - html_url: string - id: number - is_template?: boolean - issue_comment_url: string - issue_events_url: string - issues_url: string - keys_url: string - labels_url: string - language: string | null - /** Format: uri */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** Format: uri */ - merges_url: string - milestones_url: string - /** Format: uri */ - mirror_url: string | null - name: string - node_id: string - notifications_url: string - open_issues: number - open_issues_count: number - owner: { - /** Format: uri */ - avatar_url: string - events_url: string - /** Format: uri */ - followers_url: string - following_url: string - gists_url: string - gravatar_id: string | null - /** Format: uri */ - html_url: string - id: number - login: string - node_id: string - /** Format: uri */ - organizations_url: string - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - type: string - /** Format: uri */ - url: string - } - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - private: boolean - pulls_url: string - /** Format: date-time */ - pushed_at: string - releases_url: string - size: number - ssh_url: string - stargazers_count: number - /** Format: uri */ - stargazers_url: string - statuses_url: string - /** Format: uri */ - subscribers_url: string - /** Format: uri */ - subscription_url: string - /** Format: uri */ - svn_url: string - /** Format: uri */ - tags_url: string - /** Format: uri */ - teams_url: string - temp_clone_token?: string - topics?: string[] - trees_url: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - /** @description The repository visibility: public, private, or internal. */ - visibility?: string - watchers: number - watchers_count: number - } - sha: string - user: { - /** Format: uri */ - avatar_url: string - events_url: string - /** Format: uri */ - followers_url: string - following_url: string - gists_url: string - gravatar_id: string | null - /** Format: uri */ - html_url: string - id: number - login: string - node_id: string - /** Format: uri */ - organizations_url: string - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - type: string - /** Format: uri */ - url: string - } - } - /** @example Please pull these awesome changes */ - body: string | null - /** @example 5 */ - changed_files: number - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - closed_at: string | null - /** @example 10 */ - comments: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments - */ - comments_url: string - /** @example 3 */ - commits: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits - */ - commits_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** @example 3 */ - deletions: number - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347.diff - */ - diff_url: string - /** - * @description Indicates whether or not the pull request is a draft. - * @example false - */ - draft?: boolean - head: { - label: string - ref: string - repo: { - allow_forking?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - archive_url: string - archived: boolean - assignees_url: string - blobs_url: string - branches_url: string - clone_url: string - collaborators_url: string - comments_url: string - commits_url: string - compare_url: string - contents_url: string - /** Format: uri */ - contributors_url: string - /** Format: date-time */ - created_at: string - default_branch: string - /** Format: uri */ - deployments_url: string - description: string | null - disabled: boolean - /** Format: uri */ - downloads_url: string - /** Format: uri */ - events_url: string - fork: boolean - forks: number - forks_count: number - /** Format: uri */ - forks_url: string - full_name: string - git_commits_url: string - git_refs_url: string - git_tags_url: string - git_url: string - has_downloads: boolean - has_issues: boolean - has_pages: boolean - has_projects: boolean - has_wiki: boolean - /** Format: uri */ - homepage: string | null - /** Format: uri */ - hooks_url: string - /** Format: uri */ - html_url: string - id: number - is_template?: boolean - issue_comment_url: string - issue_events_url: string - issues_url: string - keys_url: string - labels_url: string - language: string | null - /** Format: uri */ - languages_url: string - license: { - key: string - name: string - node_id: string - spdx_id: string | null - /** Format: uri */ - url: string | null - } | null - master_branch?: string - /** Format: uri */ - merges_url: string - milestones_url: string - /** Format: uri */ - mirror_url: string | null - name: string - node_id: string - notifications_url: string - open_issues: number - open_issues_count: number - owner: { - /** Format: uri */ - avatar_url: string - events_url: string - /** Format: uri */ - followers_url: string - following_url: string - gists_url: string - gravatar_id: string | null - /** Format: uri */ - html_url: string - id: number - login: string - node_id: string - /** Format: uri */ - organizations_url: string - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - type: string - /** Format: uri */ - url: string - } - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - private: boolean - pulls_url: string - /** Format: date-time */ - pushed_at: string - releases_url: string - size: number - ssh_url: string - stargazers_count: number - /** Format: uri */ - stargazers_url: string - statuses_url: string - /** Format: uri */ - subscribers_url: string - /** Format: uri */ - subscription_url: string - /** Format: uri */ - svn_url: string - /** Format: uri */ - tags_url: string - /** Format: uri */ - teams_url: string - temp_clone_token?: string - topics?: string[] - trees_url: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - /** @description The repository visibility: public, private, or internal. */ - visibility?: string - watchers: number - watchers_count: number - } | null - sha: string - user: { - /** Format: uri */ - avatar_url: string - events_url: string - /** Format: uri */ - followers_url: string - following_url: string - gists_url: string - gravatar_id: string | null - /** Format: uri */ - html_url: string - id: number - login: string - node_id: string - /** Format: uri */ - organizations_url: string - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - type: string - /** Format: uri */ - url: string - } - } - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347 - */ - html_url: string - /** @example 1 */ - id: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 - */ - issue_url: string - labels: { - color: string - default: boolean - description: string | null - /** Format: int64 */ - id: number - name: string - node_id: string - url: string - }[] - /** @example true */ - locked: boolean - /** - * @description Indicates whether maintainers can modify the pull request. - * @example true - */ - maintainer_can_modify: boolean - /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ - merge_commit_sha: string | null - /** @example true */ - mergeable: boolean | null - /** @example clean */ - mergeable_state: string - merged: boolean - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - merged_at: string | null - merged_by: components['schemas']['nullable-simple-user'] - milestone: components['schemas']['nullable-milestone'] - /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ - node_id: string - /** - * @description Number uniquely identifying the pull request within its repository. - * @example 42 - */ - number: number - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347.patch - */ - patch_url: string - /** @example true */ - rebaseable?: boolean | null - requested_reviewers?: components['schemas']['simple-user'][] | null - requested_teams?: components['schemas']['team-simple'][] | null - /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ - review_comment_url: string - /** @example 0 */ - review_comments: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments - */ - review_comments_url: string - /** - * @description State of this Pull Request. Either `open` or `closed`. - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - statuses_url: string - /** - * @description The title of the pull request. - * @example Amazing new feature - */ - title: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Pull Request Merge Result - * @description Pull Request Merge Result - */ - 'pull-request-merge-result': { - merged: boolean - message: string - sha: string - } - /** Pull Request Minimal */ - 'pull-request-minimal': { - base: { - ref: string - repo: { - id: number - name: string - url: string - } - sha: string - } - head: { - ref: string - repo: { - id: number - name: string - url: string - } - sha: string - } - id: number - number: number - url: string - } - /** - * Pull Request Review - * @description Pull Request Reviews are reviews on pull requests. - */ - 'pull-request-review': { - _links: { - html: { - href: string - } - pull_request: { - href: string - } - } - author_association: components['schemas']['author_association'] - /** - * @description The text of the review. - * @example This looks great. - */ - body: string - body_html?: string - body_text?: string - /** - * @description A commit SHA for the review. - * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 - */ - commit_id: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - */ - html_url: string - /** - * @description Unique identifier of the review - * @example 42 - */ - id: number - /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 - */ - pull_request_url: string - /** @example CHANGES_REQUESTED */ - state: string - /** Format: date-time */ - submitted_at?: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Pull Request Review Comment - * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. - */ - 'pull-request-review-comment': { - _links: { - html: { - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 - */ - href: string - } - pull_request: { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 - */ - href: string - } - self: { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 - */ - href: string - } - } - author_association: components['schemas']['author_association'] - /** - * @description The text of the comment. - * @example We should probably include a check for null values here. - */ - body: string - /** @example "

comment body

" */ - body_html?: string - /** @example "comment body" */ - body_text?: string - /** - * @description The SHA of the commit to which the comment applies. - * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - commit_id: string - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - created_at: string - /** - * @description The diff of the line that the comment refers to. - * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... - */ - diff_hunk: string - /** - * Format: uri - * @description HTML URL for the pull request review comment. - * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 - */ - html_url: string - /** - * @description The ID of the pull request review comment. - * @example 1 - */ - id: number - /** - * @description The comment ID to reply to. - * @example 8 - */ - in_reply_to_id?: number - /** - * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment - * @example 2 - */ - line?: number - /** - * @description The node ID of the pull request review comment. - * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw - */ - node_id: string - /** - * @description The SHA of the original commit to which the comment applies. - * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 - */ - original_commit_id: string - /** - * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment - * @example 2 - */ - original_line?: number - /** - * @description The index of the original line in the diff to which the comment applies. - * @example 4 - */ - original_position: number - /** - * @description The first line of the range for a multi-line comment. - * @example 2 - */ - original_start_line?: number | null - /** - * @description The relative path of the file to which the comment applies. - * @example config/database.yaml - */ - path: string - /** - * @description The line index in the diff to which the comment applies. - * @example 1 - */ - position: number - /** - * @description The ID of the pull request review to which the comment belongs. - * @example 42 - */ - pull_request_review_id: number | null - /** - * Format: uri - * @description URL for the pull request that the review comment belongs to. - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 - */ - pull_request_url: string - reactions?: components['schemas']['reaction-rollup'] - /** - * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment - * @default RIGHT - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** - * @description The first line of the range for a multi-line comment. - * @example 2 - */ - start_line?: number | null - /** - * @description The side of the first line of the range for a multi-line comment. - * @default RIGHT - * @enum {string|null} - */ - start_side?: ('LEFT' | 'RIGHT') | null - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - updated_at: string - /** - * @description URL for the pull request review comment - * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 - */ - url: string - user: components['schemas']['simple-user'] - } - /** - * Pull Request Review Request - * @description Pull Request Review Request - */ - 'pull-request-review-request': { - teams: components['schemas']['team'][] - users: components['schemas']['simple-user'][] - } - /** - * Pull Request Simple - * @description Pull Request Simple - */ - 'pull-request-simple': { - _links: { - comments: components['schemas']['link'] - commits: components['schemas']['link'] - html: components['schemas']['link'] - issue: components['schemas']['link'] - review_comment: components['schemas']['link'] - review_comments: components['schemas']['link'] - self: components['schemas']['link'] - statuses: components['schemas']['link'] - } - /** @example too heated */ - active_lock_reason?: string | null - assignee: components['schemas']['nullable-simple-user'] - assignees?: components['schemas']['simple-user'][] | null - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] - base: { - label: string - ref: string - repo: components['schemas']['repository'] - sha: string - user: components['schemas']['nullable-simple-user'] - } - /** @example Please pull these awesome changes */ - body: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - closed_at: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments - */ - comments_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits - */ - commits_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347.diff - */ - diff_url: string - /** - * @description Indicates whether or not the pull request is a draft. - * @example false - */ - draft?: boolean - head: { - label: string - ref: string - repo: components['schemas']['repository'] - sha: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347 - */ - html_url: string - /** @example 1 */ - id: number - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 - */ - issue_url: string - labels: { - color: string - default: boolean - description: string - /** Format: int64 */ - id: number - name: string - node_id: string - url: string - }[] - /** @example true */ - locked: boolean - /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ - merge_commit_sha: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - merged_at: string | null - milestone: components['schemas']['nullable-milestone'] - /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ - node_id: string - /** @example 1347 */ - number: number - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1347.patch - */ - patch_url: string - requested_reviewers?: components['schemas']['simple-user'][] | null - requested_teams?: components['schemas']['team'][] | null - /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ - review_comment_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments - */ - review_comments_url: string - /** @example open */ - state: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e - */ - statuses_url: string - /** @example new-feature */ - title: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** Rate Limit */ - 'rate-limit': { - limit: number - remaining: number - reset: number - used: number - } - /** - * Rate Limit Overview - * @description Rate Limit Overview - */ - 'rate-limit-overview': { - rate: components['schemas']['rate-limit'] - resources: { - actions_runner_registration?: components['schemas']['rate-limit'] - code_scanning_upload?: components['schemas']['rate-limit'] - core: components['schemas']['rate-limit'] - graphql?: components['schemas']['rate-limit'] - integration_manifest?: components['schemas']['rate-limit'] - scim?: components['schemas']['rate-limit'] - search: components['schemas']['rate-limit'] - source_import?: components['schemas']['rate-limit'] - } - } - /** - * Reaction - * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. - */ - reaction: { - /** - * @description The reaction to use - * @example heart - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** - * Format: date-time - * @example 2016-05-20T20:09:31Z - */ - created_at: string - /** @example 1 */ - id: number - /** @example MDg6UmVhY3Rpb24x */ - node_id: string - user: components['schemas']['nullable-simple-user'] - } - /** Reaction Rollup */ - 'reaction-rollup': { - '-1': number - '+1': number - confused: number - eyes: number - heart: number - hooray: number - laugh: number - rocket: number - total_count: number - /** Format: uri */ - url: string - } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - 'referrer-traffic': { - /** @example 4 */ - count: number - /** @example Google */ - referrer: string - /** @example 3 */ - uniques: number - } - /** - * Release - * @description A release. - */ - release: { - assets: components['schemas']['release-asset'][] - /** Format: uri */ - assets_url: string - author: components['schemas']['simple-user'] - body?: string | null - body_html?: string - body_text?: string - /** Format: date-time */ - created_at: string - /** - * Format: uri - * @description The URL of the release discussion. - */ - discussion_url?: string - /** - * @description true to create a draft (unpublished) release, false to create a published one. - * @example false - */ - draft: boolean - /** Format: uri */ - html_url: string - id: number - mentions_count?: number - name: string | null - node_id: string - /** - * @description Whether to identify the release as a prerelease or a full release. - * @example false - */ - prerelease: boolean - /** Format: date-time */ - published_at: string | null - reactions?: components['schemas']['reaction-rollup'] - /** - * @description The name of the tag. - * @example v1.0.0 - */ - tag_name: string - /** Format: uri */ - tarball_url: string | null - /** - * @description Specifies the commitish value that determines where the Git tag is created from. - * @example master - */ - target_commitish: string - upload_url: string - /** Format: uri */ - url: string - /** Format: uri */ - zipball_url: string | null - } - /** - * Release Asset - * @description Data related to a release. - */ - 'release-asset': { - /** Format: uri */ - browser_download_url: string - content_type: string - /** Format: date-time */ - created_at: string - download_count: number - id: number - label: string | null - /** - * @description The file name of the asset. - * @example Team Environment - */ - name: string - node_id: string - size: number - /** - * @description State of the release asset. - * @enum {string} - */ - state: 'uploaded' | 'open' - /** Format: date-time */ - updated_at: string - uploader: components['schemas']['nullable-simple-user'] - /** Format: uri */ - url: string - } - /** - * Generated Release Notes Content - * @description Generated name and body describing a release - */ - 'release-notes-content': { - /** @description The generated body describing the contents of the release supporting markdown formatting */ - body: string - /** - * @description The generated name of the release - * @example Release v1.0.0 is now available! - */ - name: string - } - /** - * Removed from Project Issue Event - * @description Removed from Project Issue Event - */ - 'removed-from-project-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - project_card?: { - column_name: string - id: number - previous_column_name?: string - project_id: number - /** Format: uri */ - project_url: string - /** Format: uri */ - url: string - } - url: string - } - /** - * Renamed Issue Event - * @description Renamed Issue Event - */ - 'renamed-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - rename: { - from: string - to: string - } - url: string - } - /** - * Repo Search Result Item - * @description Repo Search Result Item - */ - 'repo-search-result-item': { - allow_auto_merge?: boolean - allow_forking?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - archive_url: string - archived: boolean - assignees_url: string - blobs_url: string - branches_url: string - clone_url: string - collaborators_url: string - comments_url: string - commits_url: string - compare_url: string - contents_url: string - /** Format: uri */ - contributors_url: string - /** Format: date-time */ - created_at: string - default_branch: string - delete_branch_on_merge?: boolean - /** Format: uri */ - deployments_url: string - description: string | null - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** Format: uri */ - downloads_url: string - /** Format: uri */ - events_url: string - fork: boolean - forks: number - forks_count: number - /** Format: uri */ - forks_url: string - full_name: string - git_commits_url: string - git_refs_url: string - git_tags_url: string - git_url: string - has_downloads: boolean - has_issues: boolean - has_pages: boolean - has_projects: boolean - has_wiki: boolean - /** Format: uri */ - homepage: string | null - /** Format: uri */ - hooks_url: string - /** Format: uri */ - html_url: string - id: number - is_template?: boolean - issue_comment_url: string - issue_events_url: string - issues_url: string - keys_url: string - labels_url: string - language: string | null - /** Format: uri */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** Format: uri */ - merges_url: string - milestones_url: string - /** Format: uri */ - mirror_url: string | null - name: string - node_id: string - notifications_url: string - open_issues: number - open_issues_count: number - owner: components['schemas']['nullable-simple-user'] - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - private: boolean - pulls_url: string - /** Format: date-time */ - pushed_at: string - releases_url: string - score: number - size: number - ssh_url: string - stargazers_count: number - /** Format: uri */ - stargazers_url: string - statuses_url: string - /** Format: uri */ - subscribers_url: string - /** Format: uri */ - subscription_url: string - /** Format: uri */ - svn_url: string - /** Format: uri */ - tags_url: string - /** Format: uri */ - teams_url: string - temp_clone_token?: string - text_matches?: components['schemas']['search-result-text-matches'] - topics?: string[] - trees_url: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - /** @description The repository visibility: public, private, or internal. */ - visibility?: string - watchers: number - watchers_count: number - } - /** - * Repository - * @description A git repository - */ - repository: { - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - allow_rebase_merge?: boolean - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** - * @description Whether the repository is archived. - * @default false - */ - archived: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string | null - /** - * @description The default branch of the repository. - * @example master - */ - default_branch: string - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - forks: number - /** @example 9 */ - forks_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** - * @description Whether downloads are enabled. - * @default true - * @example true - */ - has_downloads: boolean - /** - * @description Whether issues are enabled. - * @default true - * @example true - */ - has_issues: boolean - has_pages: boolean - /** - * @description Whether projects are enabled. - * @default true - * @example true - */ - has_projects: boolean - /** - * @description Whether the wiki is enabled. - * @default true - * @example true - */ - has_wiki: boolean - /** - * Format: uri - * @example https://github.com - */ - homepage: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** - * @description Unique identifier of the repository - * @example 42 - */ - id: number - /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true - */ - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World - */ - mirror_url: string | null - /** - * @description The name of the repository. - * @example Team Environment - */ - name: string - network_count?: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - open_issues: number - /** @example 0 */ - open_issues_count: number - organization?: components['schemas']['nullable-simple-user'] - owner: components['schemas']['simple-user'] - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - /** - * @description Whether the repository is private or public. - * @default false - */ - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at: string | null - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example 108 */ - size: number - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string - /** @example 80 */ - stargazers_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - subscribers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example https://svn.github.com/octocat/Hello-World - */ - svn_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - visibility?: string - watchers_count?: number - } | null - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** - * @description The repository visibility: public, private, or internal. - * @default public - */ - visibility?: string - watchers: number - /** @example 80 */ - watchers_count: number - } - /** - * Repository Collaborator Permission - * @description Repository Collaborator Permission - */ - 'repository-collaborator-permission': { - permission: string - /** @example admin */ - role_name: string - user: components['schemas']['nullable-collaborator'] - } - /** - * Repository Invitation - * @description Repository invitations let you manage who you collaborate with. - */ - 'repository-invitation': { - /** - * Format: date-time - * @example 2016-06-13T14:52:50-05:00 - */ - created_at: string - /** @description Whether or not the invitation has expired */ - expired?: boolean - /** @example https://github.com/octocat/Hello-World/invitations */ - html_url: string - /** - * @description Unique identifier of the repository invitation. - * @example 42 - */ - id: number - invitee: components['schemas']['nullable-simple-user'] - inviter: components['schemas']['nullable-simple-user'] - node_id: string - /** - * @description The permission associated with the invitation. - * @example read - * @enum {string} - */ - permissions: 'read' | 'write' | 'admin' | 'triage' | 'maintain' - repository: components['schemas']['minimal-repository'] - /** - * @description URL for the repository invitation - * @example https://api.github.com/user/repository-invitations/1 - */ - url: string - } - /** - * Repository Invitation - * @description Repository invitations let you manage who you collaborate with. - */ - 'repository-subscription': { - /** - * Format: date-time - * @example 2012-10-06T21:34:12Z - */ - created_at: string - /** @description Determines if all notifications should be blocked from this repository. */ - ignored: boolean - reason: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example - */ - repository_url: string - /** - * @description Determines if notifications should be received from this repository. - * @example true - */ - subscribed: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/example/subscription - */ - url: string - } - /** - * Legacy Review Comment - * @description Legacy Review Comment - */ - 'review-comment': { - _links: { - html: components['schemas']['link'] - pull_request: components['schemas']['link'] - self: components['schemas']['link'] - } - author_association: components['schemas']['author_association'] - /** @example Great stuff */ - body: string - body_html?: string - body_text?: string - /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ - commit_id: string - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - created_at: string - /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ - diff_hunk: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 - */ - html_url: string - /** @example 10 */ - id: number - /** @example 8 */ - in_reply_to_id?: number - /** - * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment - * @example 2 - */ - line?: number - /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ - node_id: string - /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ - original_commit_id: string - /** - * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment - * @example 2 - */ - original_line?: number - /** @example 4 */ - original_position: number - /** - * @description The original first line of the range for a multi-line comment. - * @example 2 - */ - original_start_line?: number | null - /** @example file1.txt */ - path: string - /** @example 1 */ - position: number | null - /** @example 42 */ - pull_request_review_id: number | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 - */ - pull_request_url: string - reactions?: components['schemas']['reaction-rollup'] - /** - * @description The side of the first line of the range for a multi-line comment. - * @default RIGHT - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** - * @description The first line of the range for a multi-line comment. - * @example 2 - */ - start_line?: number | null - /** - * @description The side of the first line of the range for a multi-line comment. - * @default RIGHT - * @enum {string|null} - */ - start_side?: ('LEFT' | 'RIGHT') | null - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 - */ - url: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Review Dismissed Issue Event - * @description Review Dismissed Issue Event - */ - 'review-dismissed-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - dismissed_review: { - dismissal_commit_id?: string - dismissal_message: string | null - review_id: number - state: string - } - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Review Request Removed Issue Event - * @description Review Request Removed Issue Event - */ - 'review-request-removed-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - requested_reviewer?: components['schemas']['simple-user'] - requested_team?: components['schemas']['team'] - review_requester: components['schemas']['simple-user'] - url: string - } - /** - * Review Requested Issue Event - * @description Review Requested Issue Event - */ - 'review-requested-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - requested_reviewer?: components['schemas']['simple-user'] - requested_team?: components['schemas']['team'] - review_requester: components['schemas']['simple-user'] - url: string - } - /** - * Self hosted runners - * @description A self hosted runner - */ - runner: { - busy: boolean - /** - * @description The id of the runner. - * @example 5 - */ - id: number - labels: components['schemas']['runner-label'][] - /** - * @description The name of the runner. - * @example iMac - */ - name: string - /** - * @description The Operating System of the runner. - * @example macos - */ - os: string - /** - * @description The status of the runner. - * @example online - */ - status: string - } - /** - * Runner Application - * @description Runner Application - */ - 'runner-application': { - architecture: string - download_url: string - filename: string - os: string - sha256_checksum?: string - /** @description A short lived bearer token used to download the runner, if needed. */ - temp_download_token?: string - } - 'runner-groups-enterprise': { - allows_public_repositories: boolean - default: boolean - id: number - name: string - runners_url: string - selected_organizations_url?: string - visibility: string - } - 'runner-groups-org': { - allows_public_repositories: boolean - default: boolean - id: number - inherited: boolean - inherited_allows_public_repositories?: boolean - name: string - runners_url: string - /** @description Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ - selected_repositories_url?: string - visibility: string - } - /** - * Self hosted runner label - * @description A label for a self hosted runner - */ - 'runner-label': { - /** @description Unique identifier of the label. */ - id?: number - /** @description Name of the label. */ - name: string - /** - * @description The type of label. Read-only labels are applied automatically when the runner is configured. - * @enum {string} - */ - type?: 'read-only' | 'custom' - } - 'scim-enterprise-group': { - displayName?: string - externalId?: string | null - id: string - members?: { - $ref?: string - display?: string - value?: string - }[] - meta?: { - created?: string - lastModified?: string - location?: string - resourceType?: string - } - schemas: string[] - } - 'scim-enterprise-user': { - active?: boolean - emails?: { - primary?: boolean - type?: string - value?: string - }[] - externalId?: string - groups?: { - value?: string - }[] - id: string - meta?: { - created?: string - lastModified?: string - location?: string - resourceType?: string - } - name?: { - familyName?: string - givenName?: string - } - schemas: string[] - userName?: string - } - /** - * Scim Error - * @description Scim Error - */ - 'scim-error': { - detail?: string | null - documentation_url?: string | null - message?: string | null - schemas?: string[] - scimType?: string | null - status?: number - } - 'scim-group-list-enterprise': { - itemsPerPage: number - Resources: { - displayName?: string - externalId?: string | null - id: string - members?: { - $ref?: string - display?: string - value?: string - }[] - meta?: { - created?: string - lastModified?: string - location?: string - resourceType?: string - } - schemas: string[] - }[] - schemas: string[] - startIndex: number - totalResults: number - } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - 'scim-user': { - /** - * @description The active status of the User. - * @example true - */ - active: boolean - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string | null - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - primary?: boolean - value: string - }[] - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - externalId: string | null - /** @description associated groups */ - groups?: { - display?: string - value?: string - }[] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - id: string - meta: { - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - location?: string - /** @example User */ - resourceType?: string - } - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - familyName: string | null - formatted?: string | null - givenName: string | null - } - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - operations?: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: string | { [key: string]: unknown } | unknown[] - }[] - /** @description The ID of the organization. */ - organization_id?: number - /** @description SCIM schema used. */ - schemas: string[] - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string | null - } - /** - * SCIM User List - * @description SCIM User List - */ - 'scim-user-list': { - /** @example 10 */ - itemsPerPage: number - Resources: components['schemas']['scim-user'][] - /** @description SCIM schema used. */ - schemas: string[] - /** @example 1 */ - startIndex: number - /** @example 3 */ - totalResults: number - } - 'scim-user-list-enterprise': { - itemsPerPage: number - Resources: { - active?: boolean - emails?: { - primary?: boolean - type?: string - value?: string - }[] - externalId?: string - groups?: { - value?: string - }[] - id: string - meta?: { - created?: string - lastModified?: string - location?: string - resourceType?: string - } - name?: { - familyName?: string - givenName?: string - } - schemas: string[] - userName?: string - }[] - schemas: string[] - startIndex: number - totalResults: number - } - /** Search Result Text Matches */ - 'search-result-text-matches': { - fragment?: string - matches?: { - indices?: number[] - text?: string - }[] - object_type?: string | null - object_url?: string - property?: string - }[] - 'secret-scanning-alert': { - created_at?: components['schemas']['alert-created-at'] - html_url?: components['schemas']['alert-html-url'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - locations_url?: string - number?: components['schemas']['alert-number'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - resolved_at?: string | null - resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The secret that was detected. */ - secret?: string - /** @description The type of secret that secret scanning detected. */ - secret_type?: string - state?: components['schemas']['secret-scanning-alert-state'] - url?: components['schemas']['alert-url'] - } - /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. - * @enum {string|null} - */ - 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null - /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. - * @enum {string} - */ - 'secret-scanning-alert-state': 'open' | 'resolved' - 'secret-scanning-location': { - details: components['schemas']['secret-scanning-location-commit'] - /** - * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. - * @example commit - * @enum {string} - */ - type: 'commit' - } - /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ - 'secret-scanning-location-commit': { - /** - * @description SHA-1 hash ID of the associated blob - * @example af5626b4a114abcb82d63db7c8082c3c4756e51b - */ - blob_sha: string - /** @description The API URL to get the associated blob resource */ - blob_url: string - /** - * @description SHA-1 hash ID of the associated commit - * @example af5626b4a114abcb82d63db7c8082c3c4756e51b - */ - commit_sha: string - /** @description The API URL to get the associated commit resource */ - commit_url: string - /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ - end_column: number - /** @description Line number at which the secret ends in the file */ - end_line: number - /** - * @description The file path in the repository - * @example /example/secrets.txt - */ - path: string - /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ - start_column: number - /** @description Line number at which the secret starts in the file */ - start_line: number - } - 'selected-actions': { - /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed?: boolean - /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed?: string[] - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed?: boolean - } - /** @description The API URL to use to get or set the actions that are allowed to run, when `allowed_actions` is set to `selected`. */ - 'selected-actions-url': string - /** - * Short Blob - * @description Short Blob - */ - 'short-blob': { - sha: string - url: string - } - /** - * Short Branch - * @description Short Branch - */ - 'short-branch': { - commit: { - sha: string - /** Format: uri */ - url: string - } - name: string - protected: boolean - protection?: components['schemas']['branch-protection'] - /** Format: uri */ - protection_url?: string - } - /** - * Simple Commit - * @description Simple Commit - */ - 'simple-commit': { - author: { - email: string - name: string - } | null - committer: { - email: string - name: string - } | null - id: string - message: string - /** Format: date-time */ - timestamp: string - tree_id: string - } - /** Simple Commit Status */ - 'simple-commit-status': { - /** Format: uri */ - avatar_url: string | null - context: string - /** Format: date-time */ - created_at: string - description: string | null - id: number - node_id: string - required?: boolean | null - state: string - /** Format: uri */ - target_url: string - /** Format: date-time */ - updated_at: string - /** Format: uri */ - url: string - } - /** - * Simple User - * @description Simple User - */ - 'simple-user': { - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - email?: string | null - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** @example 1 */ - id: number - /** @example octocat */ - login: string - name?: string | null - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** @example User */ - type: string - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - } - /** - * Stargazer - * @description Stargazer - */ - stargazer: { - /** Format: date-time */ - starred_at: string - user: components['schemas']['nullable-simple-user'] - } - /** - * Starred Repository - * @description Starred Repository - */ - 'starred-repository': { - repo: components['schemas']['repository'] - /** Format: date-time */ - starred_at: string - } - /** - * Status - * @description The status of a commit. - */ - status: { - avatar_url: string | null - context: string - created_at: string - creator: components['schemas']['nullable-simple-user'] - description: string - id: number - node_id: string - state: string - target_url: string - updated_at: string - url: string - } - /** - * Status Check Policy - * @description Status Check Policy - */ - 'status-check-policy': { - checks: { - app_id: number | null - /** @example continuous-integration/travis-ci */ - context: string - }[] - /** - * @example [ - * "continuous-integration/travis-ci" - * ] - */ - contexts: string[] - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts - */ - contexts_url: string - /** @example true */ - strict: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks - */ - url: string - } - /** - * Tag - * @description Tag - */ - tag: { - commit: { - sha: string - /** Format: uri */ - url: string - } - /** @example v0.1 */ - name: string - node_id: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/tarball/v0.1 - */ - tarball_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/zipball/v0.1 - */ - zipball_url: string - } - /** - * Team - * @description Groups of organization members that gives permissions on specified repositories. - */ - team: { - description: string | null - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - id: number - members_url: string - name: string - node_id: string - parent: components['schemas']['nullable-team-simple'] - permission: string - permissions?: { - admin: boolean - maintain: boolean - pull: boolean - push: boolean - triage: boolean - } - privacy?: string - /** Format: uri */ - repositories_url: string - slug: string - /** Format: uri */ - url: string - } - /** - * Team Discussion - * @description A team discussion is a persistent record of a free-form conversation within a team. - */ - 'team-discussion': { - author: components['schemas']['nullable-simple-user'] - /** - * @description The main text of the discussion. - * @example Please suggest improvements to our workflow in comments. - */ - body: string - /** @example

Hi! This is an area for us to collaborate as a team

*/ - body_html: string - /** - * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. - * @example 0307116bbf7ced493b8d8a346c650b71 - */ - body_version: string - /** @example 0 */ - comments_count: number - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments - */ - comments_url: string - /** - * Format: date-time - * @example 2018-01-25T18:56:31Z - */ - created_at: string - /** - * Format: uri - * @example https://github.com/orgs/github/teams/justice-league/discussions/1 - */ - html_url: string - /** Format: date-time */ - last_edited_at: string | null - /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ - node_id: string - /** - * @description The unique sequence number of a team discussion. - * @example 42 - */ - number: number - /** - * @description Whether or not this discussion should be pinned for easy retrieval. - * @example true - */ - pinned: boolean - /** - * @description Whether or not this discussion should be restricted to team members and organization administrators. - * @example true - */ - private: boolean - reactions?: components['schemas']['reaction-rollup'] - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/2343027 - */ - team_url: string - /** - * @description The title of the discussion. - * @example How can we improve our workflow? - */ - title: string - /** - * Format: date-time - * @example 2018-01-25T18:56:31Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/2343027/discussions/1 - */ - url: string - } - /** - * Team Discussion Comment - * @description A reply to a discussion within a team. - */ - 'team-discussion-comment': { - author: components['schemas']['nullable-simple-user'] - /** - * @description The main text of the comment. - * @example I agree with this suggestion. - */ - body: string - /** @example

Do you like apples?

*/ - body_html: string - /** - * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. - * @example 0307116bbf7ced493b8d8a346c650b71 - */ - body_version: string - /** - * Format: date-time - * @example 2018-01-15T23:53:58Z - */ - created_at: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/2403582/discussions/1 - */ - discussion_url: string - /** - * Format: uri - * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 - */ - html_url: string - /** Format: date-time */ - last_edited_at: string | null - /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ - node_id: string - /** - * @description The unique sequence number of a team discussion comment. - * @example 42 - */ - number: number - reactions?: components['schemas']['reaction-rollup'] - /** - * Format: date-time - * @example 2018-01-15T23:53:58Z - */ - updated_at: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 - */ - url: string - } - /** - * Full Team - * @description Groups of organization members that gives permissions on specified repositories. - */ - 'team-full': { - /** - * Format: date-time - * @example 2017-07-14T16:53:42Z - */ - created_at: string - /** @example A great team. */ - description: string | null - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - /** - * @description Unique identifier of the team - * @example 42 - */ - id: number - /** - * @description Distinguished Name (DN) that team maps to within LDAP environment - * @example uid=example,ou=users,dc=github,dc=com - */ - ldap_dn?: string - /** @example 3 */ - members_count: number - /** @example https://api.github.com/organizations/1/team/1/members{/member} */ - members_url: string - /** - * @description Name of the team - * @example Developers - */ - name: string - /** @example MDQ6VGVhbTE= */ - node_id: string - organization: components['schemas']['organization-full'] - parent?: components['schemas']['nullable-team-simple'] - /** - * @description Permission that the team will have for its repositories - * @example push - */ - permission: string - /** - * @description The level of privacy this team should have - * @example closed - * @enum {string} - */ - privacy?: 'closed' | 'secret' - /** @example 10 */ - repos_count: number - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/1/repos - */ - repositories_url: string - /** @example justice-league */ - slug: string - /** - * Format: date-time - * @example 2017-08-17T12:37:15Z - */ - updated_at: string - /** - * Format: uri - * @description URL for the team - * @example https://api.github.com/organizations/1/team/1 - */ - url: string - } - /** - * Team Membership - * @description Team Membership - */ - 'team-membership': { - /** - * @description The role of the user in the team. - * @default member - * @example member - * @enum {string} - */ - role: 'member' | 'maintainer' - /** - * @description The state of the user's membership in the team. - * @enum {string} - */ - state: 'active' | 'pending' - /** Format: uri */ - url: string - } - /** - * Team Project - * @description A team's access to a project. - */ - 'team-project': { - body: string | null - columns_url: string - created_at: string - creator: components['schemas']['simple-user'] - html_url: string - id: number - name: string - node_id: string - number: number - /** @description The organization permission for this project. Only present when owner is an organization. */ - organization_permission?: string - owner_url: string - permissions: { - admin: boolean - read: boolean - write: boolean - } - /** @description Whether the project is private or not. Only present when owner is an organization. */ - private?: boolean - state: string - updated_at: string - url: string - } - /** - * Team Repository - * @description A team's access to a repository. - */ - 'team-repository': { - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to allow forking this repo - * @default false - * @example false - */ - allow_forking?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - allow_rebase_merge?: boolean - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** - * @description Whether the repository is archived. - * @default false - */ - archived: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string | null - /** - * @description The default branch of the repository. - * @example master - */ - default_branch: string - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** @example This your first repo! */ - description: string | null - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - fork: boolean - forks: number - /** @example 9 */ - forks_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example octocat/Hello-World */ - full_name: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** - * @description Whether downloads are enabled. - * @default true - * @example true - */ - has_downloads: boolean - /** - * @description Whether issues are enabled. - * @default true - * @example true - */ - has_issues: boolean - has_pages: boolean - /** - * @description Whether projects are enabled. - * @default true - * @example true - */ - has_projects: boolean - /** - * @description Whether the wiki is enabled. - * @default true - * @example true - */ - has_wiki: boolean - /** - * Format: uri - * @example https://github.com - */ - homepage: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** - * @description Unique identifier of the repository - * @example 42 - */ - id: number - /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true - */ - is_template?: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - language: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - license: components['schemas']['nullable-license-simple'] - master_branch?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World - */ - mirror_url: string | null - /** - * @description The name of the repository. - * @example Team Environment - */ - name: string - network_count?: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - open_issues: number - /** @example 0 */ - open_issues_count: number - owner: components['schemas']['nullable-simple-user'] - permissions?: { - admin: boolean - maintain?: boolean - pull: boolean - push: boolean - triage?: boolean - } - /** - * @description Whether the repository is private or public. - * @default false - */ - private: boolean - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at: string | null - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example admin */ - role_name?: string - /** @example 108 */ - size: number - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string - /** @example 80 */ - stargazers_count: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - subscribers_count?: number - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example https://svn.github.com/octocat/Hello-World - */ - svn_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - temp_clone_token?: string - template_repository?: components['schemas']['nullable-repository'] - topics?: string[] - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at: string | null - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** - * @description The repository visibility: public, private, or internal. - * @default public - */ - visibility?: string - watchers: number - /** @example 80 */ - watchers_count: number - } - /** - * Team Simple - * @description Groups of organization members that gives permissions on specified repositories. - */ - 'team-simple': { - /** - * @description Description of the team - * @example A great team. - */ - description: string | null - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - /** - * @description Unique identifier of the team - * @example 1 - */ - id: number - /** - * @description Distinguished Name (DN) that team maps to within LDAP environment - * @example uid=example,ou=users,dc=github,dc=com - */ - ldap_dn?: string - /** @example https://api.github.com/organizations/1/team/1/members{/member} */ - members_url: string - /** - * @description Name of the team - * @example Justice League - */ - name: string - /** @example MDQ6VGVhbTE= */ - node_id: string - /** - * @description Permission that the team will have for its repositories - * @example admin - */ - permission: string - /** - * @description The level of privacy this team should have - * @example closed - */ - privacy?: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/1/repos - */ - repositories_url: string - /** @example justice-league */ - slug: string - /** - * Format: uri - * @description URL for the team - * @example https://api.github.com/organizations/1/team/1 - */ - url: string - } - /** - * Thread - * @description Thread - */ - thread: { - id: string - last_read_at: string | null - reason: string - repository: components['schemas']['minimal-repository'] - subject: { - latest_comment_url: string - title: string - type: string - url: string - } - /** @example https://api.github.com/notifications/threads/2/subscription */ - subscription_url: string - unread: boolean - updated_at: string - url: string - } - /** - * Thread Subscription - * @description Thread Subscription - */ - 'thread-subscription': { - /** - * Format: date-time - * @example 2012-10-06T21:34:12Z - */ - created_at: string | null - ignored: boolean - reason: string | null - /** - * Format: uri - * @example https://api.github.com/repos/1 - */ - repository_url?: string - /** @example true */ - subscribed: boolean - /** - * Format: uri - * @example https://api.github.com/notifications/threads/1 - */ - thread_url?: string - /** - * Format: uri - * @example https://api.github.com/notifications/threads/1/subscription - */ - url: string - } - /** - * Timeline Assigned Issue Event - * @description Timeline Assigned Issue Event - */ - 'timeline-assigned-issue-event': { - actor: components['schemas']['simple-user'] - assignee: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Timeline Comment Event - * @description Timeline Comment Event - */ - 'timeline-comment-event': { - actor: components['schemas']['simple-user'] - author_association: components['schemas']['author_association'] - /** - * @description Contents of the issue comment - * @example What version of Safari were you using when you observed this bug? - */ - body?: string - body_html?: string - body_text?: string - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - created_at: string - event: string - /** Format: uri */ - html_url: string - /** - * @description Unique identifier of the issue comment - * @example 42 - */ - id: number - /** Format: uri */ - issue_url: string - node_id: string - performed_via_github_app?: components['schemas']['nullable-integration'] - reactions?: components['schemas']['reaction-rollup'] - /** - * Format: date-time - * @example 2011-04-14T16:00:49Z - */ - updated_at: string - /** - * Format: uri - * @description URL for the issue comment - * @example https://api.github.com/repositories/42/issues/comments/1 - */ - url: string - user: components['schemas']['simple-user'] - } - /** - * Timeline Commit Commented Event - * @description Timeline Commit Commented Event - */ - 'timeline-commit-commented-event': { - comments?: components['schemas']['commit-comment'][] - commit_id?: string - event?: string - node_id?: string - } - /** - * Timeline Committed Event - * @description Timeline Committed Event - */ - 'timeline-committed-event': { - /** @description Identifying information for the git-user */ - author: { - /** - * Format: date-time - * @description Timestamp of the commit - * @example 2014-08-09T08:02:04+12:00 - */ - date: string - /** - * @description Git email address of the user - * @example monalisa.octocat@example.com - */ - email: string - /** - * @description Name of the git user - * @example Monalisa Octocat - */ - name: string - } - /** @description Identifying information for the git-user */ - committer: { - /** - * Format: date-time - * @description Timestamp of the commit - * @example 2014-08-09T08:02:04+12:00 - */ - date: string - /** - * @description Git email address of the user - * @example monalisa.octocat@example.com - */ - email: string - /** - * @description Name of the git user - * @example Monalisa Octocat - */ - name: string - } - event?: string - /** Format: uri */ - html_url: string - /** - * @description Message describing the purpose of the commit - * @example Fix #42 - */ - message: string - node_id: string - parents: { - /** Format: uri */ - html_url: string - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - /** Format: uri */ - url: string - }[] - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - tree: { - /** - * @description SHA for the commit - * @example 7638417db6d59f3c431d3e1f261cc637155684cd - */ - sha: string - /** Format: uri */ - url: string - } - /** Format: uri */ - url: string - verification: { - payload: string | null - reason: string - signature: string | null - verified: boolean - } - } - /** - * Timeline Cross Referenced Event - * @description Timeline Cross Referenced Event - */ - 'timeline-cross-referenced-event': { - actor?: components['schemas']['simple-user'] - /** Format: date-time */ - created_at: string - event: string - source: { - issue?: components['schemas']['issue'] - type?: string - } - /** Format: date-time */ - updated_at: string - } - /** - * Timeline Event - * @description Timeline Event - */ - 'timeline-issue-events': - | components['schemas']['labeled-issue-event'] - | components['schemas']['unlabeled-issue-event'] - | components['schemas']['milestoned-issue-event'] - | components['schemas']['demilestoned-issue-event'] - | components['schemas']['renamed-issue-event'] - | components['schemas']['review-requested-issue-event'] - | components['schemas']['review-request-removed-issue-event'] - | components['schemas']['review-dismissed-issue-event'] - | components['schemas']['locked-issue-event'] - | components['schemas']['added-to-project-issue-event'] - | components['schemas']['moved-column-in-project-issue-event'] - | components['schemas']['removed-from-project-issue-event'] - | components['schemas']['converted-note-to-issue-issue-event'] - | components['schemas']['timeline-comment-event'] - | components['schemas']['timeline-cross-referenced-event'] - | components['schemas']['timeline-committed-event'] - | components['schemas']['timeline-reviewed-event'] - | components['schemas']['timeline-line-commented-event'] - | components['schemas']['timeline-commit-commented-event'] - | components['schemas']['timeline-assigned-issue-event'] - | components['schemas']['timeline-unassigned-issue-event'] - /** - * Timeline Line Commented Event - * @description Timeline Line Commented Event - */ - 'timeline-line-commented-event': { - comments?: components['schemas']['pull-request-review-comment'][] - event?: string - node_id?: string - } - /** - * Timeline Reviewed Event - * @description Timeline Reviewed Event - */ - 'timeline-reviewed-event': { - _links: { - html: { - href: string - } - pull_request: { - href: string - } - } - author_association: components['schemas']['author_association'] - /** - * @description The text of the review. - * @example This looks great. - */ - body: string | null - body_html?: string - body_text?: string - /** - * @description A commit SHA for the review. - * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 - */ - commit_id: string - event: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - */ - html_url: string - /** - * @description Unique identifier of the review - * @example 42 - */ - id: number - /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 - */ - pull_request_url: string - /** @example CHANGES_REQUESTED */ - state: string - /** Format: date-time */ - submitted_at?: string - user: components['schemas']['simple-user'] - } - /** - * Timeline Unassigned Issue Event - * @description Timeline Unassigned Issue Event - */ - 'timeline-unassigned-issue-event': { - actor: components['schemas']['simple-user'] - assignee: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Topic - * @description A topic aggregates entities that are related to a subject. - */ - topic: { - names: string[] - } - /** - * Topic Search Result Item - * @description Topic Search Result Item - */ - 'topic-search-result-item': { - aliases?: - | { - topic_relation?: { - id?: number - name?: string - relation_type?: string - topic_id?: number - } - }[] - | null - /** Format: date-time */ - created_at: string - created_by: string | null - curated: boolean - description: string | null - display_name: string | null - featured: boolean - /** Format: uri */ - logo_url?: string | null - name: string - related?: - | { - topic_relation?: { - id?: number - name?: string - relation_type?: string - topic_id?: number - } - }[] - | null - released: string | null - repository_count?: number | null - score: number - short_description: string | null - text_matches?: components['schemas']['search-result-text-matches'] - /** Format: date-time */ - updated_at: string - } - /** Traffic */ - traffic: { - count: number - /** Format: date-time */ - timestamp: string - uniques: number - } - /** - * Unassigned Issue Event - * @description Unassigned Issue Event - */ - 'unassigned-issue-event': { - actor: components['schemas']['simple-user'] - assignee: components['schemas']['simple-user'] - assigner: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * Unlabeled Issue Event - * @description Unlabeled Issue Event - */ - 'unlabeled-issue-event': { - actor: components['schemas']['simple-user'] - commit_id: string | null - commit_url: string | null - created_at: string - event: string - id: number - label: { - color: string - name: string - } - node_id: string - performed_via_github_app: components['schemas']['nullable-integration'] - url: string - } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - 'user-marketplace-purchase': { - account: components['schemas']['marketplace-account'] - /** @example monthly */ - billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - next_billing_date: string | null - /** @example true */ - on_free_trial: boolean - plan: components['schemas']['marketplace-listing-plan'] - unit_count: number | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - updated_at: string | null - } - /** - * User Search Result Item - * @description User Search Result Item - */ - 'user-search-result-item': { - /** Format: uri */ - avatar_url: string - bio?: string | null - blog?: string | null - company?: string | null - /** Format: date-time */ - created_at?: string - /** Format: email */ - email?: string | null - events_url: string - followers?: number - /** Format: uri */ - followers_url: string - following?: number - following_url: string - gists_url: string - gravatar_id: string | null - hireable?: boolean | null - /** Format: uri */ - html_url: string - id: number - location?: string | null - login: string - name?: string | null - node_id: string - /** Format: uri */ - organizations_url: string - public_gists?: number - public_repos?: number - /** Format: uri */ - received_events_url: string - /** Format: uri */ - repos_url: string - score: number - site_admin: boolean - starred_url: string - /** Format: uri */ - subscriptions_url: string - /** Format: date-time */ - suspended_at?: string | null - text_matches?: components['schemas']['search-result-text-matches'] - type: string - /** Format: date-time */ - updated_at?: string - /** Format: uri */ - url: string - } - /** - * Validation Error - * @description Validation Error - */ - 'validation-error': { - documentation_url: string - errors?: { - code: string - field?: string - index?: number - message?: string - resource?: string - value?: (string | null) | (number | null) | (string[] | null) - }[] - message: string - } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - 'validation-error-simple': { - documentation_url: string - errors?: string[] - message: string - } - /** Verification */ - verification: { - payload: string | null - reason: string - signature: string | null - verified: boolean - } - /** - * View Traffic - * @description View Traffic - */ - 'view-traffic': { - /** @example 14850 */ - count: number - /** @example 3782 */ - uniques: number - views: components['schemas']['traffic'][] - } - /** - * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). - * @example 30 - */ - 'wait-timer': number - /** - * Webhook Configuration - * @description Configuration object of the webhook - */ - 'webhook-config': { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - url?: components['schemas']['webhook-config-url'] - } - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - 'webhook-config-content-type': string - 'webhook-config-insecure-ssl': string | number - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - 'webhook-config-secret': string - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - 'webhook-config-url': string - /** - * Workflow - * @description A GitHub Actions workflow - */ - workflow: { - /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ - badge_url: string - /** - * Format: date-time - * @example 2019-12-06T14:20:20.000Z - */ - created_at: string - /** - * Format: date-time - * @example 2019-12-06T14:20:20.000Z - */ - deleted_at?: string - /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ - html_url: string - /** @example 5 */ - id: number - /** @example CI */ - name: string - /** @example MDg6V29ya2Zsb3cxMg== */ - node_id: string - /** @example ruby.yaml */ - path: string - /** - * @example active - * @enum {string} - */ - state: 'active' | 'deleted' | 'disabled_fork' | 'disabled_inactivity' | 'disabled_manually' - /** - * Format: date-time - * @example 2019-12-06T14:20:20.000Z - */ - updated_at: string - /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ - url: string - } - /** - * Workflow Run - * @description An invocation of a workflow - */ - 'workflow-run': { - /** - * @description The URL to the artifacts for the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts - */ - artifacts_url: string - /** - * @description The URL to cancel the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel - */ - cancel_url: string - /** - * @description The ID of the associated check suite. - * @example 42 - */ - check_suite_id?: number - /** - * @description The node ID of the associated check suite. - * @example MDEwOkNoZWNrU3VpdGU0Mg== - */ - check_suite_node_id?: string - /** - * @description The URL to the associated check suite. - * @example https://api.github.com/repos/github/hello-world/check-suites/12 - */ - check_suite_url: string - /** @example neutral */ - conclusion: string | null - /** Format: date-time */ - created_at: string - /** @example push */ - event: string - /** @example master */ - head_branch: string | null - head_commit: components['schemas']['nullable-simple-commit'] - head_repository: components['schemas']['minimal-repository'] - /** @example 5 */ - head_repository_id?: number - /** - * @description The SHA of the head commit that points to the version of the worflow being run. - * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d - */ - head_sha: string - /** @example https://github.com/github/hello-world/suites/4 */ - html_url: string - /** - * @description The ID of the workflow run. - * @example 5 - */ - id: number - /** - * @description The URL to the jobs for the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs - */ - jobs_url: string - /** - * @description The URL to download the logs for the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs - */ - logs_url: string - /** - * @description The name of the workflow run. - * @example Build - */ - name?: string | null - /** @example MDEwOkNoZWNrU3VpdGU1 */ - node_id: string - /** - * @description The URL to the previous attempted run of this workflow, if one exists. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 - */ - previous_attempt_url?: string | null - pull_requests: components['schemas']['pull-request-minimal'][] | null - repository: components['schemas']['minimal-repository'] - /** - * @description The URL to rerun the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun - */ - rerun_url: string - /** - * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. - * @example 1 - */ - run_attempt?: number - /** - * @description The auto incrementing run number for the workflow run. - * @example 106 - */ - run_number: number - /** - * Format: date-time - * @description The start time of the latest run. Resets on re-run. - */ - run_started_at?: string - /** @example completed */ - status: string | null - /** Format: date-time */ - updated_at: string - /** - * @description The URL to the workflow run. - * @example https://api.github.com/repos/github/hello-world/actions/runs/5 - */ - url: string - /** - * @description The ID of the parent workflow. - * @example 5 - */ - workflow_id: number - /** - * @description The URL to the workflow. - * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml - */ - workflow_url: string - } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - 'workflow-run-usage': { - billable: { - MACOS?: { - job_runs?: { - duration_ms: number - job_id: number - }[] - jobs: number - total_ms: number - } - UBUNTU?: { - job_runs?: { - duration_ms: number - job_id: number - }[] - jobs: number - total_ms: number - } - WINDOWS?: { - job_runs?: { - duration_ms: number - job_id: number - }[] - jobs: number - total_ms: number - } - } - run_duration_ms?: number - } - /** - * Workflow Usage - * @description Workflow Usage - */ - 'workflow-usage': { - billable: { - MACOS?: { - total_ms?: number - } - UBUNTU?: { - total_ms?: number - } - WINDOWS?: { - total_ms?: number - } - } - } - } - responses: { - /** Accepted */ - accepted: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response */ - actions_runner_labels: { - content: { - 'application/json': { - labels: components['schemas']['runner-label'][] - total_count: number - } - } - } - /** Response */ - actions_runner_labels_readonly: { - content: { - 'application/json': { - labels: components['schemas']['runner-label'][] - total_count: number - } - } - } - /** Bad Request */ - bad_request: { - content: { - 'application/json': components['schemas']['basic-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Response if GitHub Advanced Security is not enabled for this repository */ - code_scanning_forbidden_read: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ - code_scanning_forbidden_write: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Conflict */ - conflict: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Forbidden */ - forbidden: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Forbidden Gist */ - forbidden_gist: { - content: { - 'application/json': { - block?: { - created_at?: string - html_url?: string | null - reason?: string - } - documentation_url?: string - message?: string - } - } - } - /** Found */ - found: unknown - /** Gone */ - gone: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Internal Error */ - internal_error: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Moved permanently */ - moved_permanently: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** A header with no content is returned. */ - no_content: unknown - /** Resource not found */ - not_found: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Not modified */ - not_modified: unknown - /** Preview header missing */ - preview_header_missing: { - content: { - 'application/json': { - documentation_url: string - message: string - } - } - } - /** Requires authentication */ - requires_authentication: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Bad Request */ - scim_bad_request: { - content: { - 'application/json': components['schemas']['scim-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Conflict */ - scim_conflict: { - content: { - 'application/json': components['schemas']['scim-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Forbidden */ - scim_forbidden: { - content: { - 'application/json': components['schemas']['scim-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Internal Error */ - scim_internal_error: { - content: { - 'application/json': components['schemas']['scim-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Resource not found */ - scim_not_found: { - content: { - 'application/json': components['schemas']['scim-error'] - 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Service unavailable */ - service_unavailable: { - content: { - 'application/json': { - code?: string - documentation_url?: string - message?: string - } - } - } - /** Temporary Redirect */ - temporary_redirect: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - /** Validation failed */ - validation_failed: { - content: { - 'application/json': components['schemas']['validation-error'] - } - } - /** Validation failed */ - validation_failed_simple: { - content: { - 'application/json': components['schemas']['validation-error-simple'] - } - } - } - parameters: { - /** @description account_id parameter */ - 'account-id': number - /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor: string - /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - 'alert-number': components['schemas']['alert-number'] - /** @description If `true`, show notifications marked as read. */ - all: boolean - 'app-slug': string - /** @description artifact_id parameter */ - 'artifact-id': number - /** @description asset_id parameter */ - 'asset-id': number - /** @description The attempt number of the workflow run. */ - 'attempt-number': number - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - 'audit-log-before': string - /** - * @description The event types to include: - * - * - `web` - returns web (non-Git) events. - * - `git` - returns Git events. - * - `all` - returns both web and Git events. - * - * The default is `web`. - */ - 'audit-log-include': 'web' | 'git' | 'all' - /** - * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - 'audit-log-order': 'desc' | 'asc' - /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - 'audit-log-phrase': string - /** @description authorization_id parameter */ - 'authorization-id': number - /** @description autolink_id parameter */ - 'autolink-id': number - /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - before: string - /** @description The name of the branch. */ - branch: string - /** @description card_id parameter */ - 'card-id': number - /** @description Returns check runs with the specified `name`. */ - 'check-name': string - /** @description check_run_id parameter */ - 'check-run-id': number - /** @description check_suite_id parameter */ - 'check-suite-id': number - /** @description The client ID of your GitHub app. */ - 'client-id': string - /** @description The name of the codespace. */ - 'codespace-name': string - /** @description column_id parameter */ - 'column-id': number - /** @description comment_id parameter */ - 'comment-id': number - 'comment-number': number - /** @description commit_sha parameter */ - 'commit-sha': string - /** @description Used for pagination: the number of results to return. */ - count: number - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ - created: string - /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor: string - 'delivery-id': number - /** @description deployment_id parameter */ - 'deployment-id': number - /** @description One of `asc` (ascending) or `desc` (descending). */ - direction: 'asc' | 'desc' - 'discussion-number': number - /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: string - /** @description The name of the environment */ - 'environment-name': string - /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event: string - /** @description If `true` pull requests are omitted from the response (empty array). */ - 'exclude-pull-requests': boolean - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - 'export-id': string - /** @description gist_id parameter */ - 'gist-id': string - /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - 'git-ref': components['schemas']['code-scanning-ref'] - /** @description gpg_key_id parameter */ - 'gpg-key-id': number - /** @description grant_id parameter */ - 'grant-id': number - /** @description group_id parameter */ - 'group-id': number - 'hook-id': number - /** @description installation_id parameter */ - 'installation-id': number - /** @description invitation_id parameter */ - 'invitation-id': number - /** @description issue_number parameter */ - 'issue-number': number - /** @description job_id parameter */ - 'job-id': number - /** @description key_id parameter */ - 'key-id': number - /** @description A list of comma separated label names. Example: `bug,ui,@high` */ - labels: string - /** @description migration_id parameter */ - 'migration-id': number - /** @description milestone_number parameter */ - 'milestone-number': number - /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order: 'desc' | 'asc' - org: string - /** @description Unique identifier of an organization. */ - 'org-id': number - owner: string - /** @description The name of the package. */ - 'package-name': string - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description Unique identifier of the package version. */ - 'package-version-id': number - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - 'package-visibility': 'public' | 'private' | 'internal' - /** @description Page number of the results to fetch. */ - page: number - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - 'pagination-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - 'pagination-before': string - /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ - participating: boolean - /** @description Must be one of: `day`, `week`. */ - per: '' | 'day' | 'week' - /** @description Results per page (max 100) */ - 'per-page': number - /** @description plan_id parameter */ - 'plan-id': number - 'project-id': number - 'pull-number': number - 'reaction-id': number - /** @description release_id parameter */ - 'release-id': number - repo: string - /** @description repo_name parameter */ - 'repo-name': string - 'repository-id': number - /** @description ID of the Repository to filter on */ - 'repository-id-in-query': number - /** @description review_id parameter */ - 'review-id': number - /** @description The id of the workflow run. */ - 'run-id': number - /** @description Unique identifier of the self-hosted runner group. */ - 'runner-group-id': number - /** @description Unique identifier of the self-hosted runner. */ - 'runner-id': number - /** @description The name of a self-hosted runner's custom label. */ - 'runner-label-name': string - /** @description Identifier generated by the GitHub SCIM endpoint. */ - 'scim-group-id': string - /** @description scim_user_id parameter */ - 'scim-user-id': string - /** @description secret_name parameter */ - 'secret-name': string - /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - 'secret-scanning-alert-resolution': string - /** - * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - 'secret-scanning-alert-secret-type': string - /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - 'secret-scanning-alert-state': 'open' | 'resolved' - /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since: string - /** @description An organization ID. Only return organizations with an ID greater than this ID. */ - 'since-org': number - /** @description A repository ID. Only return repositories with an ID greater than this ID. */ - 'since-repo': number - /** @description A user ID. Only return users with an ID greater than this ID. */ - 'since-user': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: 'created' | 'updated' - /** @description Used for pagination: the index of the first result to return. */ - 'start-index': number - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status: 'queued' | 'in_progress' | 'completed' - 'team-id': number - /** @description team_slug parameter */ - 'team-slug': string - /** @description thread_id parameter */ - 'thread-id': number - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - username: string - /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ - 'workflow-id': number | string - /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - 'workflow-run-branch': string - /** @description Returns workflow runs with the `check_suite_id` that you specify. */ - 'workflow-run-check-suite-id': number - /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - 'workflow-run-status': - | 'completed' - | 'action_required' - | 'cancelled' - | 'failure' - | 'neutral' - | 'skipped' - | 'stale' - | 'success' - | 'timed_out' - | 'in_progress' - | 'queued' - | 'requested' - | 'waiting' - } - headers: { - 'content-type'?: string - link?: string - location?: string - 'x-common-marker-version'?: string - 'x-rate-limit-limit'?: number - 'x-rate-limit-remaining'?: number - 'x-rate-limit-reset'?: number - } -} - -export interface operations { - /** Get Hypermedia links to resources accessible in GitHub's REST API */ - 'meta/root': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - /** Format: uri-template */ - authorizations_url: string - /** Format: uri-template */ - code_search_url: string - /** Format: uri-template */ - commit_search_url: string - /** Format: uri-template */ - current_user_authorizations_html_url: string - /** Format: uri-template */ - current_user_repositories_url: string - /** Format: uri-template */ - current_user_url: string - /** Format: uri-template */ - emails_url: string - /** Format: uri-template */ - emojis_url: string - /** Format: uri-template */ - events_url: string - /** Format: uri-template */ - feeds_url: string - /** Format: uri-template */ - followers_url: string - /** Format: uri-template */ - following_url: string - /** Format: uri-template */ - gists_url: string - /** Format: uri-template */ - hub_url: string - /** Format: uri-template */ - issue_search_url: string - /** Format: uri-template */ - issues_url: string - /** Format: uri-template */ - keys_url: string - /** Format: uri-template */ - label_search_url: string - /** Format: uri-template */ - notifications_url: string - /** Format: uri-template */ - organization_repositories_url: string - /** Format: uri-template */ - organization_teams_url: string - /** Format: uri-template */ - organization_url: string - /** Format: uri-template */ - public_gists_url: string - /** Format: uri-template */ - rate_limit_url: string - /** Format: uri-template */ - repository_search_url: string - /** Format: uri-template */ - repository_url: string - /** Format: uri-template */ - starred_gists_url: string - /** Format: uri-template */ - starred_url: string - /** Format: uri-template */ - topic_search_url?: string - /** Format: uri-template */ - user_organizations_url: string - /** Format: uri-template */ - user_repositories_url: string - /** Format: uri-template */ - user_search_url: string - /** Format: uri-template */ - user_url: string - } - } - } - } - } - /** - * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'] - } - } - } - } - /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ - 'apps/create-from-manifest': { - parameters: { - path: { - code: string - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['integration'] & - ({ - client_id: string - client_secret: string - pem: string - webhook_secret: string | null - } & { [key: string]: unknown }) - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - } - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/update-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - url?: components['schemas']['webhook-config-url'] - } - } - } - } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/list-webhook-deliveries': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-delivery': { - parameters: { - path: { - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery'] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/redeliver-webhook-delivery': { - parameters: { - path: { - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * - * The permissions the installation has are included under the `permissions` key. - */ - 'apps/list-installations': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - outdated?: string - } - } - responses: { - /** The permissions the installation has are included under the `permissions` key. */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['installation'][] - } - } - } - } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/delete-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/create-installation-access-token': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['installation-token'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - permissions?: components['schemas']['app-permissions'] - /** @description List of repository names that the token should have access to */ - repositories?: string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - } - } - } - } - /** - * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/suspend-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Removes a GitHub App installation suspension. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/unsuspend-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - 'apps/delete-authorization': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string - } - } - } - } - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/check-token': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['authorization'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string - } - } - } - } - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - 'apps/delete-token': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string - } - } - } - } - /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/reset-token': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string - } - } - } - } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/scope-token': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['authorization'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string - permissions?: components['schemas']['app-permissions'] - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number - } - } - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. - */ - 'oauth-authorizations/list-grants': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['application-grant'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 'oauth-authorizations/get-grant': { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['application-grant'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - 'oauth-authorizations/delete-grant': { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/get-by-slug': { - parameters: { - path: { - app_slug: components['parameters']['app-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 'oauth-authorizations/list-authorizations': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['authorization'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - 'oauth-authorizations/create-authorization': { - parameters: {} - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth app client key for which to create the token. */ - client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - } - } - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 'oauth-authorizations/get-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['authorization'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 'oauth-authorizations/delete-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * You can only send one of these scope keys at a time. - */ - 'oauth-authorizations/update-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A list of scopes to add to this authorization. */ - add_scopes?: string[] - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A list of scopes to remove from this authorization. */ - remove_scopes?: string[] - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - } - } - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - */ - 'oauth-authorizations/get-or-create-authorization-for-app': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - } - } - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - */ - 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - fingerprint: string - } - } - responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - /** Response if returning a new token */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - } - } - } - } - 'codes-of-conduct/get-all-codes-of-conduct': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'][] - } - } - 304: components['responses']['not_modified'] - } - } - 'codes-of-conduct/get-conduct-code': { - parameters: { - path: { - key: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'] - } - } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - } - } - /** Lists all the emojis available to use on GitHub. */ - 'emojis/get': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': { [key: string]: string } - } - } - 304: components['responses']['not_modified'] - } - } - /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-github-actions-permissions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-enterprise-permissions'] - } - } - } - } - /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-github-actions-permissions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled_organizations: components['schemas']['enabled-organizations'] - } - } - } - } - /** - * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - organizations: components['schemas']['organization-simple'][] - total_count: number - } - } - } - } - } - /** - * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[] - } - } - } - } - /** - * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-allowed-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - } - /** - * Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-allowed-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - /** - * Lists all self-hosted runner groups for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - runner_groups: components['schemas']['runner-groups-enterprise'][] - total_count: number - } - } - } - } - } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean - /** @description Name of the runner group. */ - name: string - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[] - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - visibility?: 'selected' | 'all' - } - } - } - } - /** - * Gets a specific self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - } - /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean - /** @description Name of the runner group. */ - name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' - } - } - } - } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - organizations: components['schemas']['organization-simple'][] - total_count: number - } - } - } - } - } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: number[] - } - } - } - } - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - runners: components['schemas']['runner'][] - total_count: number - } - } - } - } - } - /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] - } - } - } - } - /** - * Adds a self-hosted runner to a runner group configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. - */ - 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - runners?: components['schemas']['runner'][] - total_count?: number - } - } - } - } - } - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner'] - } - } - } - } - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - } - } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } - } - } - } - /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } - } - } - } - /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-runner-applications-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } - } - } - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` - */ - 'enterprise-admin/create-registration-token-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'enterprise-admin/create-remove-token-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - 'enterprise-admin/get-audit-log': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - phrase?: components['parameters']['audit-log-phrase'] - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events. - * - `git` - returns Git events. - * - `all` - returns both web and Git events. - * - * The default is `web`. - */ - include?: components['parameters']['audit-log-include'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['audit-log-after'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['audit-log-before'] - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - order?: components['parameters']['audit-log-order'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['audit-log-event'][] - } - } - } - } - /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - */ - 'secret-scanning/list-alerts-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] - } - } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - 'billing/get-github-actions-billing-ghe': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - 'billing/get-github-advanced-security-billing-ghe': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Success */ - 200: { - content: { - 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - } - } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - 'billing/get-github-packages-billing-ghe': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - 'billing/get-shared-storage-billing-ghe': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ - 'activity/list-public-events': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 503: components['responses']['service_unavailable'] - } - } - /** - * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: - * - * * **Timeline**: The GitHub global public timeline - * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) - * * **Current user public**: The public timeline for the authenticated user - * * **Current user**: The private timeline for the authenticated user - * * **Current user actor**: The private timeline for activity created by the authenticated user - * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. - * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. - * - * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. - */ - 'activity/get-feeds': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['feed'] - } - } - } - } - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - 'gists/list': { - parameters: { - query: { - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - } - } - /** - * Allows you to add a new gist with one or more files. - * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. - */ - 'gists/create': { - parameters: {} - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Description of the gist - * @example Example Ruby script - */ - description?: string - /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } - */ - files: { - [key: string]: { - /** @description Content of the file */ - content: string - } - } - public?: boolean | ('true' | 'false') - } - } - } - } - 'gists/get': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] - } - } - 'gists/delete': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ - 'gists/update': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Description of the gist - * @example Example Ruby script - */ - description?: string - /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } - */ - files?: { [key: string]: { [key: string]: unknown } } - } | null - } - } - } - 'gists/get-revision': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - sha: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'gists/list-comments': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['gist-comment'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/create-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['gist-comment'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } - } - } - 'gists/get-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] - } - } - 'gists/delete-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/update-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } - } - } - 'gists/list-commits': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['gist-commit'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/list-forks': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['gist-simple'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - 'gists/fork': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['base-gist'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'gists/check-is-starred': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response if gist is starred */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - 404: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'gists/star': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/unstar': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * List public gists sorted by most recently updated to least recently updated. - * - * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. - */ - 'gists/list-public': { - parameters: { - query: { - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - } - /** List the authenticated user's starred gists: */ - 'gists/list-starred': { - parameters: { - query: { - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ - 'gitignore/get-all-templates': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': string[] - } - } - 304: components['responses']['not_modified'] - } - } - /** - * The API also allows fetching the source of a single template. - * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. - */ - 'gitignore/get-template': { - parameters: { - path: { - name: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gitignore-template'] - } - } - 304: components['responses']['not_modified'] - } - } - /** - * List repositories that an app installation can access. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/list-repos-accessible-to-installation': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - repositories: components['schemas']['repository'][] - /** @example selected */ - repository_selection?: string - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Revokes the installation token you're using to authenticate as an installation and access this endpoint. - * - * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. - * - * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/revoke-installation-access-token': { - parameters: {} - responses: { - /** Response */ - 204: never - } - } - /** - * List issues assigned to the authenticated user across all visible repositories including owned repositories, member - * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not - * necessarily assigned to you. - * - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/list': { - parameters: { - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - collab?: boolean - orgs?: boolean - owned?: boolean - pulls?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'licenses/get-all-commonly-used': { - parameters: { - query: { - featured?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['license-simple'][] - } - } - 304: components['responses']['not_modified'] - } - } - 'licenses/get': { - parameters: { - path: { - license: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['license'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'markdown/render': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: { - 'Content-Length'?: string - } - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] - } - requestBody: { - content: { - 'application/json': { - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - context?: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - mode?: 'markdown' | 'gfm' - /** @description The Markdown text to render in HTML. */ - text: string - } - } - } - } - /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - 'markdown/render-raw': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] - } - requestBody: { - content: { - 'text/plain': string - 'text/x-markdown': string - } - } - } - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/get-subscription-plan-for-account': { - parameters: { - path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/list-plans': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] - } - } - 401: components['responses']['requires_authentication'] - 404: components['responses']['not_found'] - } - } - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/list-accounts-for-plan': { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] - } - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-purchase'][] - } - } - 401: components['responses']['requires_authentication'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/get-subscription-plan-for-account-stubbed': { - parameters: { - path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: unknown - } - } - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/list-plans-stubbed': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] - } - } - 401: components['responses']['requires_authentication'] - } - } - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - 'apps/list-accounts-for-plan-stubbed': { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] - } - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-purchase'][] - } - } - 401: components['responses']['requires_authentication'] - } - } - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ - 'meta/get': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['api-overview'] - } - } - 304: components['responses']['not_modified'] - } - } - 'activity/list-public-events-for-repo-network': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - 301: components['responses']['moved_permanently'] - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** List all notifications for the current user, sorted by most recently updated. */ - 'activity/list-notifications-for-authenticated-user': { - parameters: { - query: { - /** If `true`, show notifications marked as read. */ - all?: components['parameters']['all'] - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - participating?: components['parameters']['participating'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - before?: components['parameters']['before'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['thread'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - } - /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - 'activity/mark-notifications-as-read': { - parameters: {} - responses: { - /** Response */ - 202: { - content: { - 'application/json': { - message?: string - } - } - } - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. - */ - last_read_at?: string - /** @description Whether the notification has been read. */ - read?: boolean - } - } - } - } - 'activity/get-thread': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'activity/mark-thread-as-read': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - } - } - /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). - * - * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. - */ - 'activity/get-thread-subscription-for-authenticated-user': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread-subscription'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. - * - * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. - * - * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. - */ - 'activity/set-thread-subscription': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread-subscription'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether to block all notifications from a thread. - * @default false - */ - ignored?: boolean - } - } - } - } - /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ - 'activity/delete-thread-subscription': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** Get the octocat as ASCII art */ - 'meta/get-octocat': { - parameters: { - query: { - /** The words to show in Octocat's speech bubble */ - s?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/octocat-stream': string - } - } - } - } - /** - * Lists all organizations, in the order that they were created on GitHub. - * - * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. - */ - 'orgs/list': { - parameters: { - query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - since?: components['parameters']['since-org'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['organization-simple'][] - } - } - 304: components['responses']['not_modified'] - } - } - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/list-linked-external-idp-groups-to-team-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['external-groups'] - } - } - } - } - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - 'orgs/list-custom-roles': { - parameters: { - path: { - organization_id: string - } - } - responses: { - /** Response - list of custom role names */ - 200: { - content: { - 'application/json': { - custom_roles?: components['schemas']['organization-custom-repository-role'][] - /** - * @description The number of custom roles in this organization - * @example 3 - */ - total_count?: number - } - } - } - } - } - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - 'orgs/get': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-full'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). - * - * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. - */ - 'orgs/update': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-full'] - } - } - 409: components['responses']['conflict'] - /** Validation failed */ - 422: { - content: { - 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string - /** @example "http://github.blog" */ - blog?: string - /** @description The company name. */ - company?: string - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description The description of the company. */ - description?: string - /** @description The publicly visible email address. */ - email?: string - /** @description Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean - /** @description The location. */ - location?: string - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_public_pages?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_repositories?: boolean - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false - */ - members_can_fork_private_repositories?: boolean - /** @description The shorthand name of the company. */ - name?: string - /** @description The Twitter username of the company. */ - twitter_username?: string - } - } - } - } - /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-organization-permissions'] - } - } - } - } - /** - * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-github-actions-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled_repositories: components['schemas']['enabled-repositories'] - } - } - } - } - /** - * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/list-selected-repositories-enabled-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - repositories: components['schemas']['repository'][] - total_count: number - } - } - } - } - } - /** - * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-selected-repositories-enabled-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[] - } - } - } - } - /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/enable-selected-repository-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/disable-selected-repository-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-allowed-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - } - /** - * Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." - * - * If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-allowed-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-get-default-workflow-permissions'] - } - } - } - } - /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['actions-set-default-workflow-permissions'] - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-self-hosted-runner-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - runner_groups: components['schemas']['runner-groups-org'][] - total_count: number - } - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Creates a new self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/create-self-hosted-runner-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['runner-groups-org'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean - /** @description Name of the runner group. */ - name: string - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[] - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Gets a specific self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/get-self-hosted-runner-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-org'] - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Deletes a self-hosted runner group for an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/delete-self-hosted-runner-group-from-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/update-self-hosted-runner-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-org'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists the repositories with access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-repo-access-to-self-hosted-runner-group-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - repositories: components['schemas']['minimal-repository'][] - total_count: number - } - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/set-repo-access-to-self-hosted-runner-group-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: number[] - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Lists self-hosted runners that are in a specific organization group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-self-hosted-runners-in-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - runners: components['schemas']['runner'][] - total_count: number - } - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * Replaces the list of self-hosted runners that are part of an organization runner group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/set-self-hosted-runners-in-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] - } - } - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Adds a self-hosted runner to a runner group configured in an organization. - * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. - */ - 'actions/add-self-hosted-runner-to-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-self-hosted-runner-from-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-self-hosted-runners-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - runners: components['schemas']['runner'][] - total_count: number - } - } - } - } - } - /** - * Gets a specific self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/get-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner'] - } - } - } - } - /** - * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/delete-self-hosted-runner-from-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all labels for a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-labels-for-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - } - } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/set-custom-labels-for-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } - } - } - } - /** - * Add custom labels to a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/add-custom-labels-to-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } - } - } - } - /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - } - } - /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-custom-label-from-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-runner-applications-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } - } - } - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` - */ - 'actions/create-registration-token-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'actions/create-remove-token-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/list-org-secrets': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['organization-actions-secret'][] - total_count: number - } - } - } - } - } - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/get-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-actions-secret'] - } - } - } - } - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] - /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - } - } - } - } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/delete-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/list-selected-repos-for-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - repositories: components['schemas']['minimal-repository'][] - total_count: number - } - } - } - } - } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/set-selected-repos-for-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] - } - } - } - } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/add-selected-repo-to-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown - } - } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/remove-selected-repo-from-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** Response when repository was removed from the selected list */ - 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/get-org-public-key': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-public-key'] - } - } - } - } - /** - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - */ - 'orgs/get-audit-log': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - phrase?: components['parameters']['audit-log-phrase'] - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events. - * - `git` - returns Git events. - * - `all` - returns both web and Git events. - * - * The default is `web`. - */ - include?: components['parameters']['audit-log-include'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['audit-log-after'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['audit-log-before'] - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - order?: components['parameters']['audit-log-order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['audit-log-event'][] - } - } - } - } - /** List the users blocked by an organization. */ - 'orgs/list-blocked-users': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 415: components['responses']['preview_header_missing'] - } - } - 'orgs/check-blocked-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** If the user is blocked: */ - 204: never - /** If the user is not blocked: */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - 'orgs/block-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - } - 'orgs/unblock-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - 'code-scanning/list-alerts-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - sort?: 'created' | 'updated' - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['code-scanning-organization-alert-items'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - 'orgs/list-saml-sso-authorizations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - login?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['credential-authorization'][] - } - } - } - } - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - 'orgs/remove-saml-sso-authorization': { - parameters: { - path: { - org: components['parameters']['org'] - credential_id: number - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-org-secrets': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['organization-dependabot-secret'][] - total_count: number - } - } - } - } - } - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-dependabot-secret'] - } - } - } - } - /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'dependabot/create-or-update-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] - /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - } - } - } - } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/delete-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-selected-repos-for-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - repositories: components['schemas']['minimal-repository'][] - total_count: number - } - } - } - } - } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/set-selected-repos-for-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] - } - } - } - } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/add-selected-repo-to-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown - } - } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/remove-selected-repo-from-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** Response when repository was removed from the selected list */ - 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-public-key': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['dependabot-public-key'] - } - } - } - } - 'activity/list-public-org-events': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/external-idp-group-info-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** group_id parameter */ - group_id: components['parameters']['group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['external-group'] - } - } - } - } - /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/list-external-idp-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list to groups containing the text in the group name */ - display_name?: string - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['external-groups'] - } - } - } - } - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - 'orgs/list-failed-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - 404: components['responses']['not_found'] - } - } - 'orgs/list-webhooks': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['org-hook'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Here's how you can create a hook that posts payloads in JSON format: */ - 'orgs/create-webhook': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['org-hook'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ - config: { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - /** @example "password" */ - password?: string - secret?: components['schemas']['webhook-config-secret'] - url: components['schemas']['webhook-config-url'] - /** @example "kdaigle" */ - username?: string - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Must be passed as "web". */ - name: string - } - } - } - } - /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ - 'orgs/get-webhook': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-hook'] - } - } - 404: components['responses']['not_found'] - } - } - 'orgs/delete-webhook': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ - 'orgs/update-webhook': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-hook'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ - config?: { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - url: components['schemas']['webhook-config-url'] - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @example "web" */ - name?: string - } - } - } - } - /** - * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. - */ - 'orgs/get-webhook-config-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - } - /** - * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." - * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. - */ - 'orgs/update-webhook-config-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - url?: components['schemas']['webhook-config-url'] - } - } - } - } - /** Returns a list of webhook deliveries for a webhook configured in an organization. */ - 'orgs/list-webhook-deliveries': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Returns a delivery for a webhook configured in an organization. */ - 'orgs/get-webhook-delivery': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery'] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Redeliver a delivery for a webhook configured in an organization. */ - 'orgs/redeliver-webhook-delivery': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'orgs/ping-webhook': { - parameters: { - path: { - org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-org-installation': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - } - } - /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ - 'orgs/list-app-installations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - installations: components['schemas']['installation'][] - total_count: number - } - } - } - } - } - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - 'interactions/set-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - 'interactions/remove-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - 'orgs/list-pending-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'orgs/create-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['organization-invitation'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - email?: string - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - invitee_id?: number - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: number[] - } - } - } - } - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - 'orgs/cancel-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - 'orgs/list-invitation-teams': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * List issues in an organization assigned to the authenticated user. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/list-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 404: components['responses']['not_found'] - } - } - /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ - 'orgs/list-members': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Filter members returned in the list. Can be one of: - * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. - * \* `all` - All members the authenticated user can see. - */ - filter?: '2fa_disabled' | 'all' - /** - * Filter members returned by their role. Can be one of: - * \* `all` - All members of the organization, regardless of role. - * \* `admin` - Organization owners. - * \* `member` - Non-owner organization members. - */ - role?: 'all' | 'admin' | 'member' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - /** Response if requester is not an organization member */ - 302: never - 422: components['responses']['validation_failed'] - } - } - /** Check if a user is, publicly or privately, a member of the organization. */ - 'orgs/check-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if requester is an organization member and user is a member */ - 204: never - /** Response if requester is not an organization member */ - 302: never - /** Not Found if requester is an organization member and user is not a member */ - 404: unknown - } - } - /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ - 'orgs/remove-member': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - } - } - /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ - 'orgs/get-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-membership'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Only authenticated organization owners can add a member to the organization or update the member's role. - * - * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. - * - * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. - * - * **Rate limits** - * - * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. - */ - 'orgs/set-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-membership'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The role to give the user in the organization. Can be one of: - * \* `admin` - The user will become an owner of the organization. - * \* `member` - The user will become a non-owner member of the organization. - * @default member - * @enum {string} - */ - role?: 'admin' | 'member' - } - } - } - } - /** - * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - * - * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. - */ - 'orgs/remove-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists the most recent migrations. */ - 'migrations/list-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Exclude attributes from the API response to improve performance */ - exclude?: 'repositories'[] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['migration'][] - } - } - } - } - /** Initiates the generation of a migration archive. */ - 'migrations/start-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['migration'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - exclude?: 'repositories'[] - /** - * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). - * @default false - * @example true - */ - exclude_attachments?: boolean - /** - * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. - * @default false - * @example true - */ - exclude_owner_projects?: boolean - /** - * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). - * @default false - * @example true - */ - exclude_releases?: boolean - /** - * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. - * @default false - * @example true - */ - lock_repositories?: boolean - /** @description A list of arrays indicating which repositories should be migrated. */ - repositories: string[] - } - } - } - } - /** - * Fetches the status of a migration. - * - * The `state` of a migration can be one of the following values: - * - * * `pending`, which means the migration hasn't started yet. - * * `exporting`, which means the migration is in progress. - * * `exported`, which means the migration finished successfully. - * * `failed`, which means the migration failed. - */ - 'migrations/get-status-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Exclude attributes from the API response to improve performance */ - exclude?: 'repositories'[] - } - } - responses: { - /** - * * `pending`, which means the migration hasn't started yet. - * * `exporting`, which means the migration is in progress. - * * `exported`, which means the migration finished successfully. - * * `failed`, which means the migration failed. - */ - 200: { - content: { - 'application/json': components['schemas']['migration'] - } - } - 404: components['responses']['not_found'] - } - } - /** Fetches the URL to a migration archive. */ - 'migrations/download-archive-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 302: never - 404: components['responses']['not_found'] - } - } - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - 'migrations/delete-archive-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - 'migrations/unlock-repo-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** List all the repositories for this organization migration. */ - 'migrations/list-repos-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** List all users who are outside collaborators of an organization. */ - 'orgs/list-outside-collaborators': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. - */ - filter?: '2fa_disabled' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ - 'orgs/convert-member-to-outside-collaborator': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** User is getting converted asynchronously */ - 202: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** User was converted */ - 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ - 403: unknown - 404: components['responses']['not_found'] - } - } - /** Removing a user from this list will remove them from all the organization's repositories. */ - 'orgs/remove-outside-collaborator': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - /** Unprocessable Entity if user is a member of the organization */ - 422: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - } - } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-organization': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-organization': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-organization': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/list-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['project'][] - } - } - 422: components['responses']['validation_failed_simple'] - } - } - /** Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/create-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The description of the project. */ - body?: string - /** @description The name of the project. */ - name: string - } - } - } - } - /** Members of an organization can choose to have their membership publicized or not. */ - 'orgs/list-public-members': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - 'orgs/check-public-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a public member */ - 204: never - /** Not Found if user is not a public member */ - 404: unknown - } - } - /** - * The user can publicize their own membership. (A user cannot publicize the membership for another user.) - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'orgs/set-public-membership-for-authenticated-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - } - } - 'orgs/remove-public-membership-for-authenticated-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Lists repositories for the specified organization. */ - 'repos/list-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ - type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ - sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - } - } - /** - * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. - * @default false - */ - allow_auto_merge?: boolean - /** - * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - * @default true - */ - allow_merge_commit?: boolean - /** - * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - * @default true - */ - allow_rebase_merge?: boolean - /** - * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - * @default true - */ - allow_squash_merge?: boolean - /** - * @description Pass `true` to create an initial commit with empty README. - * @default false - */ - auto_init?: boolean - /** - * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. - * @default false - */ - delete_branch_on_merge?: boolean - /** @description A short description of the repository. */ - description?: string - /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ - gitignore_template?: string - /** - * @description Either `true` to enable issues for this repository or `false` to disable them. - * @default true - */ - has_issues?: boolean - /** - * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - * @default true - */ - has_projects?: boolean - /** - * @description Either `true` to enable the wiki for this repository or `false` to disable it. - * @default true - */ - has_wiki?: boolean - /** @description A URL with more information about the repository. */ - homepage?: string - /** - * @description Either `true` to make this repo available as a template repository or `false` to prevent it. - * @default false - */ - is_template?: boolean - /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ - license_template?: string - /** @description The name of the repository. */ - name: string - /** - * @description Whether the repository is private. - * @default false - */ - private?: boolean - /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ - team_id?: number - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. - * @enum {string} - */ - visibility?: 'public' | 'private' | 'internal' - } - } - } - } - /** - * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-alerts-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] - } - } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-actions-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - 'billing/get-github-advanced-security-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Success */ - 200: { - content: { - 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - } - } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-packages-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-shared-storage-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - 'teams/list-idp-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: string - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** Lists all teams in an organization that are visible to the authenticated user. */ - 'teams/list': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 403: components['responses']['forbidden'] - } - } - /** - * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". - */ - 'teams/create': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The description of the team. */ - description?: string - /** @description List GitHub IDs for organization members who will become team maintainers. */ - maintainers?: string[] - /** @description The name of the team. */ - name: string - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' - /** - * @description The level of privacy this team should have. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * Default: `secret` - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * Default for child team: `closed` - * @enum {string} - */ - privacy?: 'secret' | 'closed' - /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ - repo_names?: string[] - } - } - } - } - /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. - */ - 'teams/get-by-name': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. - */ - 'teams/delete-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. - */ - 'teams/update-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The description of the team. */ - description?: string - /** @description The name of the team. */ - name?: string - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - } - } - } - } - /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. - */ - 'teams/list-discussions-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Pinned discussions only filter */ - pinned?: string - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-discussion'][] - } - } - } - } - /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. - */ - 'teams/create-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean - /** @description The discussion post's title. */ - title: string - } - } - } - } - /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - 'teams/get-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - } - /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - 'teams/delete-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. - */ - 'teams/update-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion post's body text. */ - body?: string - /** @description The discussion post's title. */ - title?: string - } - } - } - } - /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - 'teams/list-discussion-comments-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-discussion-comment'][] - } - } - } - } - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - 'teams/create-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion comment's body text. */ - body: string - } - } - } - } - /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - 'teams/get-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - } - /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - 'teams/delete-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. - */ - 'teams/update-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion comment's body text. */ - body: string - } - } - } - } - /** - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - 'reactions/list-for-team-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - } - } - /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - 'reactions/create-for-team-discussion-comment-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/delete-for-team-discussion-comment': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - 'reactions/list-for-team-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - } - } - /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - 'reactions/create-for-team-discussion-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. - * - * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/delete-for-team-discussion': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Deletes a connection between a team and an external group. - * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - */ - 'teams/unlink-external-idp-group-from-team-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Creates a connection between a team and an external group. Only one external group can be linked to a team. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/link-external-idp-group-to-team-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['external-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description External Group Id - * @example 1 - */ - group_id: number - } - } - } - } - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - 'teams/list-pending-invitations-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - } - } - /** - * Team members will include the members of child teams. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - 'teams/list-members-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** - * Filters members returned by their role in the team. Can be one of: - * \* `member` - normal members of the team. - * \* `maintainer` - team maintainers. - * \* `all` - all members of the team. - */ - role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - /** - * Team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. - * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - 'teams/get-membership-for-user-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - /** if user has no team membership */ - 404: unknown - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - 'teams/add-or-update-membership-for-user-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - /** Forbidden if team synchronization is set up */ - 403: unknown - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - 'teams/remove-membership-for-user-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - /** Forbidden if team synchronization is set up */ - 403: unknown - } - } - /** - * Lists the organization projects for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. - */ - 'teams/list-projects-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-project'][] - } - } - } - } - /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - 'teams/check-permissions-for-project-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown - } - } - /** - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - 'teams/add-or-update-project-permissions-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * @enum {string} - */ - permission?: 'read' | 'write' | 'admin' - } | null - } - } - } - /** - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - 'teams/remove-project-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists a team's repositories visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. - */ - 'teams/list-repos-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - } - } - /** - * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. - * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. - * - * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - 'teams/check-permissions-for-repo-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Alternative response with repository permissions */ - 200: { - content: { - 'application/json': components['schemas']['team-repository'] - } - } - /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ - 204: never - /** Not Found if team does not have permission for the repository */ - 404: unknown - } - } - /** - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". - */ - 'teams/add-or-update-repo-permissions-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - } - } - } - } - /** - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. - */ - 'teams/remove-repo-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/list-idp-groups-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/create-or-update-idp-group-connections-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups?: { - /** @description Description of the IdP group. */ - group_description: string - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - }[] - } - } - } - } - /** - * Lists the child teams of the team specified by `{team_slug}`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. - */ - 'teams/list-child-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** if child teams exist */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - } - } - /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/get': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - 'projects/delete': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Delete Success */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { - content: { - 'application/json': { - documentation_url?: string - errors?: string[] - message?: string - } - } - } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/update': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { - content: { - 'application/json': { - documentation_url?: string - errors?: string[] - message?: string - } - } - } - /** Not Found if the authenticated user does not have access to the project */ - 404: unknown - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body?: string | null - /** - * @description Name of the project - * @example Week One Sprint - */ - name?: string - /** - * @description The baseline permission that all organization members have on this project - * @enum {string} - */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. */ - private?: boolean - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state?: string - } - } - } - } - /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ - 'projects/list-collaborators': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - query: { - /** - * Filters the collaborators by their affiliation. Can be one of: - * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. - * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ - 'projects/add-collaborator': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. - * @default write - * @example write - * @enum {string} - */ - permission?: 'read' | 'write' | 'admin' - } | null - } - } - } - /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - 'projects/remove-collaborator': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ - 'projects/get-permission-for-user': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project-collaborator-permission'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'projects/list-columns': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['project-column'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'projects/create-column': { - parameters: { - path: { - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project-column'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string - } - } - } - } - 'projects/get-column': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project-column'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'projects/delete-column': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'projects/update-column': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project-column'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string - } - } - } - } - 'projects/list-cards': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - query: { - /** Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. */ - archived_state?: 'all' | 'archived' | 'not_archived' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['project-card'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'projects/create-card': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project-card'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - /** Validation failed */ - 422: { - content: { - 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] - } - } - /** Response */ - 503: { - content: { - 'application/json': { - code?: string - documentation_url?: string - errors?: { - code?: string - message?: string - }[] - message?: string - } - } - } - } - requestBody: { - content: { - 'application/json': - | { - /** - * @description The project card's note - * @example Update all gems - */ - note: string | null - } - | { - /** - * @description The unique identifier of the content associated with the card - * @example 42 - */ - content_id: number - /** - * @description The piece of content associated with the card - * @example PullRequest - */ - content_type: string - } - } - } - } - 'projects/move-column': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. - * @example last - */ - position: string - } - } - } - } - 'projects/get-card': { - parameters: { - path: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project-card'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'projects/delete-card': { - parameters: { - path: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { - content: { - 'application/json': { - documentation_url?: string - errors?: string[] - message?: string - } - } - } - 404: components['responses']['not_found'] - } - } - 'projects/update-card': { - parameters: { - path: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project-card'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether or not the card is archived - * @example false - */ - archived?: boolean - /** - * @description The project card's note - * @example Update all gems - */ - note?: string | null - } - } - } - } - 'projects/move-card': { - parameters: { - path: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { - content: { - 'application/json': { - documentation_url?: string - errors?: { - code?: string - field?: string - message?: string - resource?: string - }[] - message?: string - } - } - } - 422: components['responses']['validation_failed'] - /** Response */ - 503: { - content: { - 'application/json': { - code?: string - documentation_url?: string - errors?: { - code?: string - message?: string - }[] - message?: string - } - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The unique identifier of the column the card should be moved to - * @example 42 - */ - column_id?: number - /** - * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. - * @example bottom - */ - position: string - } - } - } - } - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. - */ - 'rate-limit/get': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['rate-limit-overview'] - } - } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - 'reactions/delete-legacy': { - parameters: { - path: { - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - } - } - /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ - 'repos/get': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['full-repository'] - } - } - 301: components['responses']['moved_permanently'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. - * - * If an organization owner has configured the organization to prevent members from deleting organization-owned - * repositories, you will get a `403 Forbidden` response. - */ - 'repos/delete': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 307: components['responses']['temporary_redirect'] - /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ - 403: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - 404: components['responses']['not_found'] - } - } - /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ - 'repos/update': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['full-repository'] - } - } - 307: components['responses']['temporary_redirect'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. - * @default false - */ - allow_auto_merge?: boolean - /** - * @description Either `true` to allow private forks, or `false` to prevent private forks. - * @default false - */ - allow_forking?: boolean - /** - * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - * @default true - */ - allow_merge_commit?: boolean - /** - * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - * @default true - */ - allow_rebase_merge?: boolean - /** - * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - * @default true - */ - allow_squash_merge?: boolean - /** - * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. - * @default false - */ - archived?: boolean - /** @description Updates the default branch for this repository. */ - default_branch?: string - /** - * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. - * @default false - */ - delete_branch_on_merge?: boolean - /** @description A short description of the repository. */ - description?: string - /** - * @description Either `true` to enable issues for this repository or `false` to disable them. - * @default true - */ - has_issues?: boolean - /** - * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - * @default true - */ - has_projects?: boolean - /** - * @description Either `true` to enable the wiki for this repository or `false` to disable it. - * @default true - */ - has_wiki?: boolean - /** @description A URL with more information about the repository. */ - homepage?: string - /** - * @description Either `true` to make this repo available as a template repository or `false` to prevent it. - * @default false - */ - is_template?: boolean - /** @description The name of the repository. */ - name?: string - /** - * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. - * @default false - */ - private?: boolean - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ - security_and_analysis?: { - /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ - advanced_security?: { - /** @description Can be `enabled` or `disabled`. */ - status?: string - } - /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ - secret_scanning?: { - /** @description Can be `enabled` or `disabled`. */ - status?: string - } - } | null - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." - * @enum {string} - */ - visibility?: 'public' | 'private' | 'internal' - } - } - } - } - /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/list-artifacts-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - artifacts: components['schemas']['artifact'][] - total_count: number - } - } - } - } - } - /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-artifact': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['artifact'] - } - } - } - } - /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - 'actions/delete-artifact': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in - * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/download-artifact': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] - archive_format: string - } - } - responses: { - /** Response */ - 302: never - } - } - /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-job-for-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** job_id parameter */ - job_id: components['parameters']['job-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['job'] - } - } - } - } - /** - * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look - * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can - * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must - * have the `actions:read` permission to use this endpoint. - */ - 'actions/download-job-logs-for-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** job_id parameter */ - job_id: components['parameters']['job-id'] - } - } - responses: { - /** Response */ - 302: never - } - } - /** - * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - 'actions/get-github-actions-permissions-repository': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-repository-permissions'] - } - } - } - } - /** - * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. - * - * If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - 'actions/set-github-actions-permissions-repository': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - allowed_actions?: components['schemas']['allowed-actions'] - enabled: components['schemas']['actions-enabled'] - } - } - } - } - /** - * Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - 'actions/get-allowed-actions-repository': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - } - /** - * Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." - * - * If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings. - * - * To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. - */ - 'actions/set-allowed-actions-repository': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } - } - /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ - 'actions/list-self-hosted-runners-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - runners: components['schemas']['runner'][] - total_count: number - } - } - } - } - } - /** - * Gets a specific self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/get-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner'] - } - } - } - } - /** - * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `repo` - * scope to use this endpoint. - */ - 'actions/delete-self-hosted-runner-from-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Lists all labels for a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/list-labels-for-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - } - } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } - } - } - } - /** - * Add custom labels to a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } - } - } - } - /** - * Remove all custom labels from a self-hosted runner configured in a - * repository. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } - responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - } - } - /** - * Remove a custom label from a self-hosted runner configured - * in a repository. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. - */ - 'actions/list-runner-applications-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } - } - } - /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate - * using an access token with the `repo` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. - * - * ``` - * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN - * ``` - */ - 'actions/create-registration-token-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** - * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. - * You must authenticate using an access token with the `repo` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'actions/create-remove-token-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] - } - } - } - } - /** - * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/list-workflow-runs-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components['parameters']['actor'] - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components['parameters']['workflow-run-branch'] - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ - created?: components['parameters']['created'] - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - /** Returns workflow runs with the `check_suite_id` that you specify. */ - check_suite_id?: components['parameters']['workflow-run-check-suite-id'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - workflow_runs: components['schemas']['workflow-run'][] - } - } - } - } - } - /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - query: { - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-run'] - } - } - } - } - /** - * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is - * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use - * this endpoint. - */ - 'actions/delete-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-reviews-for-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment-approvals'][] - } - } - } - } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/approve-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/list-workflow-run-artifacts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - artifacts: components['schemas']['artifact'][] - total_count: number - } - } - } - } - } - /** - * Gets a specific workflow run attempt. Anyone with read access to the repository - * can use this endpoint. If the repository is private you must use an access token - * with the `repo` scope. GitHub Apps must have the `actions:read` permission to - * use this endpoint. - */ - 'actions/get-workflow-run-attempt': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] - } - query: { - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-run'] - } - } - } - } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - 'actions/list-jobs-for-workflow-run-attempt': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - jobs: components['schemas']['job'][] - total_count: number - } - } - } - 404: components['responses']['not_found'] - } - } - /** - * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after - * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/download-workflow-run-attempt-logs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] - } - } - responses: { - /** Response */ - 302: never - } - } - /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - 'actions/cancel-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - 'actions/list-jobs-for-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - query: { - /** - * Filters jobs by their `completed_at` timestamp. Can be one of: - * \* `latest`: Returns jobs from the most recent execution of the workflow run. - * \* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run. - */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - jobs: components['schemas']['job'][] - total_count: number - } - } - } - } - } - /** - * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for - * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use - * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have - * the `actions:read` permission to use this endpoint. - */ - 'actions/download-workflow-run-logs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 302: never - } - } - /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - 'actions/delete-workflow-run-logs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 500: components['responses']['internal_error'] - } - } - /** - * Get all deployment environments for a workflow run that are waiting for protection rules to pass. - * - * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-pending-deployments-for-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pending-deployment'][] - } - } - } - } - /** - * Approve or reject pending deployments that are waiting on approval by a required reviewer. - * - * Anyone with read access to the repository contents and deployments can use this endpoint. - */ - 'actions/review-pending-deployments-for-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['deployment'][] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description A comment to accompany the deployment review - * @example Ship it! - */ - comment: string - /** - * @description The list of environment ids to approve or reject - * @example [ - * 161171787, - * 161171795 - * ] - */ - environment_ids: number[] - /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` - * @example approved - * @enum {string} - */ - state: 'approved' | 'rejected' - } - } - } - } - /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - 'actions/re-run-workflow': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-run-usage': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-run-usage'] - } - } - } - } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/list-repo-secrets': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['actions-secret'][] - total_count: number - } - } - } - } - } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/get-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-secret'] - } - } - } - } - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - } - } - } - } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/get-repo-public-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-public-key'] - } - } - } - } - /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/list-repo-workflows': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - workflows: components['schemas']['workflow'][] - } - } - } - } - } - /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-workflow': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow'] - } - } - } - } - /** - * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/disable-workflow': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." - */ - 'actions/create-workflow-dispatch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ - inputs?: { [key: string]: string } - /** @description The git reference for the workflow. The reference can be a branch or tag name. */ - ref: string - } - } - } - } - /** - * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/enable-workflow': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - */ - 'actions/list-workflow-runs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components['parameters']['actor'] - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components['parameters']['workflow-run-branch'] - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ - created?: components['parameters']['created'] - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - /** Returns workflow runs with the `check_suite_id` that you specify. */ - check_suite_id?: components['parameters']['workflow-run-check-suite-id'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - workflow_runs: components['schemas']['workflow-run'][] - } - } - } - } - } - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-usage': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-usage'] - } - } - } - } - /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - 'issues/list-assignees': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Checks if a user has permission to be assigned to an issue in this repository. - * - * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. - * - * Otherwise a `404` status code is returned. - */ - 'issues/check-user-can-be-assigned': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - assignee: string - } - } - responses: { - /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ - 204: never - /** Otherwise a `404` status code is returned. */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * This returns a list of autolinks configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - 'repos/list-autolinks': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['autolink'][] - } - } - } - } - /** Users with admin access to the repository can create an autolink. */ - 'repos/create-autolink': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['autolink'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ - key_prefix: string - /** @description The URL must contain for the reference number. */ - url_template: string - } - } - } - } - /** - * This returns a single autolink reference by ID that was configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - 'repos/get-autolink': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** autolink_id parameter */ - autolink_id: components['parameters']['autolink-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['autolink'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * This deletes a single autolink reference by ID that was configured for the given repository. - * - * Information about autolinks are only available to repository administrators. - */ - 'repos/delete-autolink': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** autolink_id parameter */ - autolink_id: components['parameters']['autolink-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/enable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/disable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/list-branches': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ - protected?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['short-branch'][] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/get-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-with-protection'] - } - } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-protection'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Protecting a branch requires admin or owner permissions to the repository. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - * - * **Note**: The list of users, apps, and teams in total is limited to 100 items. - */ - 'repos/update-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ - allow_deletions?: boolean - /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ - allow_force_pushes?: boolean | null - /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ - enforce_admins: boolean | null - /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ - required_conversation_resolution?: boolean - /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ - required_linear_history?: boolean - /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ - required_pull_request_reviews: { - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: { - /** @description The list of team `slug`s allowed to bypass pull request requirements. */ - teams?: string[] - /** @description The list of user `login`s allowed to bypass pull request requirements. */ - users?: string[] - } | null - /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - dismiss_stale_reviews?: boolean - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ - dismissal_restrictions?: { - /** @description The list of team `slug`s with dismissal access */ - teams?: string[] - /** @description The list of user `login`s with dismissal access */ - users?: string[] - } - /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ - require_code_owner_reviews?: boolean - /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ - required_approving_review_count?: number - } | null - /** @description Require status checks to pass before merging. Set to `null` to disable. */ - required_status_checks: { - /** @description The list of status checks to require in order to merge into this branch. */ - checks?: { - /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ - app_id?: number - /** @description The name of the required check */ - context: string - }[] - /** - * @deprecated - * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. - */ - contexts: string[] - /** @description Require branches to be up to date before merging. */ - strict: boolean - } | null - /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ - restrictions: { - /** @description The list of app `slug`s with push access */ - apps?: string[] - /** @description The list of team `slug`s with push access */ - teams: string[] - /** @description The list of user `login`s with push access */ - users: string[] - } | null - } - } - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/delete-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-admin-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] - } - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - 'repos/set-admin-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] - } - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - 'repos/delete-admin-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-pull-request-review-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-pull-request-review'] - } - } - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/delete-pull-request-review-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - */ - 'repos/update-pull-request-review-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-pull-request-review'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: { - /** @description The list of team `slug`s allowed to bypass pull request requirements. */ - teams?: string[] - /** @description The list of user `login`s allowed to bypass pull request requirements. */ - users?: string[] - } | null - /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - dismiss_stale_reviews?: boolean - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ - dismissal_restrictions?: { - /** @description The list of team `slug`s with dismissal access */ - teams?: string[] - /** @description The list of user `login`s with dismissal access */ - users?: string[] - } - /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ - require_code_owner_reviews?: boolean - /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ - required_approving_review_count?: number - } - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. - * - * **Note**: You must enable branch protection to require signed commits. - */ - 'repos/get-commit-signature-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. - */ - 'repos/create-commit-signature-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. - */ - 'repos/delete-commit-signature-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-status-checks-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['status-check-policy'] - } - } - 404: components['responses']['not_found'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/remove-status-check-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - */ - 'repos/update-status-check-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['status-check-policy'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The list of status checks to require in order to merge into this branch. */ - checks?: { - /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ - app_id?: number - /** @description The name of the required check */ - context: string - }[] - /** - * @deprecated - * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. - */ - contexts?: string[] - /** @description Require branches to be up to date before merging. */ - strict?: boolean - } - } - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-all-status-check-contexts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': string[] - } - } - 404: components['responses']['not_found'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/set-status-check-contexts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': string[] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description contexts parameter */ - contexts: string[] - } - | string[] - } - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/add-status-check-contexts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': string[] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description contexts parameter */ - contexts: string[] - } - | string[] - } - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/remove-status-check-contexts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': string[] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description contexts parameter */ - contexts: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists who has access to this protected branch. - * - * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. - */ - 'repos/get-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-restriction-policy'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - 'repos/delete-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - */ - 'repos/get-apps-with-access-to-protected-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/set-app-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description apps parameter */ - apps: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/add-app-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description apps parameter */ - apps: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/remove-app-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description apps parameter */ - apps: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. The list includes child teams. - */ - 'repos/get-teams-with-access-to-protected-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/set-team-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description teams parameter */ - teams: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. You can also give push access to child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/add-team-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description teams parameter */ - teams: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. You can also remove push access for child teams. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/remove-team-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description teams parameter */ - teams: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the people who have push access to this branch. - */ - 'repos/get-users-with-access-to-protected-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/set-user-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description users parameter */ - users: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified people push access for this branch. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/add-user-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description users parameter */ - users: string[] - } - | string[] - } - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of a user to push to this branch. - * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/remove-user-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description users parameter */ - users: string[] - } - | string[] - } - } - } - /** - * Renames a branch in a repository. - * - * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". - * - * The permissions required to use this endpoint depends on whether you are renaming the default branch. - * - * To rename a non-default branch: - * - * * Users must have push access. - * * GitHub Apps must have the `contents:write` repository permission. - * - * To rename the default branch: - * - * * Users must have admin or owner permissions. - * * GitHub Apps must have the `administration:write` repository permission. - */ - 'repos/rename-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['branch-with-protection'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new name of the branch. */ - new_name: string - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. - * - * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. - */ - 'checks/create': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['check-run'] - } - } - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @enum {undefined} */ - status: 'completed' - } & { - conclusion: unknown - } & { [key: string]: unknown }) - | ({ - /** @enum {undefined} */ - status?: 'queued' | 'in_progress' - } & { [key: string]: unknown }) - ) & { - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ - actions?: { - /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ - description: string - /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ - identifier: string - /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ - label: string - }[] - /** - * Format: date-time - * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string - /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. - * @enum {string} - */ - conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' - /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ - details_url?: string - /** @description A reference for the run on the integrator's system. */ - external_id?: string - /** @description The SHA of the commit. */ - head_sha: string - /** @description The name of the check. For example, "code-coverage". */ - name: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */ - output?: { - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ - annotations?: { - /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. - * @enum {string} - */ - annotation_level: 'notice' | 'warning' | 'failure' - /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - end_column?: number - /** @description The end line of the annotation. */ - end_line: number - /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ - message: string - /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ - path: string - /** @description Details about this annotation. The maximum size is 64 KB. */ - raw_details?: string - /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - start_column?: number - /** @description The start line of the annotation. */ - start_line: number - /** @description The title that represents the annotation. The maximum size is 255 characters. */ - title?: string - }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ - images?: { - /** @description The alternative text for the image. */ - alt: string - /** @description A short image description. */ - caption?: string - /** @description The full URL of the image. */ - image_url: string - }[] - /** @description The summary of the check run. This parameter supports Markdown. */ - summary: string - /** @description The details of the check run. This parameter supports Markdown. */ - text?: string - /** @description The title of the check run. */ - title: string - } - /** - * Format: date-time - * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. - * @default queued - * @enum {string} - */ - status?: 'queued' | 'in_progress' | 'completed' - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/get': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-run'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. - */ - 'checks/update': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-run'] - } - } - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @enum {undefined} */ - status?: 'completed' - } & { - conclusion: unknown - } & { [key: string]: unknown }) - | ({ - /** @enum {undefined} */ - status?: 'queued' | 'in_progress' - } & { [key: string]: unknown }) - ) & { - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ - actions?: { - /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ - description: string - /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ - identifier: string - /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ - label: string - }[] - /** - * Format: date-time - * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string - /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. - * @enum {string} - */ - conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' - /** @description The URL of the integrator's site that has the full details of the check. */ - details_url?: string - /** @description A reference for the run on the integrator's system. */ - external_id?: string - /** @description The name of the check. For example, "code-coverage". */ - name?: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */ - output?: { - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ - annotations?: { - /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. - * @enum {string} - */ - annotation_level: 'notice' | 'warning' | 'failure' - /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - end_column?: number - /** @description The end line of the annotation. */ - end_line: number - /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ - message: string - /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ - path: string - /** @description Details about this annotation. The maximum size is 64 KB. */ - raw_details?: string - /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - start_column?: number - /** @description The start line of the annotation. */ - start_line: number - /** @description The title that represents the annotation. The maximum size is 255 characters. */ - title?: string - }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ - images?: { - /** @description The alternative text for the image. */ - alt: string - /** @description A short image description. */ - caption?: string - /** @description The full URL of the image. */ - image_url: string - }[] - /** @description Can contain Markdown. */ - summary: string - /** @description Can contain Markdown. */ - text?: string - /** @description **Required**. */ - title?: string - } - /** - * Format: date-time - * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. - * @enum {string} - */ - status?: 'queued' | 'in_progress' | 'completed' - } - } - } - } - /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ - 'checks/list-annotations': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['check-annotation'][] - } - } - } - } - /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - 'checks/rerequest-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ - 403: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - 404: components['responses']['not_found'] - /** Validation error if the check run is not rerequestable */ - 422: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - 'checks/create-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** when the suite already existed */ - 200: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - /** Response when the suite was created */ - 201: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The sha of the head commit. */ - head_sha: string - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - 'checks/get-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/list-for-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - check_runs: components['schemas']['check-run'][] - total_count: number - } - } - } - } - } - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - 'checks/rerequest-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - 'checks/set-suites-preferences': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-suite-preference'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - auto_trigger_checks?: { - /** @description The `id` of the GitHub App. */ - app_id: number - /** - * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. - * @default true - */ - setting: boolean - }[] - } - } - } - } - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - 'code-scanning/list-alerts-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-items'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - 'code-scanning/get-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - 'code-scanning/update-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] - state: components['schemas']['code-scanning-alert-set-state'] - } - } - } - } - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - 'code-scanning/list-alert-instances': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-instance'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - 'code-scanning/list-recent-analyses': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['schemas']['code-scanning-ref'] - /** Filter analyses belonging to the same SARIF upload. */ - sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - */ - 'code-scanning/get-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json+sarif': string - 'application/json': components['schemas']['code-scanning-analysis'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - 'code-scanning/delete-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - query: { - /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - confirm_delete?: string | null - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis-deletion'] - } - } - 400: components['responses']['bad_request'] - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - 'code-scanning/upload-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - 400: unknown - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - 413: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - ref: components['schemas']['code-scanning-ref'] - sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string - } - } - } - } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'code-scanning/get-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - sarif_id: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-status'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-in-repository-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - codespaces: components['schemas']['codespace'][] - total_count: number - } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Working directory for this codespace */ - working_directory?: string - } - } - } - } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/repo-machines-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Required. The location to check for available machines. */ - location: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - machines: components['schemas']['codespace-machine'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/list-collaborators': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['collaborator'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/check-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a collaborator */ - 204: never - /** Not Found if user is not a collaborator */ - 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - 'repos/add-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response when a new invitation is created */ - 201: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } - /** Response when person is already a collaborator */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - permissions?: string - } - } - } - } - 'repos/remove-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - 'repos/get-collaborator-permission-level': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** if user has admin permissions */ - 200: { - content: { - 'application/json': components['schemas']['repository-collaborator-permission'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - 'repos/list-commit-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - 'repos/get-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/delete-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - 'repos/update-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment */ - body: string - } - } - } - } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - 'reactions/list-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - 'reactions/create-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - 'reactions/delete-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/list-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - sha?: string - /** Only commits containing this file path will be returned. */ - path?: string - /** GitHub login or email address by which to filter by commit author. */ - author?: string - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - until?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit'][] - } - } - 400: components['responses']['bad_request'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - 'repos/list-branches-for-head-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-short'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - 'repos/list-comments-for-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - line?: number - /** @description Relative path of the file to comment on. */ - path?: string - /** @description Line index in the diff to comment on. */ - position?: number - } - } - } - } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - 'repos/list-pull-requests-associated-with-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-simple'][] - } - } - } - } - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/get-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/list-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - app_id?: number - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - check_runs: components['schemas']['check-run'][] - total_count: number - } - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - 'checks/list-suites-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Filters check suites by GitHub App `id`. */ - app_id?: number - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - check_suites: components['schemas']['check-suite'][] - total_count: number - } - } - } - } - } - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - 'repos/get-combined-status-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-commit-status'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - 'repos/list-commit-statuses-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['status'][] - } - } - 301: components['responses']['moved_permanently'] - } - } - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - 'repos/get-community-profile-metrics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['community-profile'] - } - } - } - } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/compare-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - basehead: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comparison'] - } - } - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent - * object format. - * - * **Note**: - * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees - * API](https://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * The response will be an array of objects, one object for each item in the directory. - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value - * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). - * In the next major version of the API, the type will be returned as "submodule". - * - * #### If the content is a symlink - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the - * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific - * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out - * the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the - * github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - 'repos/get-content': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/vnd.github.v3.object': components['schemas']['content-tree'] - 'application/json': - | components['schemas']['content-directory'] - | components['schemas']['content-file'] - | components['schemas']['content-symlink'] - | components['schemas']['content-submodule'] - } - } - 302: components['responses']['found'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Creates a new file or replaces an existing file in a repository. */ - 'repos/create-or-update-file-contents': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - } - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - } - /** @description The new file content, using Base64 encoding. */ - content: string - /** @description The commit message. */ - message: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string - } - } - } - } - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - 'repos/delete-file': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description object containing information about the author. */ - author?: { - /** @description The email of the author (or committer) of the commit */ - email?: string - /** @description The name of the author (or committer) of the commit */ - name?: string - } - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description object containing information about the committer. */ - committer?: { - /** @description The email of the author (or committer) of the commit */ - email?: string - /** @description The name of the author (or committer) of the commit */ - name?: string - } - /** @description The commit message. */ - message: string - /** @description The blob SHA of the file being replaced. */ - sha: string - } - } - } - } - /** - * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. - * - * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. - */ - 'repos/list-contributors': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Set to `1` or `true` to include anonymous contributors in results. */ - anon?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** if repository contains content */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['contributor'][] - } - } - /** Response if repository is empty */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/list-repo-secrets': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['dependabot-secret'][] - total_count: number - } - } - } - } - } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['dependabot-secret'] - } - } - } - } - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'dependabot/create-or-update-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - } - } - } - } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/delete-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-public-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['dependabot-public-key'] - } - } - } - } - /** Simple filtering of deployments is available via query parameters: */ - 'repos/list-deployments': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The SHA recorded at creation time. */ - sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - environment?: string | null - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['deployment'][] - } - } - } - } - /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts - * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. - * - * #### Merge conflict response - * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't - * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. - * - * #### Failed commit status checks - * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` - * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. - */ - 'repos/create-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - 202: { - content: { - 'application/json': { - message?: string - } - } - } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - auto_merge?: boolean - /** - * @description Short description of the deployment. - * @default - */ - description?: string | null - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - environment?: string - payload?: { [key: string]: unknown } | string - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - production_environment?: boolean - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - ref: string - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - required_contexts?: string[] - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - task?: string - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - transient_environment?: boolean - } - } - } - } - 'repos/get-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. - * - * To set a deployment as inactive, you must: - * - * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * * Mark the active deployment as inactive by adding any non-successful deployment status. - * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." - */ - 'repos/delete-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** Users with pull access can view deployment statuses for a deployment: */ - 'repos/list-deployment-statuses': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['deployment-status'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with `push` access can create deployment statuses for a given deployment. - * - * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. - */ - 'repos/create-deployment-status': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['deployment-status'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} - */ - environment?: 'production' | 'staging' | 'qa' - /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default - */ - environment_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string - /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string - } - } - } - } - /** Users with pull access can view a deployment status for a deployment: */ - 'repos/get-deployment-status': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - status_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['deployment-status'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. - */ - 'repos/create-dispatch-event': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { [key: string]: unknown } - /** @description A custom webhook event name. */ - event_type: string - } - } - } - } - /** - * Get all environments for a repository. - * - * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'repos/get-all-environments': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - environments?: components['schemas']['environment'][] - /** - * @description The number of environments in this repository - * @example 5 - */ - total_count?: number - } - } - } - } - } - /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'repos/get-environment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } - } - } - /** - * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." - * - * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." - * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." - * - * You must authenticate using an access token with the repo scope to use this endpoint. - */ - 'repos/create-or-update-environment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } - /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ - 422: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - requestBody: { - content: { - 'application/json': { - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: - | { - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number - type?: components['schemas']['deployment-reviewer-type'] - }[] - | null - wait_timer?: components['schemas']['wait-timer'] - } | null - } - } - } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - 'repos/delete-an-environment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - } - } - responses: { - /** Default response */ - 204: never - } - } - 'activity/list-repo-events': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - 'repos/list-forks': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 400: components['responses']['bad_request'] - } - } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - 'repos/create-fork': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['full-repository'] - } - } - 400: components['responses']['bad_request'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Optional parameter to specify the organization name if forking into an organization. */ - organization?: string - } | null - } - } - } - 'git/create-blob': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['short-blob'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new blob's content. */ - content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - encoding?: string - } - } - } - } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - 'git/get-blob': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - file_sha: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['blob'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'git/create-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['git-commit'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ - author?: { - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - /** @description The email of the author (or committer) of the commit */ - email: string - /** @description The name of the author (or committer) of the commit */ - name: string - } - /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ - committer?: { - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - /** @description The name of the author (or committer) of the commit */ - name?: string - } - /** @description The commit message */ - message: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - parents?: string[] - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - signature?: string - /** @description The SHA of the tree object this commit points to */ - tree: string - } - } - } - } - /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'git/get-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['git-commit'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - * - * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. - */ - 'git/list-matching-refs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['git-ref'][] - } - } - } - } - /** - * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - * - * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - */ - 'git/get-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['git-ref'] - } - } - 404: components['responses']['not_found'] - } - } - /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ - 'git/create-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['git-ref'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @example "refs/heads/newbranch" */ - key?: string - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string - /** @description The SHA1 value for this reference. */ - sha: string - } - } - } - } - 'git/delete-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - } - 'git/update-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['git-ref'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - force?: boolean - /** @description The SHA1 value to set this reference to */ - sha: string - } - } - } - } - /** - * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'git/create-tag': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['git-tag'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The tag message. */ - message: string - /** @description The SHA of the git object this is tagging. */ - object: string - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - tag: string - /** @description An object with information about the individual creating the tag. */ - tagger?: { - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - /** @description The email of the author of the tag */ - email: string - /** @description The name of the author of the tag */ - name: string - } - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - type: 'commit' | 'tree' | 'blob' - } - } - } - } - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'git/get-tag': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - tag_sha: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['git-tag'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - * - * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." - */ - 'git/create-tree': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['git-tree'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. - * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. - */ - base_tree?: string - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: { - /** - * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - content?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** @description The file referenced in the tree. */ - path?: string - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - type?: 'blob' | 'tree' | 'commit' - }[] - } - } - } - } - /** - * Returns a single tree using the SHA1 value for that tree. - * - * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. - */ - 'git/get-tree': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - tree_sha: string - } - query: { - /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ - recursive?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['git-tree'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'repos/list-webhooks': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['hook'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can - * share the same `config` as long as those webhooks do not have any `events` that overlap. - */ - 'repos/create-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['hook'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - content_type?: components['schemas']['webhook-config-content-type'] - /** @example "sha256" */ - digest?: string - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - /** @example "abc" */ - token?: string - url?: components['schemas']['webhook-config-url'] - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string - } | null - } - } - } - /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ - 'repos/get-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/delete-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ - 'repos/update-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - add_events?: string[] - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - /** @example "bar@example.com" */ - address?: string - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - /** @example "The Serious Room" */ - room?: string - secret?: components['schemas']['webhook-config-secret'] - url: components['schemas']['webhook-config-url'] - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - remove_events?: string[] - } - } - } - } - /** - * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." - * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. - */ - 'repos/get-webhook-config-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - } - /** - * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." - * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. - */ - 'repos/update-webhook-config-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - content_type?: components['schemas']['webhook-config-content-type'] - insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] - secret?: components['schemas']['webhook-config-secret'] - url?: components['schemas']['webhook-config-url'] - } - } - } - } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - 'repos/list-webhook-deliveries': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Returns a delivery for a webhook configured in a repository. */ - 'repos/get-webhook-delivery': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery'] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - 'repos/redeliver-webhook-delivery': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'repos/ping-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - 'repos/test-push-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - 'migrations/get-import-status': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } - 404: components['responses']['not_found'] - } - } - /** Start a source import to a GitHub repository using GitHub Importer. */ - 'migrations/start-import': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['import'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description For a tfvc import, the name of the project that is being imported. */ - tfvc_project?: string - /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} - */ - vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the password to provide to `vcs_url`. */ - vcs_password?: string - /** @description The URL of the originating repository. */ - vcs_url: string - /** @description If authentication is required, the username to provide to `vcs_url`. */ - vcs_username?: string - } - } - } - } - /** Stop an import for a repository. */ - 'migrations/cancel-import': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - 'migrations/update-import': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @example "project1" */ - tfvc_project?: string - /** @example "git" */ - vcs?: string - /** @description The password to provide to the originating repository. */ - vcs_password?: string - /** @description The username to provide to the originating repository. */ - vcs_username?: string - } | null - } - } - } - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - 'migrations/get-commit-authors': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['porter-author'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - 'migrations/map-commit-author': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - author_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['porter-author'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new Git author email. */ - email?: string - /** @description The new Git author name. */ - name?: string - } - } - } - } - /** List files larger than 100MB found during the import */ - 'migrations/get-large-files': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['porter-large-file'][] - } - } - } - } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - 'migrations/set-lfs-preference': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} - */ - use_lfs: 'opt_in' | 'opt_out' - } - } - } - } - /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-repo-installation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - } - } - /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - 'interactions/set-restrictions-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - /** Response */ - 409: unknown - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - 'interactions/remove-restrictions-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - /** Response */ - 409: unknown - } - } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - 'repos/list-invitations': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['repository-invitation'][] - } - } - } - } - 'repos/delete-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/update-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. - * @enum {string} - */ - permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' - } - } - } - } - /** - * List issues in a repository. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/list-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ - milestone?: string - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ - assignee?: string - /** The user that created the issue. */ - creator?: string - /** A user that's mentioned in the issue. */ - mentioned?: string - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. - * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'issues/create': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['issue'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - assignee?: string | null - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - /** @description The contents of the issue. */ - body?: string - /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - color?: string | null - description?: string | null - id?: number - name?: string - } - )[] - milestone?: (string | number) | null - /** @description The title of the issue. */ - title: string | number - } - } - } - } - /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/get': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue'] - } - } - 301: components['responses']['moved_permanently'] - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** Issue owners and users with push access can edit an issue. */ - 'issues/update': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue'] - } - } - 301: components['responses']['moved_permanently'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - /** @description The contents of the issue. */ - body?: string | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - color?: string | null - description?: string | null - id?: number - name?: string - } - )[] - milestone?: (string | number) | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The title of the issue. */ - title?: (string | number) | null - } - } - } - } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - 'issues/add-assignees': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['issue'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] - } - } - } - } - /** Removes one or more assignees from an issue. */ - 'issues/remove-assignees': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] - } - } - } - } - /** Issue Comments are ordered by ascending ID. */ - 'issues/list-comments': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue-comment'][] - } - } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'issues/create-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['issue-comment'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - } - } - } - } - 'issues/list-events': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue-event-for-issue'][] - } - } - 410: components['responses']['gone'] - } - } - 'issues/list-labels-on-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['label'][] - } - } - 410: components['responses']['gone'] - } - } - /** Removes any previous labels and sets the new labels for an issue. */ - 'issues/set-labels': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['label'][] - } - } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string - } - } - } - 'issues/add-labels': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['label'][] - } - } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string - } - } - } - 'issues/remove-all-labels': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 204: never - 410: components['responses']['gone'] - } - } - /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ - 'issues/remove-label': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - name: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['label'][] - } - } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** - * Users with push access can lock an issue or pull request's conversation. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'issues/lock': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - * @enum {string} - */ - lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } | null - } - } - } - /** Users with push access can unlock an issue's conversation. */ - 'issues/unlock': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - 'reactions/list-for-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - 'reactions/create-for-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. - * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). - */ - 'reactions/delete-for-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/list-events-for-timeline': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['timeline-issue-events'][] - } - } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - /** By default, Issue Comments are ordered by ascending ID. */ - 'issues/list-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue-comment'][] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'issues/get-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue-comment'] - } - } - 404: components['responses']['not_found'] - } - } - 'issues/delete-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/update-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue-comment'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - } - } - } - } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - 'reactions/list-for-issue-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - 'reactions/create-for-issue-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). - */ - 'reactions/delete-for-issue-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/list-events-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue-event'][] - } - } - 422: components['responses']['validation_failed'] - } - } - 'issues/get-event': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - event_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue-event'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - } - } - 'repos/list-deploy-keys': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['deploy-key'][] - } - } - } - } - /** You can create a read-only deploy key. */ - 'repos/create-deploy-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['deploy-key'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the key. */ - key: string - /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." - */ - read_only?: boolean - /** @description A name for the key. */ - title?: string - } - } - } - } - 'repos/get-deploy-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['deploy-key'] - } - } - 404: components['responses']['not_found'] - } - } - /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ - 'repos/delete-deploy-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/list-labels-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['label'][] - } - } - 404: components['responses']['not_found'] - } - } - 'issues/create-label': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['label'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - name: string - } - } - } - } - 'issues/get-label': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - name: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['label'] - } - } - 404: components['responses']['not_found'] - } - } - 'issues/delete-label': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - name: string - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/update-label': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - name: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['label'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - new_name?: string - } - } - } - } - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - 'repos/list-languages': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['language'] - } - } - } - } - 'repos/enable-lfs-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - 403: unknown - } - } - 'repos/disable-lfs-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - 'licenses/get-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['license-content'] - } - } - } - } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - 'repos/merge-upstream': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** The branch has been successfully synced with the upstream repository */ - 200: { - content: { - 'application/json': components['schemas']['merged-upstream'] - } - } - /** The branch could not be synced because of a merge conflict */ - 409: unknown - /** The branch could not be synced for some other reason */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string - } - } - } - } - 'repos/merge': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Successful Response (The resulting merge commit) */ - 201: { - content: { - 'application/json': components['schemas']['commit'] - } - } - /** Response when already merged */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - 404: unknown - /** Conflict when there is a merge conflict */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - base: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - commit_message?: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - head: string - } - } - } - } - 'issues/list-milestones': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The state of the milestone. Either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** What to sort results by. Either `due_on` or `completeness`. */ - sort?: 'due_on' | 'completeness' - /** The direction of the sort. Either `asc` or `desc`. */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['milestone'][] - } - } - 404: components['responses']['not_found'] - } - } - 'issues/create-milestone': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['milestone'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The title of the milestone. */ - title: string - } - } - } - } - 'issues/get-milestone': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['milestone'] - } - } - 404: components['responses']['not_found'] - } - } - 'issues/delete-milestone': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - 'issues/update-milestone': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['milestone'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The title of the milestone. */ - title?: string - } - } - } - } - 'issues/list-labels-for-milestone': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['label'][] - } - } - } - } - /** List all notifications for the current user. */ - 'activity/list-repo-notifications-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** If `true`, show notifications marked as read. */ - all?: components['parameters']['all'] - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - participating?: components['parameters']['participating'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - before?: components['parameters']['before'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['thread'][] - } - } - } - } - /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ - 'activity/mark-repo-notifications-as-read': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': { - message?: string - url?: string - } - } - } - /** Reset Content */ - 205: unknown - } - requestBody: { - content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. - */ - last_read_at?: string - } - } - } - } - 'repos/get-pages': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page'] - } - } - 404: components['responses']['not_found'] - } - } - /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ - 'repos/update-information-about-pages-site': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean - source?: - | ('gh-pages' | 'master' | 'master /docs') - | { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - path: '/' | '/docs' - } - } - } - } - } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - 'repos/create-pages-site': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['page'] - } - } - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The source branch and directory used to publish your Pages site. */ - source: { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - path?: '/' | '/docs' - } - } | null - } - } - } - 'repos/delete-pages-site': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'repos/list-pages-builds': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['page-build'][] - } - } - } - } - /** - * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. - * - * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. - */ - 'repos/request-pages-build': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['page-build-status'] - } - } - } - } - 'repos/get-pages-build': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - build_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page-build'] - } - } - } - } - 'repos/get-latest-pages-build': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page-build'] - } - } - } - } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - 'repos/get-pages-health-check': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pages-health-check'] - } - } - /** Empty response */ - 202: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - /** Custom domains are not available for GitHub Pages */ - 400: unknown - 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - 422: unknown - } - } - /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/list-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['project'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] - } - } - /** Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/create-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The description of the project. */ - body?: string - /** @description The name of the project. */ - name: string - } - } - } - } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'pulls/list': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Either `open`, `closed`, or `all` to filter by state. */ - state?: 'open' | 'closed' | 'all' - /** Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ - head?: string - /** Filter pulls by base branch name. Example: `gh-pages`. */ - base?: string - /** What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */ - sort?: 'created' | 'updated' | 'popularity' | 'long-running' - /** The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-simple'][] - } - } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - } - } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - 'pulls/create': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string - /** @example 1 */ - issue?: number - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** @description The title of the new pull request. */ - title?: string - } - } - } - } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - 'pulls/get': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 200: { - content: { - 'application/json': components['schemas']['pull-request'] - } - } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - 'pulls/update': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base?: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The title of the pull request. */ - title?: string - } - } - } - } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-pr-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - } - } - } - } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-review-comment'][] - } - } - } - } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id?: string - /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 - */ - in_reply_to?: number - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number - /** @description The relative path to the file that necessitates a comment. */ - path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number - /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. - * @enum {string} - */ - start_side?: 'LEFT' | 'RIGHT' | 'side' - } - } - } - } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-reply-for-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string - } - } - } - } - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - 'pulls/list-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit'][] - } - } - } - } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - 'pulls/list-files': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['diff-entry'][] - } - } - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - 'pulls/check-if-merged': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response if pull request has been merged */ - 204: never - /** Not Found if pull request has not been merged */ - 404: unknown - } - } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/merge': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** if merge was successful */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-merge-result'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - 405: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - /** Conflict if sha was provided and pull request head did not match */ - 409: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Extra detail to append to automatic commit message. */ - commit_message?: string - /** @description Title for the automatic commit message. */ - commit_title?: string - /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. - * @enum {string} - */ - merge_method?: 'merge' | 'squash' | 'rebase' - /** @description SHA that pull request head must match to allow merge. */ - sha?: string - } | null - } - } - } - 'pulls/list-requested-reviewers': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-review-request'] - } - } - } - } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/request-reviewers': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['pull-request-simple'] - } - } - 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description An array of user `login`s that will be requested. */ - reviewers?: string[] - /** @description An array of team `slug`s that will be requested. */ - team_reviewers?: string[] - } - } - } - } - 'pulls/remove-requested-reviewers': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-simple'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description An array of user `login`s that will be removed. */ - reviewers: string[] - /** @description An array of team `slug`s that will be removed. */ - team_reviewers?: string[] - } - } - } - } - /** The list of reviews returns in chronological order. */ - 'pulls/list-reviews': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** The list of reviews returns in chronological order. */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-review'][] - } - } - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - 'pulls/create-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - body?: string - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: { - /** @description Text of the review comment. */ - body: string - /** @example 28 */ - line?: number - /** @description The relative path to the file that necessitates a review comment. */ - path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number - /** @example RIGHT */ - side?: string - /** @example 26 */ - start_line?: number - /** @example LEFT */ - start_side?: string - }[] - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - commit_id?: string - /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. - * @enum {string} - */ - event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - } - } - } - } - 'pulls/get-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 404: components['responses']['not_found'] - } - } - /** Update the review summary comment with new text. */ - 'pulls/update-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The body text of the pull request review. */ - body: string - } - } - } - } - 'pulls/delete-pending-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** List comments for a specific pull request review. */ - 'pulls/list-comments-for-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['review-comment'][] - } - } - 404: components['responses']['not_found'] - } - } - /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ - 'pulls/dismiss-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @example "APPROVE" */ - event?: string - /** @description The message for the pull request review dismissal */ - message: string - } - } - } - } - 'pulls/submit-review': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The body text of the pull request review */ - body?: string - /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - * @enum {string} - */ - event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - } - } - } - } - /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - 'pulls/update-branch': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': { - message?: string - url?: string - } - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string - } | null - } - } - } - /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-review-comment'][] - } - } - } - } - /** Provides details for a review comment. */ - 'pulls/get-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - 404: components['responses']['not_found'] - } - } - /** Deletes a review comment. */ - 'pulls/delete-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Enables you to edit a review comment. */ - 'pulls/update-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The text of the reply to the review comment. */ - body: string - } - } - } - } - /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ - 'reactions/list-for-pull-request-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - 'reactions/create-for-pull-request-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). - */ - 'reactions/delete-for-pull-request-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets the preferred README for a repository. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - 'repos/get-readme': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['content-file'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - 'repos/get-readme-in-directory': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - dir: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['content-file'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). - * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. - */ - 'repos/list-releases': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['release'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Text describing the contents of the tag. */ - body?: string - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean - /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false - */ - generate_release_notes?: boolean - /** @description The name of the release. */ - name?: string - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean - /** @description The name of the tag. */ - tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - } - } - } - } - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - 'repos/get-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - } - responses: { - /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ - 200: { - content: { - 'application/json': components['schemas']['release'] - } - } - 404: components['responses']['not_found'] - } - } - /** Users with push access to the repository can delete a release. */ - 'repos/delete-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Users with push access to the repository can edit a release. */ - 'repos/update-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Text describing the contents of the tag. */ - body?: string - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean - /** @description The name of the release. */ - name?: string - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean - /** @description The name of the tag. */ - tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - } - } - } - } - 'repos/list-release-assets': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - 'repos/upload-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - name: string - label?: string - } - } - responses: { - /** Response for successful upload */ - 201: { - content: { - 'application/json': components['schemas']['release-asset'] - } - } - /** Response if you upload an asset with the same filename as another uploaded asset */ - 422: unknown - } - requestBody: { - content: { - '*/*': string - } - } - } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - 'reactions/create-for-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. - * @enum {string} - */ - content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ - 'repos/get-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ - 200: { - content: { - 'application/json': components['schemas']['release-asset'] - } - } - 302: components['responses']['found'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'repos/delete-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Users with push access to the repository can edit a release asset. */ - 'repos/update-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['release-asset'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description An alternate short description of the asset. Used in place of the filename. */ - label?: string - /** @description The file name of the asset. */ - name?: string - /** @example "uploaded" */ - state?: string - } - } - } - } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - 'repos/generate-release-notes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Name and body of generated release notes */ - 200: { - content: { - 'application/json': components['schemas']['release-notes-content'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - configuration_file_path?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - previous_tag_name?: string - /** @description The tag name for the release. This can be an existing tag or a new one. */ - tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - target_commitish?: string - } - } - } - } - /** - * View the latest published full release for the repository. - * - * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. - */ - 'repos/get-latest-release': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['release'] - } - } - } - } - /** Get a published release with the specified tag. */ - 'repos/get-release-by-tag': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** tag parameter */ - tag: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['release'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-alerts-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['secret-scanning-alert'][] - } - } - /** Repository is public or secret scanning is disabled for the repository */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/get-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['secret-scanning-alert'] - } - } - 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. - */ - 'secret-scanning/update-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['secret-scanning-alert'] - } - } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - /** State does not match the resolution */ - 422: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - resolution?: components['schemas']['secret-scanning-alert-resolution'] - state: components['schemas']['secret-scanning-alert-state'] - } - } - } - } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-locations-for-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['secret-scanning-location'][] - } - } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the people that have starred the repository. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - 'activity/list-stargazers-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 'repos/get-code-frequency-stats': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 200: { - content: { - 'application/json': components['schemas']['code-frequency-stat'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] - } - } - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - 'repos/get-commit-activity-stats': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] - } - } - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 'repos/get-contributors-stats': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 200: { - content: { - 'application/json': components['schemas']['contributor-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] - } - } - /** - * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. - * - * The array order is oldest week (index 0) to most recent week. - */ - 'repos/get-participation-stats': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** The array order is oldest week (index 0) to most recent week. */ - 200: { - content: { - 'application/json': components['schemas']['participation-stats'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Each array contains the day number, hour number, and number of commits: - * - * * `0-6`: Sunday - Saturday - * * `0-23`: Hour of day - * * Number of commits - * - * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. - */ - 'repos/get-punch-card-stats': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. */ - 200: { - content: { - 'application/json': components['schemas']['code-frequency-stat'][] - } - } - 204: components['responses']['no_content'] - } - } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - 'repos/create-commit-status': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - sha: string - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['status'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string - /** @description A short description of the status. */ - description?: string - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string - } - } - } - } - /** Lists the people watching the specified repository. */ - 'activity/list-watchers-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - 'activity/get-repo-subscription': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** if you subscribe to the repository */ - 200: { - content: { - 'application/json': components['schemas']['repository-subscription'] - } - } - 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - 404: unknown - } - } - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - 'activity/set-repo-subscription': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['repository-subscription'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Determines if all notifications should be blocked from this repository. */ - ignored?: boolean - /** @description Determines if notifications should be received from this repository. */ - subscribed?: boolean - } - } - } - } - /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ - 'activity/delete-repo-subscription': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/list-tags': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['tag'][] - } - } - } - } - /** - * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - 'repos/download-tarball-archive': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - ref: string - } - } - responses: { - /** Response */ - 302: never - } - } - 'repos/list-teams': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - } - } - 'repos/get-all-topics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['topic'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/replace-all-topics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['topic'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ - names: string[] - } - } - } - } - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - 'repos/get-clones': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['clone-traffic'] - } - } - 403: components['responses']['forbidden'] - } - } - /** Get the top 10 popular contents over the last 14 days. */ - 'repos/get-top-paths': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['content-traffic'][] - } - } - 403: components['responses']['forbidden'] - } - } - /** Get the top 10 referrers over the last 14 days. */ - 'repos/get-top-referrers': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['referrer-traffic'][] - } - } - 403: components['responses']['forbidden'] - } - } - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - 'repos/get-views': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['view-traffic'] - } - } - 403: components['responses']['forbidden'] - } - } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - 'repos/transfer': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['minimal-repository'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: number[] - } - } - } - } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/check-vulnerability-alerts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - 404: unknown - } - } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/enable-vulnerability-alerts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/disable-vulnerability-alerts': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - 'repos/download-zipball-archive': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - ref: string - } - } - responses: { - /** Response */ - 302: never - } - } - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-using-template': { - parameters: { - path: { - template_owner: string - template_repo: string - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description A short description of the new repository. */ - description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - include_all_branches?: boolean - /** @description The name of the new repository. */ - name: string - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - owner?: string - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - private?: boolean - } - } - } - } - /** - * Lists all public repositories in the order that they were created. - * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. - */ - 'repos/list-public': { - parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components['parameters']['since-repo'] - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - } - } - /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/list-environment-secrets': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['actions-secret'][] - total_count: number - } - } - } - } - } - /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/get-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-secret'] - } - } - } - } - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - } - } - } - } - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Default response */ - 204: never - } - } - /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/get-environment-public-key': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-public-key'] - } - } - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/list-provisioned-groups-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - /** attributes to exclude */ - excludedAttributes?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-group-list-enterprise'] - } - } - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. - */ - 'enterprise-admin/provision-and-invite-enterprise-group': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] - /** @description The SCIM schema URIs. */ - schemas: string[] - } - } - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/get-provisioning-information-for-enterprise-group': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components['parameters']['scim-group-id'] - } - query: { - /** Attributes to exclude. */ - excludedAttributes?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. - */ - 'enterprise-admin/set-information-for-provisioned-enterprise-group': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components['parameters']['scim-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] - /** @description The SCIM schema URIs. */ - schemas: string[] - } - } - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-scim-group-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components['parameters']['scim-group-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - */ - 'enterprise-admin/update-attribute-for-enterprise-group': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - scim_group_id: components['parameters']['scim-group-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown - }[] - /** @description The SCIM schema URIs. */ - schemas: string[] - } - } - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. - * - * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. - */ - 'enterprise-admin/list-provisioned-identities-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-user-list-enterprise'] - } - } - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. - * - * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. - */ - 'enterprise-admin/provision-and-invite-enterprise-user': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description List of user emails. */ - emails: { - /** @description Whether this email address is the primary address. */ - primary: boolean - /** @description The type of email address. */ - type: string - /** @description The email address. */ - value: string - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] - name: { - /** @description The last name of the user. */ - familyName: string - /** @description The first name of the user. */ - givenName: string - } - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - } - } - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/get-provisioning-information-for-enterprise-user': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - 'enterprise-admin/set-information-for-provisioned-enterprise-user': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description List of user emails. */ - emails: { - /** @description Whether this email address is the primary address. */ - primary: boolean - /** @description The type of email address. */ - type: string - /** @description The email address. */ - value: string - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] - name: { - /** @description The last name of the user. */ - familyName: string - /** @description The first name of the user. */ - givenName: string - } - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - } - } - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-user-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - * - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - 'enterprise-admin/update-attribute-for-enterprise-user': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { [key: string]: unknown }[] - /** @description The SCIM schema URIs. */ - schemas: string[] - } - } - } - } - /** - * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. - * - * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. - * - * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: - * - * 1. The user is granted access by the IdP and is not a member of the GitHub organization. - * - * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. - * - * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: - * - If the user signs in, their GitHub account is linked to this entry. - * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. - */ - 'scim/list-provisioned-identities': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: number - /** Used for pagination: the number of results to return. */ - count?: number - /** - * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: - * - * `?filter=userName%20eq%20\"Octocat\"`. - * - * To filter results for the identity with the email `octocat@github.com`, you would use this query: - * - * `?filter=emails%20eq%20\"octocat@github.com\"`. - */ - filter?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/scim+json': components['schemas']['scim-user-list'] - } - } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - } - } - /** Provision organization membership for a user, and send an activation email to the email address. */ - 'scim/provision-and-invite-user': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/scim+json': components['schemas']['scim-user'] - } - } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - 409: components['responses']['scim_conflict'] - 500: components['responses']['scim_internal_error'] - } - requestBody: { - content: { - 'application/json': { - active?: boolean - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - primary?: boolean - type?: string - value: string - }[] - externalId?: string - groups?: string[] - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - familyName: string - formatted?: string - givenName: string - } - schemas?: string[] - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - } - } - } - } - 'scim/get-provisioning-information-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/scim+json': components['schemas']['scim-user'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - } - } - /** - * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. - * - * You must at least provide the required values for the user: `userName`, `name`, and `emails`. - * - * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. - */ - 'scim/set-information-for-provisioned-user': { - parameters: { - path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/scim+json': components['schemas']['scim-user'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - } - requestBody: { - content: { - 'application/json': { - active?: boolean - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - primary?: boolean - type?: string - value: string - }[] - externalId?: string - groups?: string[] - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - familyName: string - formatted?: string - givenName: string - } - schemas?: string[] - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - } - } - } - } - 'scim/delete-user-from-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - } - } - /** - * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). - * - * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. - * - * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. - * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` - */ - 'scim/update-attribute-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/scim+json': components['schemas']['scim-user'] - } - } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] - /** Response */ - 429: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - Operations: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: - | { - active?: boolean | null - externalId?: string | null - familyName?: string | null - givenName?: string | null - userName?: string | null - } - | { - primary?: boolean - value?: string - }[] - | string - }[] - schemas?: string[] - } - } - } - } - /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. - */ - 'search/code': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'indexed' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['code-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match - * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: - * - * `q=repo:octocat/Spoon-Knife+css` - */ - 'search/commits': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'author-date' | 'committer-date' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['commit-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - } - } - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted - * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` - * - * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. - * - * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." - */ - 'search/issues-and-pull-requests': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: - | 'comments' - | 'reactions' - | 'reactions-+1' - | 'reactions--1' - | 'reactions-smile' - | 'reactions-thinking_face' - | 'reactions-heart' - | 'reactions-tada' - | 'interactions' - | 'created' - | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['issue-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: - * - * `q=bug+defect+enhancement&repository_id=64778136` - * - * The labels that best match the query appear first in the search results. - */ - 'search/labels': { - parameters: { - query: { - /** The id of the repository. */ - repository_id: number - /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'created' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['label-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: - * - * `q=tetris+language:assembly&sort=stars&order=desc` - * - * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. - */ - 'search/repos': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['repo-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` - * - * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. - */ - 'search/topics': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['topic-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - } - } - /** - * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you're looking for a list of popular users, you might try this query: - * - * `q=tom+repos:%3E42+followers:%3E1000` - * - * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. - */ - 'search/users': { - parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'followers' | 'repositories' | 'joined' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - incomplete_results: boolean - items: components['schemas']['user-search-result-item'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ - 'teams/get-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. - * - * To delete a team, the authenticated user must be an organization owner or team maintainer. - * - * If you are an organization owner, deleting a parent team will delete all of its child teams as well. - */ - 'teams/delete-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. - * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. - * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. - */ - 'teams/update-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The description of the team. */ - description?: string - /** @description The name of the team. */ - name: string - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. - * - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/list-discussions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-discussion'][] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. - * - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'teams/create-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean - /** @description The discussion post's title. */ - title: string - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. - * - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/get-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. - * - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. - * - * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/update-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion post's body text. */ - body?: string - /** @description The discussion post's title. */ - title?: string - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. - * - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/list-discussion-comments-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-discussion-comment'][] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. - * - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'teams/create-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion comment's body text. */ - body: string - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/get-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. - * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. - * - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/update-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-discussion-comment'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The discussion comment's body text. */ - body: string - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/list-for-team-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - */ - 'reactions/create-for-team-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. - * - * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/list-for-team-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. - * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - */ - 'reactions/create-for-team-discussion-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - 'teams/list-pending-invitations-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. - * - * Team members will include the members of child teams. - */ - 'teams/list-members-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** - * Filters members returned by their role in the team. Can be one of: - * \* `member` - normal members of the team. - * \* `maintainer` - team maintainers. - * \* `all` - all members of the team. - */ - role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * The "Get team member" endpoint (described below) is deprecated. - * - * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - 'teams/get-member-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** if user is a member */ - 204: never - /** if user is not a member */ - 404: unknown - } - } - /** - * The "Add team member" endpoint (described below) is deprecated. - * - * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-member-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - 422: unknown - } - } - /** - * The "Remove team member" endpoint (described below) is deprecated. - * - * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - 'teams/remove-member-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - /** Not Found if team synchronization is setup */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. - * - * Team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. - * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - 'teams/get-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. - */ - 'teams/add-or-update-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - /** Forbidden if team synchronization is set up */ - 403: unknown - 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - 'teams/remove-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - /** if team synchronization is set up */ - 403: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. - * - * Lists the organization projects for a team. - */ - 'teams/list-projects-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-project'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. - * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - */ - 'teams/check-permissions-for-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. - * - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - */ - 'teams/add-or-update-project-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { - content: { - 'application/json': { - documentation_url?: string - message?: string - } - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * @enum {string} - */ - permission?: 'read' | 'write' | 'admin' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. - * - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. - */ - 'teams/remove-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - 'teams/list-repos-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * **Note**: Repositories inherited through a parent team will also be checked. - * - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. - * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - 'teams/check-permissions-for-repo-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Alternative response with extra repository information */ - 200: { - content: { - 'application/json': components['schemas']['team-repository'] - } - } - /** Response if repository is managed by this team */ - 204: never - /** Not Found if repository is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-or-update-repo-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - } - } - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. - * - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. - */ - 'teams/remove-repo-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - 'teams/list-idp-groups-for-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - 'teams/create-or-update-idp-group-connections-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** @example "moar cheese pleese" */ - description?: string - /** @description Description of the IdP group. */ - group_description: string - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @example "caceab43fc9ffa20081c" */ - id?: string - /** @example "external-team-6c13e7288ef7" */ - name?: string - }[] - /** @example "I am not a timestamp" */ - synced_at?: string - } - } - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - 'teams/list-child-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** if child teams exist */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. - * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. - */ - 'users/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ - 'users/update-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new short biography of the user. */ - bio?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - blog?: string - /** - * @description The new company of the user. - * @example Acme corporation - */ - company?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - email?: string - /** @description The new hiring availability of the user. */ - hireable?: boolean - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - location?: string - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - name?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - twitter_username?: string | null - } - } - } - } - /** List the users you've blocked on your personal account. */ - 'users/list-blocked-by-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'users/check-blocked': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** If the user is blocked: */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - /** If the user is not blocked: */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - 'users/block': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'users/unblock': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - repository_id?: components['parameters']['repository-id-in-query'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - codespaces: components['schemas']['codespace'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-for-authenticated-user': { - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Repository id for this codespace */ - repository_id: number - /** @description Working directory for this codespace */ - working_directory?: string - } - | { - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Pull request number for this codespace */ - pull_request: { - /** @description Pull request number */ - pull_request_number: number - /** @description Repository id for this codespace */ - repository_id: number - } - /** @description Working directory for this codespace */ - working_directory?: string - } - } - } - } - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/get-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/delete-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - 202: components['responses']['accepted'] - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/update-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description A valid machine to transition this codespace to. */ - machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - recent_folders?: string[] - } - } - } - } - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/export-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['codespace-export-details'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/get-export-details-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - export_id: components['parameters']['export-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace-export-details'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/codespace-machines-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - machines: components['schemas']['codespace-machine'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/start-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - /** Payment required */ - 402: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] - } - } - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/stop-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/list-secrets-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - secrets: components['schemas']['codespaces-secret'][] - total_count: number - } - } - } - } - } - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/get-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-secret'] - } - } - } - } - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'codespaces/create-or-update-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response after successfully creaing a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: string[] - } - } - } - } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - 'codespaces/delete-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/list-repositories-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - repositories: components['schemas']['minimal-repository'][] - total_count: number - } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/set-repositories-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** No Content when repositories were added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - requestBody: { - content: { - 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: number[] - } - } - } - } - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/add-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/remove-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was removed from the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - 'codespaces/get-public-key-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-user-public-key'] - } - } - } - } - /** Sets the visibility for your primary email addresses. */ - 'users/set-primary-email-visibility-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['email'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Denotes whether an email is publicly visible. - * @enum {string} - */ - visibility: 'public' | 'private' - } - } - } - } - /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ - 'users/list-emails-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['email'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** This endpoint is accessible with the `user` scope. */ - 'users/add-email-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['email'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** - * @description Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. - * @example [] - */ - emails: string[] - } - | string[] - | string - } - } - } - /** This endpoint is accessible with the `user` scope. */ - 'users/delete-email-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description Email addresses associated with the GitHub user account. */ - emails: string[] - } - | string[] - | string - } - } - } - /** Lists the people following the authenticated user. */ - 'users/list-followers-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** Lists the people who the authenticated user follows. */ - 'users/list-followed-by-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'users/check-person-is-followed-by-authenticated': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** if the person is followed by the authenticated user */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - /** if the person is not followed by the authenticated user */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - 'users/follow': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ - 'users/unfollow': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/list-gpg-keys-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['gpg-key'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/create-gpg-key-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['gpg-key'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A GPG key in ASCII-armored format. */ - armored_public_key: string - } - } - } - } - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/get-gpg-key-for-authenticated-user': { - parameters: { - path: { - /** gpg_key_id parameter */ - gpg_key_id: components['parameters']['gpg-key-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gpg-key'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/delete-gpg-key-for-authenticated-user': { - parameters: { - path: { - /** gpg_key_id parameter */ - gpg_key_id: components['parameters']['gpg-key-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You can find the permissions for the installation under the `permissions` key. - */ - 'apps/list-installations-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** You can find the permissions for the installation under the `permissions` key. */ - 200: { - headers: {} - content: { - 'application/json': { - installations: components['schemas']['installation'][] - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] - } - } - /** - * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The access the user has to each repository is included in the hash under the `permissions` key. - */ - 'apps/list-installation-repos-for-authenticated-user': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** The access the user has to each repository is included in the hash under the `permissions` key. */ - 200: { - headers: {} - content: { - 'application/json': { - repositories: components['schemas']['repository'][] - repository_selection?: string - total_count: number - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Add a single repository to an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - 'apps/add-repo-to-installation-for-authenticated-user': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Remove a single repository from an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. - */ - 'apps/remove-repo-from-installation-for-authenticated-user': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - repository_id: components['parameters']['repository-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - 'interactions/get-restrictions-for-authenticated-user': { - responses: { - /** Default response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - 'interactions/set-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - 'interactions/remove-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 204: never - } - } - /** - * List issues across owned and member repositories assigned to the authenticated user. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/list-for-authenticated-user': { - parameters: { - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - } - } - /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/list-public-ssh-keys-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['key'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/create-public-ssh-key-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['key'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The public SSH key to add to your GitHub account. */ - key: string - /** - * @description A descriptive name for the new key. - * @example Personal MacBook Air - */ - title?: string - } - } - } - } - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/get-public-ssh-key-for-authenticated-user': { - parameters: { - path: { - /** key_id parameter */ - key_id: components['parameters']['key-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['key'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'users/delete-public-ssh-key-for-authenticated-user': { - parameters: { - path: { - /** key_id parameter */ - key_id: components['parameters']['key-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - 'apps/list-subscriptions-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['user-marketplace-purchase'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 404: components['responses']['not_found'] - } - } - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - 'apps/list-subscriptions-for-authenticated-user-stubbed': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['user-marketplace-purchase'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - } - } - 'orgs/list-memberships-for-authenticated-user': { - parameters: { - query: { - /** Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. */ - state?: 'active' | 'pending' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['org-membership'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - } - 'orgs/get-membership-for-authenticated-user': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-membership'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'orgs/update-membership-for-authenticated-user': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-membership'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The state that the membership should be in. Only `"active"` will be accepted. - * @enum {string} - */ - state: 'active' - } - } - } - } - /** Lists all migrations a user has started. */ - 'migrations/list-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['migration'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** Initiates the generation of a user migration archive. */ - 'migrations/start-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['migration'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Exclude attributes from the API response to improve performance - * @example [ - * "repositories" - * ] - */ - exclude?: 'repositories'[] - /** - * @description Do not include attachments in the migration - * @example true - */ - exclude_attachments?: boolean - /** - * @description Indicates whether projects owned by the organization or users should be excluded. - * @example true - */ - exclude_owner_projects?: boolean - /** - * @description Do not include releases in the migration - * @example true - */ - exclude_releases?: boolean - /** - * @description Lock the repositories being migrated at the start of the migration - * @example true - */ - lock_repositories?: boolean - repositories: string[] - } - } - } - } - /** - * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: - * - * * `pending` - the migration hasn't started yet. - * * `exporting` - the migration is in progress. - * * `exported` - the migration finished successfully. - * * `failed` - the migration failed. - * - * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). - */ - 'migrations/get-status-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - exclude?: string[] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['migration'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: - * - * * attachments - * * bases - * * commit\_comments - * * issue\_comments - * * issue\_events - * * issues - * * milestones - * * organizations - * * projects - * * protected\_branches - * * pull\_request\_reviews - * * pull\_requests - * * releases - * * repositories - * * review\_comments - * * schema - * * users - * - * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. - */ - 'migrations/get-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 302: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - 'migrations/delete-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - 'migrations/unlock-repo-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists all the repositories for this user migration. */ - 'migrations/list-repos-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * List organizations for the authenticated user. - * - * **OAuth scope requirements** - * - * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. - */ - 'orgs/list-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-simple'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-authenticated-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'projects/create-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body?: string | null - /** - * @description Name of the project - * @example Week One Sprint - */ - name: string - } - } - } - } - /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ - 'users/list-public-emails-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['email'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - */ - 'repos/list-for-authenticated-user': { - parameters: { - query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ - visibility?: 'all' | 'public' | 'private' - /** - * Comma-separated list of values. Can include: - * \* `owner`: Repositories that are owned by the authenticated user. - * \* `collaborator`: Repositories that the user has been added to as a collaborator. - * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. - */ - affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ - type?: 'all' | 'owner' | 'public' | 'private' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ - sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - before?: components['parameters']['before'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['repository'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - } - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository. - */ - 'repos/create-for-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - allow_rebase_merge?: boolean - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether the repository is initialized with a minimal README. - * @default false - */ - auto_init?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** @description A short description of the repository. */ - description?: string - /** - * @description The desired language or platform to apply to the .gitignore. - * @example Haskell - */ - gitignore_template?: string - /** - * @description Whether downloads are enabled. - * @default true - * @example true - */ - has_downloads?: boolean - /** - * @description Whether issues are enabled. - * @default true - * @example true - */ - has_issues?: boolean - /** - * @description Whether projects are enabled. - * @default true - * @example true - */ - has_projects?: boolean - /** - * @description Whether the wiki is enabled. - * @default true - * @example true - */ - has_wiki?: boolean - /** @description A URL with more information about the repository. */ - homepage?: string - /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true - */ - is_template?: boolean - /** - * @description The license keyword of the open source license for this repository. - * @example mit - */ - license_template?: string - /** - * @description The name of the repository. - * @example Team Environment - */ - name: string - /** - * @description Whether the repository is private. - * @default false - */ - private?: boolean - /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ - team_id?: number - } - } - } - } - /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ - 'repos/list-invitations-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['repository-invitation'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'repos/decline-invitation-for-authenticated-user': { - parameters: { - path: { - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - } - } - 'repos/accept-invitation-for-authenticated-user': { - parameters: { - path: { - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - } - } - /** - * Lists repositories the authenticated user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - 'activity/list-repos-starred-by-authenticated-user': { - parameters: { - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['repository'][] - 'application/vnd.github.v3.star+json': components['schemas']['starred-repository'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'activity/check-repo-is-starred-by-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response if this repository is starred by you */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - /** Not Found if this repository is not starred by you */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'activity/star-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'activity/unstar-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists repositories the authenticated user is watching. */ - 'activity/list-watched-repos-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ - 'teams/list-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team-full'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. - * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. - */ - 'users/list': { - parameters: { - query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - } - } - /** - * Provides publicly available information about someone with a GitHub account. - * - * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" - * - * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). - * - * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". - */ - 'users/get-by-username': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } - } - 404: components['responses']['not_found'] - } - } - /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ - 'activity/list-events-for-authenticated-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ - 'activity/list-org-events-for-authenticated-user': { - parameters: { - path: { - username: components['parameters']['username'] - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - 'activity/list-public-events-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - /** Lists the people following the specified user. */ - 'users/list-followers-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - /** Lists the people who the specified user follows. */ - 'users/list-following-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - } - } - 'users/check-following-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - target_user: string - } - } - responses: { - /** if the user follows the target user */ - 204: never - /** if the user does not follow the target user */ - 404: unknown - } - } - /** Lists public gists for the specified user: */ - 'gists/list-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Lists the GPG keys for a user. This information is accessible by anyone. */ - 'users/list-gpg-keys-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['gpg-key'][] - } - } - } - } - /** - * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. - * - * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: - * - * ```shell - * curl -u username:token - * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 - * ``` - */ - 'users/get-context-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */ - subject_type?: 'organization' | 'repository' | 'issue' | 'pull_request' - /** Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ - subject_id?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hovercard'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-user-installation': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - } - } - /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ - 'users/list-public-keys-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['key-simple'][] - } - } - } - } - /** - * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. - */ - 'orgs/list-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-simple'][] - } - } - } - } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'projects/list-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['project'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ - 'activity/list-received-events-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - 'activity/list-received-public-events-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['event'][] - } - } - } - } - /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ - 'repos/list-for-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Can be one of `all`, `owner`, `member`. */ - type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ - sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - } - } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-actions-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-packages-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-shared-storage-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Lists repositories a user has starred. - * - * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: - */ - 'activity/list-repos-starred-by-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['starred-repository'][] | components['schemas']['repository'][] - } - } - } - } - /** Lists repositories a user is watching. */ - 'activity/list-repos-watched-by-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - } - } - /** Get a random sentence from the Zen of GitHub */ - 'meta/get-zen': { - responses: { - /** Response */ - 200: { - content: { - 'text/plain': string - } - } - } - } -} - -export interface external {} diff --git a/test/v3/expected/jsdoc.alphabetized.ts b/test/v3/expected/jsdoc.alphabetized.ts deleted file mode 100644 index a824b951e..000000000 --- a/test/v3/expected/jsdoc.alphabetized.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/contacts': { - get: operations['getContacts'] - } - '/contacts/{userUid}': { - get: operations['getContactInfo'] - } - '/contacts/{userUid}/icon': { - get: operations['getContactIcon'] - } - '/contacts/me': { - get: operations['getMyInfo'] - } - '/contacts/me/icon': { - get: operations['getMyIcon'] - delete: operations['deleteMyIcon'] - } -} - -export interface components { - schemas: { - /** Parent of most important objects */ - BaseEntity: { - /** - * Format: date-time - * @description It's date example - * @example 1999-03-31 15:00:00.000 - */ - created_at?: string - /** @example false */ - deleted?: boolean - /** - * Format: nanoid - * @deprecated - * @description Test description with deprecated - * @example njbusD52k6YoRG346tPgD - */ - uid?: string - /** - * Format: date-time - * @example 2020-07-10 10:10:00.000 - */ - updated_at?: string - } - /** Image for preview */ - Image: { - /** @example LEHV6nWB2yk8pyo0adR*.7kCMdnj */ - blurhash?: string - /** @example 128 */ - height: unknown - /** @example https://shantichat.com/data/V1StGXR8_Z5jdHi6B-myT/white-rabbit.png */ - url: string - /** @example 128 */ - width: unknown - } - /** User object */ - User: components['schemas']['BaseEntity'] & { - /** - * @default test - * @example The One - */ - description?: string - icon?: components['schemas']['Image'] - /** - * Format: date-time - * @example 2020-07-10 15:00:00.000 - */ - last_online_at?: string - /** @example Thomas A. Anderson */ - name?: string - /** @example America/Chicago */ - timezone?: string - } - } -} - -export interface operations { - getContacts: { - responses: { - /** OK */ - 200: { - content: { - 'application/json': components['schemas']['User'][] - } - } - } - } - getContactInfo: { - parameters: { - path: { - userUid: string - } - } - responses: { - /** OK */ - 200: { - content: { - 'application/json': components['schemas']['User'] - } - } - } - } - getContactIcon: { - parameters: { - path: { - userUid: string - } - } - responses: { - /** OK */ - 200: { - content: { - 'application/json': components['schemas']['Image'] - } - } - } - } - getMyInfo: { - responses: { - /** OK */ - 200: { - content: { - 'application/json': components['schemas']['User'] - } - } - } - } - getMyIcon: { - responses: { - /** OK */ - 200: { - content: { - 'application/json': components['schemas']['Image'] - } - } - } - } - deleteMyIcon: { - responses: { - /** OK */ - 200: unknown - } - } -} - -export interface external {} diff --git a/test/v3/expected/jsdoc2.alphabetized.ts b/test/v3/expected/jsdoc2.alphabetized.ts deleted file mode 100644 index 862a5d448..000000000 --- a/test/v3/expected/jsdoc2.alphabetized.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/v1/getUser2': { - /** UserController.getUser2 */ - get: operations['UserController.getUser2.DjHhjSamaD'] - } -} - -export interface components { - schemas: { - IUser: { - id: number - name?: string - } - IUserWithId: components['schemas']['Partial>'] | string - IUserWithName: { - name: string - } - 'Partial>': { - id?: number - } - } -} - -export interface operations { - /** UserController.getUser2 */ - 'UserController.getUser2.DjHhjSamaD': { - parameters: { - query: { - param1?: number - param2?: string | components['schemas']['IUserWithId'] - param3?: string | components['schemas']['IUserWithName'] - } - } - responses: { - /** Successful response */ - 200: { - content: { - 'application/json': unknown - } - } - } - } -} - -export interface external {} diff --git a/test/v3/expected/manifold.alphabetized.ts b/test/v3/expected/manifold.alphabetized.ts deleted file mode 100644 index 4e0eaffdf..000000000 --- a/test/v3/expected/manifold.alphabetized.ts +++ /dev/null @@ -1,1214 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/internal/products': { - get: { - parameters: { - query: { - /** - * Base32 encoded 18 byte identifier of the provider that these - * products must belong to. - */ - provider_id?: string - /** Filter results to only include those that have this label. */ - label?: string - /** Return only products matching at least one of the tags. */ - tags?: string[] - /** Return product listings without plan information */ - include_plans?: boolean - } - } - responses: { - /** A product. */ - 200: { - content: { - 'application/json': components['schemas']['ExpandedProduct'][] - } - } - /** Invalid provider_id supplied */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - } - '/plans/': { - get: { - parameters: { - query: { - /** Return the plans that are associated with this product. */ - product_id: string[] - /** Filter results to only include those that have this label. */ - label?: string - } - } - responses: { - /** A list of plans for the given product. */ - 200: { - content: { - 'application/json': components['schemas']['ExpandedPlan'][] - } - } - /** Invalid Parameters Provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Could not find product */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - post: { - responses: { - /** Complete plan object */ - 201: { - content: { - 'application/json': components['schemas']['Plan'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Forbidden */ - 403: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Plan already exists with that label */ - 409: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Plan create request */ - requestBody: { - content: { - 'application/json': components['schemas']['CreatePlan'] - } - } - } - } - '/plans/{id}': { - get: { - parameters: { - path: { - /** - * ID of the plan to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** A plan. */ - 200: { - content: { - 'application/json': components['schemas']['ExpandedPlan'] - } - } - /** Invalid Plan ID Provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unknown plan error */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected error */ - default: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - patch: { - parameters: { - path: { - /** - * ID of the plan to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** Complete product plan */ - 200: { - content: { - 'application/json': components['schemas']['Plan'] - } - } - /** Invalid Plan ID */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Plan not found error */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Plan update request */ - requestBody: { - content: { - 'application/json': components['schemas']['UpdatePlan'] - } - } - } - } - '/products/': { - get: { - parameters: { - query: { - /** - * Base32 encoded 18 byte identifier of the provider that these - * products must belong to. - */ - provider_id?: string - /** Filter results to only include those that have this label. */ - label?: string - /** Return only products matching at least one of the tags. */ - tags?: string[] - } - } - responses: { - /** A product. */ - 200: { - content: { - 'application/json': components['schemas']['Product'][] - } - } - /** Invalid provider_id supplied */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - post: { - responses: { - /** Complete product object */ - 201: { - content: { - 'application/json': components['schemas']['Product'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Forbidden */ - 403: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Product already exists with that label */ - 409: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Product create request */ - requestBody: { - content: { - 'application/json': components['schemas']['CreateProduct'] - } - } - } - } - '/products/{id}': { - get: { - parameters: { - path: { - /** - * ID of the product to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** A product. */ - 200: { - content: { - 'application/json': components['schemas']['Product'] - } - } - /** Invalid Product ID */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Product not found error */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - patch: { - parameters: { - path: { - /** - * ID of the product to lookup, stored as a base32 encoded 18 byte - * identifier. - */ - id: string - } - } - responses: { - /** Complete product object */ - 200: { - content: { - 'application/json': components['schemas']['Product'] - } - } - /** Invalid Product ID */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Product not found error */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Product update request */ - requestBody: { - content: { - 'application/json': components['schemas']['UpdateProduct'] - } - } - } - } - '/providers/': { - get: { - parameters: { - query: { - /** Filter results to only include those that have this label. */ - label?: string - } - } - responses: { - /** A list of providers. */ - 200: { - content: { - 'application/json': components['schemas']['Provider'][] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - post: { - responses: { - /** Complete provider object */ - 201: { - content: { - 'application/json': components['schemas']['Provider'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Forbidden */ - 403: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Provider already exists with that label */ - 409: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Provider create request */ - requestBody: { - content: { - 'application/json': components['schemas']['CreateProvider'] - } - } - } - } - '/providers/{id}': { - get: { - parameters: { - path: { - /** ID of the provider to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** A provider. */ - 200: { - content: { - 'application/json': components['schemas']['Provider'] - } - } - /** Unknown provider error */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - patch: { - parameters: { - path: { - /** ID of the provider to update, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** Complete provider object */ - 200: { - content: { - 'application/json': components['schemas']['Provider'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Forbidden */ - 403: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Provider not found */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Provider already exists with that label */ - 409: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Provider update request */ - requestBody: { - content: { - 'application/json': components['schemas']['UpdateProvider'] - } - } - } - } - '/regions/': { - get: { - parameters: { - query: { - /** Filter results to only include the regions that have this location. */ - location?: string - /** - * Filter results to only include the regions that are on this - * platform. - */ - platform?: string - } - } - responses: { - /** A list of regions. */ - 200: { - content: { - 'application/json': components['schemas']['Region'][] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - post: { - responses: { - /** Complete region object */ - 201: { - content: { - 'application/json': components['schemas']['Region'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Region already exists for that platform and location */ - 409: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Region create request */ - requestBody: { - content: { - 'application/json': components['schemas']['CreateRegion'] - } - } - } - } - '/regions/{id}': { - get: { - parameters: { - path: { - /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** A region. */ - 200: { - content: { - 'application/json': components['schemas']['Region'] - } - } - /** Provided Region ID is Invalid */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Region could not be found */ - 404: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - } - patch: { - parameters: { - path: { - /** ID of the region to lookup, stored as a base32 encoded 18 byte identifier. */ - id: string - } - } - responses: { - /** Complete region object */ - 200: { - content: { - 'application/json': components['schemas']['Region'] - } - } - /** Invalid request provided */ - 400: { - content: { - 'application/json': components['schemas']['Error'] - } - } - /** Unexpected Error */ - 500: { - content: { - 'application/json': components['schemas']['Error'] - } - } - } - /** Region update request */ - requestBody: { - content: { - 'application/json': components['schemas']['UpdateRegion'] - } - } - } - } -} - -export interface components { - schemas: { - CreatePlan: { - body: components['schemas']['PlanBody'] - } - CreateProduct: { - body: components['schemas']['ProductBody'] - } - CreateProvider: { - body: components['schemas']['ProviderBody'] - } - CreateRegion: { - body: components['schemas']['RegionBody'] - } - /** @description Unexpected error */ - Error: { - /** @description Explanation of the errors */ - message: string[] - /** @description The error type */ - type: string - } - ExpandedFeature: components['schemas']['FeatureType'] & { - value: components['schemas']['FeatureValueDetails'] - /** @description The string value set for the feature on the plan, this should only be used if the value property is null. */ - value_string: string - } - ExpandedPlan: { - body: components['schemas']['ExpandedPlanBody'] - id: components['schemas']['ID'] - /** @enum {string} */ - type: 'plan' - version: number - } - ExpandedPlanBody: components['schemas']['PlanBody'] & { - /** @description A boolean flag that indicates if a plan has customizable features. */ - customizable?: boolean - /** @description Plan cost using its default features plus base cost. */ - defaultCost?: number - /** @description An array of feature definitions for the plan, as defined on the Product. */ - expanded_features: components['schemas']['ExpandedFeature'][] - /** @description A boolean flag that indicates if a plan is free or not based on it's cost and features. */ - free: boolean - } - ExpandedProduct: { - body: components['schemas']['ProductBody'] - id: components['schemas']['ID'] - plans?: components['schemas']['ExpandedPlan'][] - provider: components['schemas']['Provider'] - /** @enum {string} */ - type: 'product' - version: number - } - /** - * @description Optional container for additional details relating to numeric features. - * This is required if the feature is measurable and numeric. - */ - FeatureNumericDetails: { - cost_ranges?: components['schemas']['FeatureNumericRange'][] | null - /** - * @description Sets the increment at which numbers can be selected if customizable, by - * default this is 1; for example, setting this to 8 would only allow integers - * in increments of 8 ( 0, 8, 16, ... ). This property is not used if the - * feature is measurable; except if it is set to 0, setting the increment to 0 - * means this numeric details has no scale, and will not be or customizable. - * Some plans may not have a measureable or customizable feature. - */ - increment?: number - /** @description Maximum value that can be set by a user if customizable */ - max?: number | null - /** @description Minimum value that can be set by a user if customizable */ - min?: number - /** @description Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ - suffix?: string | null - } | null - FeatureNumericRange: { - /** - * @description An integer in 10,000,000ths of cents, will be multiplied by the - * numeric value set in the feature to determine the cost. - */ - cost_multiple?: number - /** - * @description Defines the end of the range ( inclusive ), from the previous, or 0; - * where the cost_multiple starts taking effect. If set to -1 this defines the - * range to infinity, or the maximum integer the system can handle - * ( whichever comes first ). - */ - limit?: number - } - /** - * @description A feature type represents the different aspects of a product that are - * offered, these features can manifest differently depending on the plan. - */ - FeatureType: { - /** - * @description This sets whether or not the feature can be customized by a consumer. - * @default false - */ - customizable?: boolean - /** - * @description This sets whether or not the feature can be downgraded by the consumer after the - * resource has provisioned. Downgrading means setting a lower value or selecting a - * lower element in the list. - * - * @default false - */ - downgradable?: boolean - label: components['schemas']['Label'] - /** - * @description Sets if this feature’s value is trackable from the provider, - * this only really affects numeric constraints. - * - * @default false - */ - measurable?: boolean - name: components['schemas']['Name'] - /** @enum {string} */ - type: 'boolean' | 'string' | 'number' - /** - * @description This sets whether or not the feature can be upgraded by the consumer after the - * resource has provisioned. Upgrading means setting a higher value or selecting a - * higher element in the list. - * - * @default false - */ - upgradable?: boolean - values?: components['schemas']['FeatureValuesList'] - } - FeatureValue: { - feature: components['schemas']['Label'] - value: components['schemas']['FeatureValueLabel'] - } - FeatureValueDetails: { - /** - * @description The cost that will be added to the monthly plan cost when this value - * is selected or is default for the plan. - * Cost is deprecated in favor of the `price.cost` field. - */ - cost?: number - label: components['schemas']['FeatureValueLabel'] - name: components['schemas']['Name'] - numeric_details?: components['schemas']['FeatureNumericDetails'] - /** - * @description Price describes the cost of a feature. It should be preferred over - * the `cost` property. - */ - price?: { - /** - * @description Cost is the price in cents that will be added to plan's base cost - * when this value is selected or is default for the plan. - * Number features should use the cost range instead. - */ - cost?: number - /** @description Description explains how a feature is calculated to the user. */ - description?: string - formula?: components['schemas']['PriceFormula'] - /** - * @description When a feature is used to multiply the cost of the plan or of - * another feature, multiply factor is used for calculation. - * A feature cannot have both a cost and a multiply factor. - */ - multiply_factor?: number - } - } - /** @description A machine readable unique label, which is url safe. */ - FeatureValueLabel: string - /** - * @description A list of allowable values for the feature. - * To define values for a boolean feature type, only `true` is required, - * using the label `true`, name and numeric_details will be ignored. - * If the feature is set measurable it is expected that these all have a - * `numeric_details` definition, and the plan will determine which - * `numeric_details` set is used based on it's setting. - */ - FeatureValuesList: components['schemas']['FeatureValueDetails'][] | null - /** @description A flexible identifier for internal or external entities. */ - FlexID: string - /** - * Format: base32ID - * @description A base32 encoded 18 byte identifier. - */ - ID: string - /** @description A machine readable unique label, which is url safe. */ - Label: string - /** @description A location of where a potential resource can be provisioned. */ - Location: string - /** - * Format: url - * @description Logo used for Provider and Product listings. - * - * Must be square (same width and height) and minimum 400px. Maximum of 800px. - */ - LogoURL: string - /** @description A name of an entity which is displayed to a human. */ - Name: string - /** @description A flexible identifier for internal or external entities. */ - OptionalFlexID: string | null - /** - * Format: base32ID - * @description A base32 encoded 18 byte identifier. - */ - OptionalID: string | null - /** @description A machine readable unique label, which is url safe. */ - OptionalLabel: string | null - /** - * Format: url - * @description Logo used for Provider and Product listings. - * - * Must be square (same width and height) and minimum 400px. Maximum of 800px. - */ - OptionalLogoURL: string | null - /** @description A name of an entity which is displayed to a human. */ - OptionalName: string | null - Plan: { - body: components['schemas']['PlanBody'] - id: components['schemas']['ID'] - /** @enum {string} */ - type: 'plan' - version: number - } - PlanBody: { - /** @description Dollar value in cents. */ - cost: number - /** @description Array of Feature Values */ - features: components['schemas']['FeatureValue'][] - label: components['schemas']['Label'] - name: components['schemas']['Name'] - product_id: components['schemas']['ID'] - provider_id: components['schemas']['ID'] - /** @description Array of Region IDs */ - regions: components['schemas']['ID'][] - resizable_to?: components['schemas']['PlanResizeList'] - state: components['schemas']['PlanState'] - /** - * @description The number of days a user gets as a free trial when subscribing to - * this plan. Trials are valid only once per product; changing plans - * or adding an additional subscription will not start a new trial. - */ - trial_days?: number - } - /** @description Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ - PlanResizeList: components['schemas']['ID'][] | null - /** @enum {string} */ - PlanState: 'hidden' | 'available' | 'grandfathered' | 'unlisted' - /** @description A name of a platform which is used to provision resources. */ - Platform: string - /** - * @description Describes how a feature cost should be calculated. An empty - * string defaults to the normal price calculation using the value cost. - * Formula uses Reverse Polish notation for statements. It supports - * addition, subtraction and multiplication operations. Operations must be - * grouped with parenthesis. - * Number literals can be used for formulas. Eg: "(- feature-a#cost 500)" - * will remove 5 dollars from the cost of feature a. - * Multiplication operation supports either a cost multiplied by a - * factor or a number multiplied by a factor. - * In a plan formula the following keywords are available: - * - `plan#base_cost` is the base cost of a plan in cents - * - `plan#partial_cost` is the base cost plus its feature costs calculated - * so far. Feature formulas are calculated in the order they are defined, - * so features can refer to another feature values or the partial_cost of - * the plan. - * - `this-feature-label#multiply_factor` is the multiply_factor of this - * feature as a float number. - * - `another-feature-label#cost` is the cost of a feature matching the label - * in cents. - * - `another-feature-label#number` is the numeric value of a number feature - * In a feature formula, plan base cost and total cost cannot be used - */ - PriceFormula: string - Product: { - body: components['schemas']['ProductBody'] - id: components['schemas']['ID'] - /** @enum {string} */ - type: 'product' - version: number - } - ProductBody: { - billing: { - /** @enum {string} */ - currency: 'usd' - /** @enum {string} */ - type: 'monthly-prorated' | 'monthly-anniversary' | 'annual-anniversary' - } - /** Format: url */ - documentation_url: string - feature_types: components['schemas']['FeatureType'][] - images: components['schemas']['ProductImageURL'][] - integration: { - /** Format: url */ - base_url: string - features: components['schemas']['ProductIntegrationFeatures'] - provisioning: components['schemas']['ProductProvisioning'] - /** Format: url */ - sso_url?: string | null - /** @enum {string} */ - version: 'v1' - } - label: components['schemas']['Label'] - listing: components['schemas']['ProductListing'] - logo_url: components['schemas']['LogoURL'] - name: components['schemas']['Name'] - provider_id: components['schemas']['ID'] - /** @description A list of getting started steps for the product */ - setup_steps?: string[] | null - state: components['schemas']['ProductState'] - /** Format: email */ - support_email: string - /** @description 140 character sentence positioning the product. */ - tagline: string - tags?: components['schemas']['ProductTags'] - /** - * @description URL to this Product's Terms of Service. If provided is true, then - * a url must be set. Otherwise, provided is false. - */ - terms: { - provided: boolean - /** Format: url */ - url?: string | null - } - /** @description A list of value propositions of the product. */ - value_props: components['schemas']['ValueProp'][] - } - /** - * Format: url - * @description Image URL used for Product listings. - * - * Minimum 660px wide, 400px high. - */ - ProductImageURL: string - ProductIntegrationFeatures: { - /** - * @description Indicates whether or not this product supports resource transitions to - * manifold by access_code. - */ - access_code?: boolean - /** - * @description Describes the credential type that is supported by this product. - * - * * `none`: The product does not support providing any credentials - * * `single`: Only one credential is supported at the same time. - * * `multiple`: Multiple credentials are supported at the same time. - * * `unknown`: The credential type is unknown. - * - * @default multiple - * @enum {string} - */ - credential?: 'none' | 'single' | 'multiple' | 'unknown' - /** - * @description Represents whether or not this product supports changing - * the plan of a resource. - */ - plan_change?: boolean - /** - * @description Describes how the region for a resource is specified, if - * unspecified, then regions have no impact on this - * resource. - * - * @enum {string} - */ - region?: 'user-specified' | 'unspecified' - /** - * @description Represents whether or not this product supports Single - * Sign On - */ - sso?: boolean - } - ProductListing: { - /** - * @description When true, the product will be displayed in product listings alongside - * other products. When false the product will be excluded from listings, - * but can still be provisioned directly if it's label is known. - * Any pages that display information about the product when not listed, - * should indicate to webcrawlers that the content should not be indexed. - * - * @default false - */ - listed?: boolean - /** - * @description Object to hold various flags for marketing purposes only. These are values - * that need to be stored, but should not affect decision making in code. If - * we find ourselves in a position where we think they should, we should - * consider refactoring our listing definition. - */ - marketing?: { - /** - * @description Indicates whether or not the product is in `Beta` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - beta?: boolean - /** - * @description Indicates whether or not the product is in `New` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - featured?: boolean - /** - * @description Indicates whether or not the product is in `New` and should be - * advertised as such. This does not have any impact on who can access the - * product, it is just used to inform consumers through our clients. - * - * @default false - */ - new?: boolean - } - /** - * @description When true, everyone can see the product when requested. When false it will - * not be visible to anyone except those on the provider team. - * - * @default false - */ - public?: boolean - } - /** - * @description Provider Only, implies that the product should only be provisionable by the - * provider; so members of the provider team, no one else should be allowed. - * Pre-Order, should not be used yet. But in the future it should allow people to - * pre-provision a resource for when it does go live. - * Public, means the resource is live and everyone should be able to provision it. - * - * @enum {string} - */ - ProductProvisioning: 'provider-only' | 'pre-order' | 'public' - /** @enum {string} */ - ProductState: 'available' | 'hidden' | 'grandfathered' | 'new' | 'upcoming' - /** @description List of tags for product categorization and search */ - ProductTags: components['schemas']['Label'][] - Provider: { - body: components['schemas']['ProviderBody'] - id: components['schemas']['ID'] - /** @enum {string} */ - type: 'provider' - version: number - } - ProviderBody: { - /** Format: url */ - documentation_url?: string - label: components['schemas']['Label'] - logo_url?: components['schemas']['LogoURL'] - name: components['schemas']['Name'] - owner_id?: components['schemas']['OptionalFlexID'] - /** Format: email */ - support_email?: string - team_id?: components['schemas']['OptionalID'] - } - Region: { - body: components['schemas']['RegionBody'] - id: components['schemas']['ID'] - /** @enum {string} */ - type: 'region' - version: number - } - RegionBody: { - location: components['schemas']['Location'] - name: string - platform: components['schemas']['Platform'] - priority: number - } - UpdatePlan: { - body: components['schemas']['UpdatePlanBody'] - id: components['schemas']['ID'] - } - UpdatePlanBody: { - /** @description Dollar value in cents */ - cost?: number | null - /** @description Array of Feature Values */ - features?: components['schemas']['FeatureValue'][] | null - /** @description Used in conjuction with resizable_to to set or unset the list */ - has_resize_constraints?: boolean | null - label?: components['schemas']['Label'] - name?: components['schemas']['Name'] - /** @description Array of Region IDs */ - regions?: components['schemas']['ID'][] | null - resizable_to?: components['schemas']['PlanResizeList'] - state?: components['schemas']['PlanState'] - /** - * @description The number of days a user gets as a free trial when subscribing to - * this plan. Trials are valid only once per product; changing plans - * or adding an additional subscription will not start a new trial. - */ - trial_days?: number | null - } - UpdateProduct: { - body: components['schemas']['UpdateProductBody'] - id: components['schemas']['ID'] - } - UpdateProductBody: { - /** Format: url */ - documentation_url?: string | null - feature_types?: components['schemas']['FeatureType'][] | null - images?: components['schemas']['ProductImageURL'][] | null - integration?: { - /** Format: url */ - base_url?: string | null - features?: { - access_code?: boolean | null - /** - * @default multiple - * @enum {string|null} - */ - credential?: ('none' | 'single' | 'multiple' | 'unknown') | null - plan_change?: boolean | null - sso?: boolean | null - } - provisioning?: components['schemas']['ProductProvisioning'] - /** Format: url */ - sso_url?: string | null - /** @enum {string|null} */ - version?: 'v1' | null - } | null - label?: components['schemas']['Label'] - listing?: components['schemas']['ProductListing'] - logo_url?: components['schemas']['LogoURL'] - name?: components['schemas']['Name'] - /** @description An array of platform ids to restrict this product for. */ - platform_ids?: components['schemas']['ID'][] | null - /** @description A list of getting started steps for the product */ - setup_steps?: string[] | null - /** Format: email */ - support_email?: string | null - /** @description 140 character sentence positioning the product. */ - tagline?: string | null - tags?: components['schemas']['ProductTags'] - /** - * @description URL to this Product's Terms of Service. If provided is true, then - * a url must be set. Otherwise, provided is false. - */ - terms_url?: string | null - /** @description A list of value propositions of the product. */ - value_props?: components['schemas']['ValueProp'][] | null - } - UpdateProvider: { - body: components['schemas']['UpdateProviderBody'] - id: components['schemas']['ID'] - } - UpdateProviderBody: { - /** Format: url */ - documentation_url?: string | null - label?: components['schemas']['OptionalLabel'] - logo_url?: components['schemas']['OptionalLogoURL'] - name?: components['schemas']['OptionalName'] - owner_id?: components['schemas']['OptionalFlexID'] - /** Format: email */ - support_email?: string | null - team_id?: components['schemas']['OptionalID'] - } - UpdateRegion: { - name: string - } - ValueProp: { - /** @description Body of a value proposition. */ - body: string - /** @description Heading of a value proposition. */ - header: string - } - } - parameters: { - /** @description Filter results to only include those that have this label. */ - LabelFilter: string - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/null-in-enum.alphabetized.ts b/test/v3/expected/null-in-enum.alphabetized.ts deleted file mode 100644 index 6a1cdb5b5..000000000 --- a/test/v3/expected/null-in-enum.alphabetized.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - responses: { - /** A list of types. */ - 200: unknown - } - } - } -} - -export interface components { - schemas: { - /** @description Enum with null and nullable */ - MyType: { - /** @enum {string|null} */ - myField?: ('foo' | 'bar' | null) | null - } - /** @description Enum with null */ - MyTypeMixed: { - /** @enum {string} */ - myField?: 'foo' | 2 | false | null - } - /** @description Enum with null */ - MyTypeNotNullable: { - /** @enum {string} */ - myField?: 'foo' | 'bar' | null - } - /** @description Enum with null */ - MyTypeNotNullableNotNull: { - /** @enum {string} */ - myField?: 'foo' | 'bar' - } - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/one-of-empty.alphabetized.ts b/test/v3/expected/one-of-empty.alphabetized.ts deleted file mode 100644 index b826b3fd8..000000000 --- a/test/v3/expected/one-of-empty.alphabetized.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/test': { - get: { - responses: { - /** A list of types. */ - 200: unknown - } - } - } -} - -export interface components { - schemas: { - /** @description Enum with null and nullable */ - Example: { - emptyAllOf?: undefined - emptyAnyOf?: undefined - emptyOneOf?: undefined - } - } -} - -export interface operations {} - -export interface external {} diff --git a/test/v3/expected/petstore-openapitools.alphabetized.ts b/test/v3/expected/petstore-openapitools.alphabetized.ts deleted file mode 100644 index d462ac676..000000000 --- a/test/v3/expected/petstore-openapitools.alphabetized.ts +++ /dev/null @@ -1,521 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/pet': { - put: operations['updatePet'] - post: operations['addPet'] - } - '/pet/{petId}': { - /** Returns a single pet */ - get: operations['getPetById'] - post: operations['updatePetWithForm'] - delete: operations['deletePet'] - } - '/pet/{petId}/uploadImage': { - post: operations['uploadFile'] - } - '/pet/findByStatus': { - /** Multiple status values can be provided with comma separated strings */ - get: operations['findPetsByStatus'] - } - '/pet/findByTags': { - /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - get: operations['findPetsByTags'] - } - '/store/inventory': { - /** Returns a map of status codes to quantities */ - get: operations['getInventory'] - } - '/store/order': { - post: operations['placeOrder'] - } - '/store/order/{orderId}': { - /** For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions */ - get: operations['getOrderById'] - /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ - delete: operations['deleteOrder'] - } - '/user': { - /** This can only be done by the logged in user. */ - post: operations['createUser'] - } - '/user/{username}': { - get: operations['getUserByName'] - /** This can only be done by the logged in user. */ - put: operations['updateUser'] - /** This can only be done by the logged in user. */ - delete: operations['deleteUser'] - } - '/user/createWithArray': { - post: operations['createUsersWithArrayInput'] - } - '/user/createWithList': { - post: operations['createUsersWithListInput'] - } - '/user/login': { - get: operations['loginUser'] - } - '/user/logout': { - get: operations['logoutUser'] - } -} - -export interface components { - schemas: { - /** - * An uploaded response - * @description Describes the result of uploading an image resource - */ - ApiResponse: { - /** Format: int32 */ - code?: number - message?: string - type?: string - } - /** - * Pet category - * @description A category for a pet - */ - Category: { - /** Format: int64 */ - id?: number - name?: string - } - /** - * Pet Order - * @description An order for a pets from the pet store - */ - Order: { - /** @default false */ - complete?: boolean - /** Format: int64 */ - id?: number - /** Format: int64 */ - petId?: number - /** Format: int32 */ - quantity?: number - /** Format: date-time */ - shipDate?: string - /** - * @description Order Status - * @enum {string} - */ - status?: 'placed' | 'approved' | 'delivered' - } - /** - * a Pet - * @description A pet for sale in the pet store - */ - Pet: { - category?: components['schemas']['Category'] - /** Format: int64 */ - id?: number - /** @example doggie */ - name: string - photoUrls: string[] - /** - * @description pet status in the store - * @enum {string} - */ - status?: 'available' | 'pending' | 'sold' - tags?: components['schemas']['Tag'][] - } - /** - * Pet Tag - * @description A tag for a pet - */ - Tag: { - /** Format: int64 */ - id?: number - name?: string - } - /** - * a User - * @description A User who is purchasing from the pet store - */ - User: { - email?: string - firstName?: string - /** Format: int64 */ - id?: number - lastName?: string - password?: string - phone?: string - username?: string - /** - * Format: int32 - * @description User Status - */ - userStatus?: number - } - } - requestBodies: { - /** Pet object that needs to be added to the store */ - Pet: { - content: { - 'application/json': components['schemas']['Pet'] - 'application/xml': components['schemas']['Pet'] - } - } - /** List of user object */ - UserArray: { - content: { - 'application/json': components['schemas']['User'][] - } - } - } -} - -export interface operations { - updatePet: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'] - 'application/json': components['schemas']['Pet'] - } - } - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - /** Validation exception */ - 405: unknown - } - requestBody: components['requestBodies']['Pet'] - } - addPet: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'] - 'application/json': components['schemas']['Pet'] - } - } - /** Invalid input */ - 405: unknown - } - requestBody: components['requestBodies']['Pet'] - } - /** Returns a single pet */ - getPetById: { - parameters: { - path: { - /** ID of pet to return */ - petId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'] - 'application/json': components['schemas']['Pet'] - } - } - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - } - } - updatePetWithForm: { - parameters: { - path: { - /** ID of pet that needs to be updated */ - petId: number - } - } - responses: { - /** Invalid input */ - 405: unknown - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } - } - deletePet: { - parameters: { - header: { - api_key?: string - } - path: { - /** Pet id to delete */ - petId: number - } - } - responses: { - /** Invalid pet value */ - 400: unknown - } - } - uploadFile: { - parameters: { - path: { - /** ID of pet to update */ - petId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/json': components['schemas']['ApiResponse'] - } - } - } - requestBody: { - content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } - } - } - } - /** Multiple status values can be provided with comma separated strings */ - findPetsByStatus: { - parameters: { - query: { - /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'][] - 'application/json': components['schemas']['Pet'][] - } - } - /** Invalid status value */ - 400: unknown - } - } - /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - findPetsByTags: { - parameters: { - query: { - /** Tags to filter by */ - tags: string[] - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'][] - 'application/json': components['schemas']['Pet'][] - } - } - /** Invalid tag value */ - 400: unknown - } - } - /** Returns a map of status codes to quantities */ - getInventory: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/json': { [key: string]: number } - } - } - } - } - placeOrder: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Order'] - 'application/json': components['schemas']['Order'] - } - } - /** Invalid Order */ - 400: unknown - } - /** order placed for purchasing the pet */ - requestBody: { - content: { - 'application/json': components['schemas']['Order'] - } - } - } - /** For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions */ - getOrderById: { - parameters: { - path: { - /** ID of pet that needs to be fetched */ - orderId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Order'] - 'application/json': components['schemas']['Order'] - } - } - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ - deleteOrder: { - parameters: { - path: { - /** ID of the order that needs to be deleted */ - orderId: string - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - createUser: { - responses: { - /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - 'application/json': components['schemas']['User'] - } - } - } - getUserByName: { - parameters: { - path: { - /** The name that needs to be fetched. Use user1 for testing. */ - username: string - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['User'] - 'application/json': components['schemas']['User'] - } - } - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - updateUser: { - parameters: { - path: { - /** name that need to be deleted */ - username: string - } - } - responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - /** Updated user object */ - requestBody: { - content: { - 'application/json': components['schemas']['User'] - } - } - } - /** This can only be done by the logged in user. */ - deleteUser: { - parameters: { - path: { - /** The name that needs to be deleted */ - username: string - } - } - responses: { - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - requestBody: components['requestBodies']['UserArray'] - } - createUsersWithListInput: { - responses: { - /** successful operation */ - default: unknown - } - requestBody: components['requestBodies']['UserArray'] - } - loginUser: { - parameters: { - query: { - /** The user name for login */ - username: string - /** The password for login in clear text */ - password: string - } - } - responses: { - /** successful operation */ - 200: { - headers: { - /** Cookie authentication key for use with the `api_key` apiKey authentication. */ - 'Set-Cookie'?: string - /** date in UTC when toekn expires */ - 'X-Expires-After'?: string - /** calls per hour allowed by the user */ - 'X-Rate-Limit'?: number - } - content: { - 'application/xml': string - 'application/json': string - } - } - /** Invalid username/password supplied */ - 400: unknown - } - } - logoutUser: { - responses: { - /** successful operation */ - default: unknown - } - } -} - -export interface external {} diff --git a/test/v3/expected/petstore.alphabetized.ts b/test/v3/expected/petstore.alphabetized.ts deleted file mode 100644 index fb917a1e8..000000000 --- a/test/v3/expected/petstore.alphabetized.ts +++ /dev/null @@ -1,490 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/pet': { - put: operations['updatePet'] - post: operations['addPet'] - } - '/pet/{petId}': { - /** Returns a single pet */ - get: operations['getPetById'] - post: operations['updatePetWithForm'] - delete: operations['deletePet'] - } - '/pet/{petId}/uploadImage': { - post: operations['uploadFile'] - } - '/pet/findByStatus': { - /** Multiple status values can be provided with comma separated strings */ - get: operations['findPetsByStatus'] - } - '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - get: operations['findPetsByTags'] - } - '/store/inventory': { - /** Returns a map of status codes to quantities */ - get: operations['getInventory'] - } - '/store/order': { - post: operations['placeOrder'] - } - '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ - get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ - delete: operations['deleteOrder'] - } - '/user': { - /** This can only be done by the logged in user. */ - post: operations['createUser'] - } - '/user/{username}': { - get: operations['getUserByName'] - /** This can only be done by the logged in user. */ - put: operations['updateUser'] - /** This can only be done by the logged in user. */ - delete: operations['deleteUser'] - } - '/user/createWithArray': { - post: operations['createUsersWithArrayInput'] - } - '/user/createWithList': { - post: operations['createUsersWithListInput'] - } - '/user/login': { - get: operations['loginUser'] - } - '/user/logout': { - get: operations['logoutUser'] - } -} - -export interface components { - schemas: { - ApiResponse: { - /** Format: int32 */ - code?: number - message?: string - type?: string - } - Category: { - /** Format: int64 */ - id?: number - name?: string - } - Order: { - /** @default false */ - complete?: boolean - /** Format: int64 */ - id?: number - /** Format: int64 */ - petId?: number - /** Format: int32 */ - quantity?: number - /** Format: date-time */ - shipDate?: string - /** - * @description Order Status - * @enum {string} - */ - status?: 'placed' | 'approved' | 'delivered' - } - Pet: { - category?: components['schemas']['Category'] - /** Format: int64 */ - id?: number - /** @example doggie */ - name: string - photoUrls: string[] - /** - * @description pet status in the store - * @enum {string} - */ - status?: 'available' | 'pending' | 'sold' - tags?: components['schemas']['Tag'][] - } - Tag: { - /** Format: int64 */ - id?: number - name?: string - } - User: { - email?: string - firstName?: string - /** Format: int64 */ - id?: number - lastName?: string - password?: string - phone?: string - username?: string - /** - * Format: int32 - * @description User Status - */ - userStatus?: number - } - } -} - -export interface operations { - updatePet: { - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - /** Validation exception */ - 405: unknown - } - /** Pet object that needs to be added to the store */ - requestBody: { - content: { - 'application/json': components['schemas']['Pet'] - 'application/xml': components['schemas']['Pet'] - } - } - } - addPet: { - responses: { - /** Invalid input */ - 405: unknown - } - /** Pet object that needs to be added to the store */ - requestBody: { - content: { - 'application/json': components['schemas']['Pet'] - 'application/xml': components['schemas']['Pet'] - } - } - } - /** Returns a single pet */ - getPetById: { - parameters: { - path: { - /** ID of pet to return */ - petId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'] - 'application/json': components['schemas']['Pet'] - } - } - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - } - } - updatePetWithForm: { - parameters: { - path: { - /** ID of pet that needs to be updated */ - petId: number - } - } - responses: { - /** Invalid input */ - 405: unknown - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } - } - deletePet: { - parameters: { - header: { - api_key?: string - } - path: { - /** Pet id to delete */ - petId: number - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Pet not found */ - 404: unknown - } - } - uploadFile: { - parameters: { - path: { - /** ID of pet to update */ - petId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/json': components['schemas']['ApiResponse'] - } - } - } - requestBody: { - content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } - } - } - } - /** Multiple status values can be provided with comma separated strings */ - findPetsByStatus: { - parameters: { - query: { - /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'][] - 'application/json': components['schemas']['Pet'][] - } - } - /** Invalid status value */ - 400: unknown - } - } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ - findPetsByTags: { - parameters: { - query: { - /** Tags to filter by */ - tags: string[] - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Pet'][] - 'application/json': components['schemas']['Pet'][] - } - } - /** Invalid tag value */ - 400: unknown - } - } - /** Returns a map of status codes to quantities */ - getInventory: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/json': { [key: string]: number } - } - } - } - } - placeOrder: { - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Order'] - 'application/json': components['schemas']['Order'] - } - } - /** Invalid Order */ - 400: unknown - } - /** order placed for purchasing the pet */ - requestBody: { - content: { - '*/*': components['schemas']['Order'] - } - } - } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ - getOrderById: { - parameters: { - path: { - /** ID of pet that needs to be fetched */ - orderId: number - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['Order'] - 'application/json': components['schemas']['Order'] - } - } - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ - deleteOrder: { - parameters: { - path: { - /** ID of the order that needs to be deleted */ - orderId: number - } - } - responses: { - /** Invalid ID supplied */ - 400: unknown - /** Order not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - createUser: { - responses: { - /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] - } - } - } - getUserByName: { - parameters: { - path: { - /** The name that needs to be fetched. Use user1 for testing. */ - username: string - } - } - responses: { - /** successful operation */ - 200: { - content: { - 'application/xml': components['schemas']['User'] - 'application/json': components['schemas']['User'] - } - } - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - /** This can only be done by the logged in user. */ - updateUser: { - parameters: { - path: { - /** name that need to be updated */ - username: string - } - } - responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - /** Updated user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] - } - } - } - /** This can only be done by the logged in user. */ - deleteUser: { - parameters: { - path: { - /** The name that needs to be deleted */ - username: string - } - } - responses: { - /** Invalid username supplied */ - 400: unknown - /** User not found */ - 404: unknown - } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'][] - } - } - } - createUsersWithListInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'][] - } - } - } - loginUser: { - parameters: { - query: { - /** The user name for login */ - username: string - /** The password for login in clear text */ - password: string - } - } - responses: { - /** successful operation */ - 200: { - headers: { - /** date in UTC when token expires */ - 'X-Expires-After'?: string - /** calls per hour allowed by the user */ - 'X-Rate-Limit'?: number - } - content: { - 'application/xml': string - 'application/json': string - } - } - /** Invalid username/password supplied */ - 400: unknown - } - } - logoutUser: { - responses: { - /** successful operation */ - default: unknown - } - } -} - -export interface external {} diff --git a/test/v3/expected/reference-to-properties.alphabetized.ts b/test/v3/expected/reference-to-properties.alphabetized.ts deleted file mode 100644 index 48b4e4ceb..000000000 --- a/test/v3/expected/reference-to-properties.alphabetized.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/pet': { - put: operations['updatePet'] - } -} - -export interface components { - schemas: { - Pet: { - name: string - } - } -} - -export interface operations { - updatePet: { - responses: { - 200: unknown - } - requestBody: { - content: { - 'application/json': { - name?: components['schemas']['Pet']['name'] - } - } - } - } -} - -export interface external {} diff --git a/test/v3/expected/stripe.alphabetized.ts b/test/v3/expected/stripe.alphabetized.ts deleted file mode 100644 index 62519621e..000000000 --- a/test/v3/expected/stripe.alphabetized.ts +++ /dev/null @@ -1,44038 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/v1/3d_secure': { - /**

Initiate 3D Secure authentication.

*/ - post: operations['Post3dSecure'] - } - '/v1/3d_secure/{three_d_secure}': { - /**

Retrieves a 3D Secure object.

*/ - get: operations['Get3dSecureThreeDSecure'] - } - '/v1/account': { - /**

Retrieves the details of an account.

*/ - get: operations['GetAccount'] - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - post: operations['PostAccount'] - /** - *

With Connect, you can delete accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - delete: operations['DeleteAccount'] - } - '/v1/account_links': { - /**

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

*/ - post: operations['PostAccountLinks'] - } - '/v1/account/bank_accounts': { - /**

Create an external account for a given account.

*/ - post: operations['PostAccountBankAccounts'] - } - '/v1/account/bank_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountBankAccountsId'] - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountBankAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountBankAccountsId'] - } - '/v1/account/capabilities': { - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - get: operations['GetAccountCapabilities'] - } - '/v1/account/capabilities/{capability}': { - /**

Retrieves information about the specified Account Capability.

*/ - get: operations['GetAccountCapabilitiesCapability'] - /**

Updates an existing Account Capability.

*/ - post: operations['PostAccountCapabilitiesCapability'] - } - '/v1/account/external_accounts': { - /**

List external accounts for an account.

*/ - get: operations['GetAccountExternalAccounts'] - /**

Create an external account for a given account.

*/ - post: operations['PostAccountExternalAccounts'] - } - '/v1/account/external_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountExternalAccountsId'] - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountExternalAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountExternalAccountsId'] - } - '/v1/account/login_links': { - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - post: operations['PostAccountLoginLinks'] - } - '/v1/account/people': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountPeople'] - /**

Creates a new person.

*/ - post: operations['PostAccountPeople'] - } - '/v1/account/people/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountPeoplePerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountPeoplePerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountPeoplePerson'] - } - '/v1/account/persons': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountPersons'] - /**

Creates a new person.

*/ - post: operations['PostAccountPersons'] - } - '/v1/account/persons/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountPersonsPerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountPersonsPerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountPersonsPerson'] - } - '/v1/accounts': { - /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ - get: operations['GetAccounts'] - /** - *

With Connect, you can create Stripe accounts for your users. - * To do this, you’ll first need to register your platform.

- */ - post: operations['PostAccounts'] - } - '/v1/accounts/{account}': { - /**

Retrieves the details of an account.

*/ - get: operations['GetAccountsAccount'] - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - post: operations['PostAccountsAccount'] - /** - *

With Connect, you can delete accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - delete: operations['DeleteAccountsAccount'] - } - '/v1/accounts/{account}/bank_accounts': { - /**

Create an external account for a given account.

*/ - post: operations['PostAccountsAccountBankAccounts'] - } - '/v1/accounts/{account}/bank_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountsAccountBankAccountsId'] - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountsAccountBankAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountsAccountBankAccountsId'] - } - '/v1/accounts/{account}/capabilities': { - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - get: operations['GetAccountsAccountCapabilities'] - } - '/v1/accounts/{account}/capabilities/{capability}': { - /**

Retrieves information about the specified Account Capability.

*/ - get: operations['GetAccountsAccountCapabilitiesCapability'] - /**

Updates an existing Account Capability.

*/ - post: operations['PostAccountsAccountCapabilitiesCapability'] - } - '/v1/accounts/{account}/external_accounts': { - /**

List external accounts for an account.

*/ - get: operations['GetAccountsAccountExternalAccounts'] - /**

Create an external account for a given account.

*/ - post: operations['PostAccountsAccountExternalAccounts'] - } - '/v1/accounts/{account}/external_accounts/{id}': { - /**

Retrieve a specified external account for a given account.

*/ - get: operations['GetAccountsAccountExternalAccountsId'] - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - post: operations['PostAccountsAccountExternalAccountsId'] - /**

Delete a specified external account for a given account.

*/ - delete: operations['DeleteAccountsAccountExternalAccountsId'] - } - '/v1/accounts/{account}/login_links': { - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - post: operations['PostAccountsAccountLoginLinks'] - } - '/v1/accounts/{account}/people': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountsAccountPeople'] - /**

Creates a new person.

*/ - post: operations['PostAccountsAccountPeople'] - } - '/v1/accounts/{account}/people/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountsAccountPeoplePerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountsAccountPeoplePerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountsAccountPeoplePerson'] - } - '/v1/accounts/{account}/persons': { - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - get: operations['GetAccountsAccountPersons'] - /**

Creates a new person.

*/ - post: operations['PostAccountsAccountPersons'] - } - '/v1/accounts/{account}/persons/{person}': { - /**

Retrieves an existing person.

*/ - get: operations['GetAccountsAccountPersonsPerson'] - /**

Updates an existing person.

*/ - post: operations['PostAccountsAccountPersonsPerson'] - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - delete: operations['DeleteAccountsAccountPersonsPerson'] - } - '/v1/accounts/{account}/reject': { - /** - *

With Connect, you may flag accounts as suspicious.

- * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

- */ - post: operations['PostAccountsAccountReject'] - } - '/v1/apple_pay/domains': { - /**

List apple pay domains.

*/ - get: operations['GetApplePayDomains'] - /**

Create an apple pay domain.

*/ - post: operations['PostApplePayDomains'] - } - '/v1/apple_pay/domains/{domain}': { - /**

Retrieve an apple pay domain.

*/ - get: operations['GetApplePayDomainsDomain'] - /**

Delete an apple pay domain.

*/ - delete: operations['DeleteApplePayDomainsDomain'] - } - '/v1/application_fees': { - /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ - get: operations['GetApplicationFees'] - } - '/v1/application_fees/{fee}/refunds/{id}': { - /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ - get: operations['GetApplicationFeesFeeRefundsId'] - /** - *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - post: operations['PostApplicationFeesFeeRefundsId'] - } - '/v1/application_fees/{id}': { - /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ - get: operations['GetApplicationFeesId'] - } - '/v1/application_fees/{id}/refund': { - post: operations['PostApplicationFeesIdRefund'] - } - '/v1/application_fees/{id}/refunds': { - /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - get: operations['GetApplicationFeesIdRefunds'] - /** - *

Refunds an application fee that has previously been collected but not yet refunded. - * Funds will be refunded to the Stripe account from which the fee was originally collected.

- * - *

You can optionally refund only part of an application fee. - * You can do so multiple times, until the entire fee has been refunded.

- * - *

Once entirely refunded, an application fee can’t be refunded again. - * This method will raise an error when called on an already-refunded application fee, - * or when trying to refund more money than is left on an application fee.

- */ - post: operations['PostApplicationFeesIdRefunds'] - } - '/v1/balance': { - /** - *

Retrieves the current account balance, based on the authentication that was used to make the request. - * For a sample request, see Accounting for negative balances.

- */ - get: operations['GetBalance'] - } - '/v1/balance_transactions': { - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - get: operations['GetBalanceTransactions'] - } - '/v1/balance_transactions/{id}': { - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - get: operations['GetBalanceTransactionsId'] - } - '/v1/balance/history': { - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - get: operations['GetBalanceHistory'] - } - '/v1/balance/history/{id}': { - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - get: operations['GetBalanceHistoryId'] - } - '/v1/billing_portal/configurations': { - /**

Returns a list of configurations that describe the functionality of the customer portal.

*/ - get: operations['GetBillingPortalConfigurations'] - /**

Creates a configuration that describes the functionality and behavior of a PortalSession

*/ - post: operations['PostBillingPortalConfigurations'] - } - '/v1/billing_portal/configurations/{configuration}': { - /**

Retrieves a configuration that describes the functionality of the customer portal.

*/ - get: operations['GetBillingPortalConfigurationsConfiguration'] - /**

Updates a configuration that describes the functionality of the customer portal.

*/ - post: operations['PostBillingPortalConfigurationsConfiguration'] - } - '/v1/billing_portal/sessions': { - /**

Creates a session of the customer portal.

*/ - post: operations['PostBillingPortalSessions'] - } - '/v1/bitcoin/receivers': { - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - get: operations['GetBitcoinReceivers'] - } - '/v1/bitcoin/receivers/{id}': { - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - get: operations['GetBitcoinReceiversId'] - } - '/v1/bitcoin/receivers/{receiver}/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinReceiversReceiverTransactions'] - } - '/v1/bitcoin/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinTransactions'] - } - '/v1/charges': { - /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ - get: operations['GetCharges'] - /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ - post: operations['PostCharges'] - } - '/v1/charges/{charge}': { - /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ - get: operations['GetChargesCharge'] - /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostChargesCharge'] - } - '/v1/charges/{charge}/capture': { - /** - *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

- * - *

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

- */ - post: operations['PostChargesChargeCapture'] - } - '/v1/charges/{charge}/dispute': { - /**

Retrieve a dispute for a specified charge.

*/ - get: operations['GetChargesChargeDispute'] - post: operations['PostChargesChargeDispute'] - } - '/v1/charges/{charge}/dispute/close': { - post: operations['PostChargesChargeDisputeClose'] - } - '/v1/charges/{charge}/refund': { - /** - *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

- * - *

Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged.

- * - *

You can optionally refund only part of a charge. - * You can do so multiple times, until the entire charge has been refunded.

- * - *

Once entirely refunded, a charge can’t be refunded again. - * This method will raise an error when called on an already-refunded charge, - * or when trying to refund more money than is left on a charge.

- */ - post: operations['PostChargesChargeRefund'] - } - '/v1/charges/{charge}/refunds': { - /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - get: operations['GetChargesChargeRefunds'] - /**

Create a refund.

*/ - post: operations['PostChargesChargeRefunds'] - } - '/v1/charges/{charge}/refunds/{refund}': { - /**

Retrieves the details of an existing refund.

*/ - get: operations['GetChargesChargeRefundsRefund'] - /**

Update a specified refund.

*/ - post: operations['PostChargesChargeRefundsRefund'] - } - '/v1/checkout/sessions': { - /**

Returns a list of Checkout Sessions.

*/ - get: operations['GetCheckoutSessions'] - /**

Creates a Session object.

*/ - post: operations['PostCheckoutSessions'] - } - '/v1/checkout/sessions/{session}': { - /**

Retrieves a Session object.

*/ - get: operations['GetCheckoutSessionsSession'] - } - '/v1/checkout/sessions/{session}/expire': { - /** - *

A Session can be expired when it is in one of these statuses: open

- * - *

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

- */ - post: operations['PostCheckoutSessionsSessionExpire'] - } - '/v1/checkout/sessions/{session}/line_items': { - /**

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetCheckoutSessionsSessionLineItems'] - } - '/v1/country_specs': { - /**

Lists all Country Spec objects available in the API.

*/ - get: operations['GetCountrySpecs'] - } - '/v1/country_specs/{country}': { - /**

Returns a Country Spec for a given Country code.

*/ - get: operations['GetCountrySpecsCountry'] - } - '/v1/coupons': { - /**

Returns a list of your coupons.

*/ - get: operations['GetCoupons'] - /** - *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

- * - *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

- */ - post: operations['PostCoupons'] - } - '/v1/coupons/{coupon}': { - /**

Retrieves the coupon with the given ID.

*/ - get: operations['GetCouponsCoupon'] - /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ - post: operations['PostCouponsCoupon'] - /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ - delete: operations['DeleteCouponsCoupon'] - } - '/v1/credit_notes': { - /**

Returns a list of credit notes.

*/ - get: operations['GetCreditNotes'] - /** - *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - * in any combination of the following:

- * - *
    - *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • - *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • - *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • - *
- * - *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

- * - *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount - * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

- */ - post: operations['PostCreditNotes'] - } - '/v1/credit_notes/{credit_note}/lines': { - /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetCreditNotesCreditNoteLines'] - } - '/v1/credit_notes/{id}': { - /**

Retrieves the credit note object with the given identifier.

*/ - get: operations['GetCreditNotesId'] - /**

Updates an existing credit note.

*/ - post: operations['PostCreditNotesId'] - } - '/v1/credit_notes/{id}/void': { - /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ - post: operations['PostCreditNotesIdVoid'] - } - '/v1/credit_notes/preview': { - /**

Get a preview of a credit note without creating it.

*/ - get: operations['GetCreditNotesPreview'] - } - '/v1/credit_notes/preview/lines': { - /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetCreditNotesPreviewLines'] - } - '/v1/customers': { - /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ - get: operations['GetCustomers'] - /**

Creates a new customer object.

*/ - post: operations['PostCustomers'] - } - '/v1/customers/{customer}': { - /**

Retrieves a Customer object.

*/ - get: operations['GetCustomersCustomer'] - /** - *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

- * - *

This request accepts mostly the same arguments as the customer creation call.

- */ - post: operations['PostCustomersCustomer'] - /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ - delete: operations['DeleteCustomersCustomer'] - } - '/v1/customers/{customer}/balance_transactions': { - /**

Returns a list of transactions that updated the customer’s balances.

*/ - get: operations['GetCustomersCustomerBalanceTransactions'] - /**

Creates an immutable transaction that updates the customer’s credit balance.

*/ - post: operations['PostCustomersCustomerBalanceTransactions'] - } - '/v1/customers/{customer}/balance_transactions/{transaction}': { - /**

Retrieves a specific customer balance transaction that updated the customer’s balances.

*/ - get: operations['GetCustomersCustomerBalanceTransactionsTransaction'] - /**

Most credit balance transaction fields are immutable, but you may update its description and metadata.

*/ - post: operations['PostCustomersCustomerBalanceTransactionsTransaction'] - } - '/v1/customers/{customer}/bank_accounts': { - /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ - get: operations['GetCustomersCustomerBankAccounts'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerBankAccounts'] - } - '/v1/customers/{customer}/bank_accounts/{id}': { - /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ - get: operations['GetCustomersCustomerBankAccountsId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerBankAccountsId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerBankAccountsId'] - } - '/v1/customers/{customer}/bank_accounts/{id}/verify': { - /**

Verify a specified bank account for a given customer.

*/ - post: operations['PostCustomersCustomerBankAccountsIdVerify'] - } - '/v1/customers/{customer}/cards': { - /** - *

You can see a list of the cards belonging to a customer. - * Note that the 10 most recent sources are always available on the Customer object. - * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

- */ - get: operations['GetCustomersCustomerCards'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerCards'] - } - '/v1/customers/{customer}/cards/{id}': { - /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ - get: operations['GetCustomersCustomerCardsId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerCardsId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerCardsId'] - } - '/v1/customers/{customer}/discount': { - get: operations['GetCustomersCustomerDiscount'] - /**

Removes the currently applied discount on a customer.

*/ - delete: operations['DeleteCustomersCustomerDiscount'] - } - '/v1/customers/{customer}/payment_methods': { - /**

Returns a list of PaymentMethods for a given Customer

*/ - get: operations['GetCustomersCustomerPaymentMethods'] - } - '/v1/customers/{customer}/sources': { - /**

List sources for a specified customer.

*/ - get: operations['GetCustomersCustomerSources'] - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - post: operations['PostCustomersCustomerSources'] - } - '/v1/customers/{customer}/sources/{id}': { - /**

Retrieve a specified source for a given customer.

*/ - get: operations['GetCustomersCustomerSourcesId'] - /**

Update a specified source for a given customer.

*/ - post: operations['PostCustomersCustomerSourcesId'] - /**

Delete a specified source for a given customer.

*/ - delete: operations['DeleteCustomersCustomerSourcesId'] - } - '/v1/customers/{customer}/sources/{id}/verify': { - /**

Verify a specified bank account for a given customer.

*/ - post: operations['PostCustomersCustomerSourcesIdVerify'] - } - '/v1/customers/{customer}/subscriptions': { - /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ - get: operations['GetCustomersCustomerSubscriptions'] - /**

Creates a new subscription on an existing customer.

*/ - post: operations['PostCustomersCustomerSubscriptions'] - } - '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}': { - /**

Retrieves the subscription with the given ID.

*/ - get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedId'] - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - post: operations['PostCustomersCustomerSubscriptionsSubscriptionExposedId'] - /** - *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedId'] - } - '/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount': { - get: operations['GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] - /**

Removes the currently applied discount on a customer.

*/ - delete: operations['DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount'] - } - '/v1/customers/{customer}/tax_ids': { - /**

Returns a list of tax IDs for a customer.

*/ - get: operations['GetCustomersCustomerTaxIds'] - /**

Creates a new TaxID object for a customer.

*/ - post: operations['PostCustomersCustomerTaxIds'] - } - '/v1/customers/{customer}/tax_ids/{id}': { - /**

Retrieves the TaxID object with the given identifier.

*/ - get: operations['GetCustomersCustomerTaxIdsId'] - /**

Deletes an existing TaxID object.

*/ - delete: operations['DeleteCustomersCustomerTaxIdsId'] - } - '/v1/disputes': { - /**

Returns a list of your disputes.

*/ - get: operations['GetDisputes'] - } - '/v1/disputes/{dispute}': { - /**

Retrieves the dispute with the given ID.

*/ - get: operations['GetDisputesDispute'] - /** - *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

- * - *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

- */ - post: operations['PostDisputesDispute'] - } - '/v1/disputes/{dispute}/close': { - /** - *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

- * - *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

- */ - post: operations['PostDisputesDisputeClose'] - } - '/v1/ephemeral_keys': { - /**

Creates a short-lived API key for a given resource.

*/ - post: operations['PostEphemeralKeys'] - } - '/v1/ephemeral_keys/{key}': { - /**

Invalidates a short-lived API key for a given resource.

*/ - delete: operations['DeleteEphemeralKeysKey'] - } - '/v1/events': { - /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ - get: operations['GetEvents'] - } - '/v1/events/{id}': { - /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ - get: operations['GetEventsId'] - } - '/v1/exchange_rates': { - /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ - get: operations['GetExchangeRates'] - } - '/v1/exchange_rates/{rate_id}': { - /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ - get: operations['GetExchangeRatesRateId'] - } - '/v1/file_links': { - /**

Returns a list of file links.

*/ - get: operations['GetFileLinks'] - /**

Creates a new file link object.

*/ - post: operations['PostFileLinks'] - } - '/v1/file_links/{link}': { - /**

Retrieves the file link with the given ID.

*/ - get: operations['GetFileLinksLink'] - /**

Updates an existing file link object. Expired links can no longer be updated.

*/ - post: operations['PostFileLinksLink'] - } - '/v1/files': { - /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ - get: operations['GetFiles'] - /** - *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

- * - *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

- */ - post: operations['PostFiles'] - } - '/v1/files/{file}': { - /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ - get: operations['GetFilesFile'] - } - '/v1/identity/verification_reports': { - /**

List all verification reports.

*/ - get: operations['GetIdentityVerificationReports'] - } - '/v1/identity/verification_reports/{report}': { - /**

Retrieves an existing VerificationReport

*/ - get: operations['GetIdentityVerificationReportsReport'] - } - '/v1/identity/verification_sessions': { - /**

Returns a list of VerificationSessions

*/ - get: operations['GetIdentityVerificationSessions'] - /** - *

Creates a VerificationSession object.

- * - *

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

- * - *

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

- * - *

Related guide: Verify your users’ identity documents.

- */ - post: operations['PostIdentityVerificationSessions'] - } - '/v1/identity/verification_sessions/{session}': { - /** - *

Retrieves the details of a VerificationSession that was previously created.

- * - *

When the session status is requires_input, you can use this method to retrieve a valid - * client_secret or url to allow re-submission.

- */ - get: operations['GetIdentityVerificationSessionsSession'] - /** - *

Updates a VerificationSession object.

- * - *

When the session status is requires_input, you can use this method to update the - * verification check and options.

- */ - post: operations['PostIdentityVerificationSessionsSession'] - } - '/v1/identity/verification_sessions/{session}/cancel': { - /** - *

A VerificationSession object can be canceled when it is in requires_input status.

- * - *

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

- */ - post: operations['PostIdentityVerificationSessionsSessionCancel'] - } - '/v1/identity/verification_sessions/{session}/redact': { - /** - *

Redact a VerificationSession to remove all collected information from Stripe. This will redact - * the VerificationSession and all objects related to it, including VerificationReports, Events, - * request logs, etc.

- * - *

A VerificationSession object can be redacted when it is in requires_input or verified - * status. Redacting a VerificationSession in requires_action - * state will automatically cancel it.

- * - *

The redaction process may take up to four days. When the redaction process is in progress, the - * VerificationSession’s redaction.status field will be set to processing; when the process is - * finished, it will change to redacted and an identity.verification_session.redacted event - * will be emitted.

- * - *

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the - * fields that contain personal data will be replaced by the string [redacted] or a similar - * placeholder. The metadata field will also be erased. Redacted objects cannot be updated or - * used for any purpose.

- * - *

Learn more.

- */ - post: operations['PostIdentityVerificationSessionsSessionRedact'] - } - '/v1/invoiceitems': { - /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ - get: operations['GetInvoiceitems'] - /**

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ - post: operations['PostInvoiceitems'] - } - '/v1/invoiceitems/{invoiceitem}': { - /**

Retrieves the invoice item with the given ID.

*/ - get: operations['GetInvoiceitemsInvoiceitem'] - /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ - post: operations['PostInvoiceitemsInvoiceitem'] - /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ - delete: operations['DeleteInvoiceitemsInvoiceitem'] - } - '/v1/invoices': { - /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ - get: operations['GetInvoices'] - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ - post: operations['PostInvoices'] - } - '/v1/invoices/{invoice}': { - /**

Retrieves the invoice with the given ID.

*/ - get: operations['GetInvoicesInvoice'] - /** - *

Draft invoices are fully editable. Once an invoice is finalized, - * monetary values, as well as collection_method, become uneditable.

- * - *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, - * sending reminders for, or automatically reconciling invoices, pass - * auto_advance=false.

- */ - post: operations['PostInvoicesInvoice'] - /**

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

*/ - delete: operations['DeleteInvoicesInvoice'] - } - '/v1/invoices/{invoice}/finalize': { - /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ - post: operations['PostInvoicesInvoiceFinalize'] - } - '/v1/invoices/{invoice}/lines': { - /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetInvoicesInvoiceLines'] - } - '/v1/invoices/{invoice}/mark_uncollectible': { - /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ - post: operations['PostInvoicesInvoiceMarkUncollectible'] - } - '/v1/invoices/{invoice}/pay': { - /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ - post: operations['PostInvoicesInvoicePay'] - } - '/v1/invoices/{invoice}/send': { - /** - *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

- * - *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

- */ - post: operations['PostInvoicesInvoiceSend'] - } - '/v1/invoices/{invoice}/void': { - /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ - post: operations['PostInvoicesInvoiceVoid'] - } - '/v1/invoices/upcoming': { - /** - *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

- * - *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

- * - *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

- */ - get: operations['GetInvoicesUpcoming'] - } - '/v1/invoices/upcoming/lines': { - /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetInvoicesUpcomingLines'] - } - '/v1/issuer_fraud_records': { - /**

Returns a list of issuer fraud records.

*/ - get: operations['GetIssuerFraudRecords'] - } - '/v1/issuer_fraud_records/{issuer_fraud_record}': { - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - get: operations['GetIssuerFraudRecordsIssuerFraudRecord'] - } - '/v1/issuing/authorizations': { - /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingAuthorizations'] - } - '/v1/issuing/authorizations/{authorization}': { - /**

Retrieves an Issuing Authorization object.

*/ - get: operations['GetIssuingAuthorizationsAuthorization'] - /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingAuthorizationsAuthorization'] - } - '/v1/issuing/authorizations/{authorization}/approve': { - /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ - post: operations['PostIssuingAuthorizationsAuthorizationApprove'] - } - '/v1/issuing/authorizations/{authorization}/decline': { - /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ - post: operations['PostIssuingAuthorizationsAuthorizationDecline'] - } - '/v1/issuing/cardholders': { - /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingCardholders'] - /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ - post: operations['PostIssuingCardholders'] - } - '/v1/issuing/cardholders/{cardholder}': { - /**

Retrieves an Issuing Cardholder object.

*/ - get: operations['GetIssuingCardholdersCardholder'] - /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingCardholdersCardholder'] - } - '/v1/issuing/cards': { - /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingCards'] - /**

Creates an Issuing Card object.

*/ - post: operations['PostIssuingCards'] - } - '/v1/issuing/cards/{card}': { - /**

Retrieves an Issuing Card object.

*/ - get: operations['GetIssuingCardsCard'] - /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingCardsCard'] - } - '/v1/issuing/disputes': { - /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingDisputes'] - /**

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

*/ - post: operations['PostIssuingDisputes'] - } - '/v1/issuing/disputes/{dispute}': { - /**

Retrieves an Issuing Dispute object.

*/ - get: operations['GetIssuingDisputesDispute'] - /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

*/ - post: operations['PostIssuingDisputesDispute'] - } - '/v1/issuing/disputes/{dispute}/submit': { - /**

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

*/ - post: operations['PostIssuingDisputesDisputeSubmit'] - } - '/v1/issuing/settlements': { - /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingSettlements'] - } - '/v1/issuing/settlements/{settlement}': { - /**

Retrieves an Issuing Settlement object.

*/ - get: operations['GetIssuingSettlementsSettlement'] - /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingSettlementsSettlement'] - } - '/v1/issuing/transactions': { - /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetIssuingTransactions'] - } - '/v1/issuing/transactions/{transaction}': { - /**

Retrieves an Issuing Transaction object.

*/ - get: operations['GetIssuingTransactionsTransaction'] - /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostIssuingTransactionsTransaction'] - } - '/v1/mandates/{mandate}': { - /**

Retrieves a Mandate object.

*/ - get: operations['GetMandatesMandate'] - } - '/v1/order_returns': { - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - get: operations['GetOrderReturns'] - } - '/v1/order_returns/{id}': { - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - get: operations['GetOrderReturnsId'] - } - '/v1/orders': { - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - get: operations['GetOrders'] - /**

Creates a new order object.

*/ - post: operations['PostOrders'] - } - '/v1/orders/{id}': { - /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ - get: operations['GetOrdersId'] - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostOrdersId'] - } - '/v1/orders/{id}/pay': { - /**

Pay an order by providing a source to create a payment.

*/ - post: operations['PostOrdersIdPay'] - } - '/v1/orders/{id}/returns': { - /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ - post: operations['PostOrdersIdReturns'] - } - '/v1/payment_intents': { - /**

Returns a list of PaymentIntents.

*/ - get: operations['GetPaymentIntents'] - /** - *

Creates a PaymentIntent object.

- * - *

After the PaymentIntent is created, attach a payment method and confirm - * to continue the payment. You can read more about the different payment flows - * available via the Payment Intents API here.

- * - *

When confirm=true is used during creation, it is equivalent to creating - * and confirming the PaymentIntent in the same call. You may use any parameters - * available in the confirm API when confirm=true - * is supplied.

- */ - post: operations['PostPaymentIntents'] - } - '/v1/payment_intents/{intent}': { - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - get: operations['GetPaymentIntentsIntent'] - /** - *

Updates properties on a PaymentIntent object without confirming.

- * - *

Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to - * update and confirm at the same time, we recommend updating properties via - * the confirm API instead.

- */ - post: operations['PostPaymentIntentsIntent'] - } - '/v1/payment_intents/{intent}/cancel': { - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

- */ - post: operations['PostPaymentIntentsIntentCancel'] - } - '/v1/payment_intents/{intent}/capture': { - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - post: operations['PostPaymentIntentsIntentCapture'] - } - '/v1/payment_intents/{intent}/confirm': { - /** - *

Confirm that your customer intends to pay with current or provided - * payment method. Upon confirmation, the PaymentIntent will attempt to initiate - * a payment.

- * - *

If the selected payment method requires additional authentication steps, the - * PaymentIntent will transition to the requires_action status and - * suggest additional actions via next_action. If payment fails, - * the PaymentIntent will transition to the requires_payment_method status. If - * payment succeeds, the PaymentIntent will transition to the succeeded - * status (or requires_capture, if capture_method is set to manual).

- * - *

If the confirmation_method is automatic, payment may be attempted - * using our client SDKs - * and the PaymentIntent’s client_secret. - * After next_actions are handled by the client, no additional - * confirmation is required to complete the payment.

- * - *

If the confirmation_method is manual, all payment attempts must be - * initiated using a secret key. - * If any actions are required for the payment, the PaymentIntent will - * return to the requires_confirmation state - * after those actions are completed. Your server needs to then - * explicitly re-confirm the PaymentIntent to initiate the next payment - * attempt. Read the expanded documentation - * to learn more about manual confirmation.

- */ - post: operations['PostPaymentIntentsIntentConfirm'] - } - '/v1/payment_intents/{intent}/verify_microdeposits': { - /**

Verifies microdeposits on a PaymentIntent object.

*/ - post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] - } - '/v1/payment_links': { - /**

Returns a list of your payment links.

*/ - get: operations['GetPaymentLinks'] - /**

Creates a payment link.

*/ - post: operations['PostPaymentLinks'] - } - '/v1/payment_links/{payment_link}': { - /**

Retrieve a payment link.

*/ - get: operations['GetPaymentLinksPaymentLink'] - /**

Updates a payment link.

*/ - post: operations['PostPaymentLinksPaymentLink'] - } - '/v1/payment_links/{payment_link}/line_items': { - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetPaymentLinksPaymentLinkLineItems'] - } - '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - get: operations['GetPaymentMethods'] - /** - *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

- * - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

- */ - post: operations['PostPaymentMethods'] - } - '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ - get: operations['GetPaymentMethodsPaymentMethod'] - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - post: operations['PostPaymentMethodsPaymentMethod'] - } - '/v1/payment_methods/{payment_method}/attach': { - /** - *

Attaches a PaymentMethod object to a Customer.

- * - *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent - * or a PaymentIntent with setup_future_usage. - * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the - * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. - * See Optimizing cards for future payments for more information about setting up future payments.

- * - *

To use this PaymentMethod as the default for invoice or subscription payments, - * set invoice_settings.default_payment_method, - * on the Customer to the PaymentMethod’s ID.

- */ - post: operations['PostPaymentMethodsPaymentMethodAttach'] - } - '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ - post: operations['PostPaymentMethodsPaymentMethodDetach'] - } - '/v1/payouts': { - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - get: operations['GetPayouts'] - /** - *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

- * - *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

- * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

- */ - post: operations['PostPayouts'] - } - '/v1/payouts/{payout}': { - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - get: operations['GetPayoutsPayout'] - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - post: operations['PostPayoutsPayout'] - } - '/v1/payouts/{payout}/cancel': { - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - post: operations['PostPayoutsPayoutCancel'] - } - '/v1/payouts/{payout}/reverse': { - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - post: operations['PostPayoutsPayoutReverse'] - } - '/v1/plans': { - /**

Returns a list of your plans.

*/ - get: operations['GetPlans'] - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - post: operations['PostPlans'] - } - '/v1/plans/{plan}': { - /**

Retrieves the plan with the given ID.

*/ - get: operations['GetPlansPlan'] - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - post: operations['PostPlansPlan'] - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - delete: operations['DeletePlansPlan'] - } - '/v1/prices': { - /**

Returns a list of your prices.

*/ - get: operations['GetPrices'] - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - post: operations['PostPrices'] - } - '/v1/prices/{price}': { - /**

Retrieves the price with the given ID.

*/ - get: operations['GetPricesPrice'] - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - post: operations['PostPricesPrice'] - } - '/v1/products': { - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - get: operations['GetProducts'] - /**

Creates a new product object.

*/ - post: operations['PostProducts'] - } - '/v1/products/{id}': { - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - get: operations['GetProductsId'] - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostProductsId'] - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - delete: operations['DeleteProductsId'] - } - '/v1/promotion_codes': { - /**

Returns a list of your promotion codes.

*/ - get: operations['GetPromotionCodes'] - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - post: operations['PostPromotionCodes'] - } - '/v1/promotion_codes/{promotion_code}': { - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - get: operations['GetPromotionCodesPromotionCode'] - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - post: operations['PostPromotionCodesPromotionCode'] - } - '/v1/quotes': { - /**

Returns a list of your quotes.

*/ - get: operations['GetQuotes'] - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - post: operations['PostQuotes'] - } - '/v1/quotes/{quote}': { - /**

Retrieves the quote with the given ID.

*/ - get: operations['GetQuotesQuote'] - /**

A quote models prices and services for a customer.

*/ - post: operations['PostQuotesQuote'] - } - '/v1/quotes/{quote}/accept': { - /**

Accepts the specified quote.

*/ - post: operations['PostQuotesQuoteAccept'] - } - '/v1/quotes/{quote}/cancel': { - /**

Cancels the quote.

*/ - post: operations['PostQuotesQuoteCancel'] - } - '/v1/quotes/{quote}/computed_upfront_line_items': { - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - get: operations['GetQuotesQuoteComputedUpfrontLineItems'] - } - '/v1/quotes/{quote}/finalize': { - /**

Finalizes the quote.

*/ - post: operations['PostQuotesQuoteFinalize'] - } - '/v1/quotes/{quote}/line_items': { - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - get: operations['GetQuotesQuoteLineItems'] - } - '/v1/quotes/{quote}/pdf': { - /**

Download the PDF for a finalized quote

*/ - get: operations['GetQuotesQuotePdf'] - } - '/v1/radar/early_fraud_warnings': { - /**

Returns a list of early fraud warnings.

*/ - get: operations['GetRadarEarlyFraudWarnings'] - } - '/v1/radar/early_fraud_warnings/{early_fraud_warning}': { - /** - *

Retrieves the details of an early fraud warning that has previously been created.

- * - *

Please refer to the early fraud warning object reference for more details.

- */ - get: operations['GetRadarEarlyFraudWarningsEarlyFraudWarning'] - } - '/v1/radar/value_list_items': { - /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetRadarValueListItems'] - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - post: operations['PostRadarValueListItems'] - } - '/v1/radar/value_list_items/{item}': { - /**

Retrieves a ValueListItem object.

*/ - get: operations['GetRadarValueListItemsItem'] - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - delete: operations['DeleteRadarValueListItemsItem'] - } - '/v1/radar/value_lists': { - /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetRadarValueLists'] - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - post: operations['PostRadarValueLists'] - } - '/v1/radar/value_lists/{value_list}': { - /**

Retrieves a ValueList object.

*/ - get: operations['GetRadarValueListsValueList'] - /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ - post: operations['PostRadarValueListsValueList'] - /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ - delete: operations['DeleteRadarValueListsValueList'] - } - '/v1/recipients': { - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - get: operations['GetRecipients'] - /** - *

Creates a new Recipient object and verifies the recipient’s identity. - * Also verifies the recipient’s bank account information or debit card, if either is provided.

- */ - post: operations['PostRecipients'] - } - '/v1/recipients/{id}': { - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - get: operations['GetRecipientsId'] - /** - *

Updates the specified recipient by setting the values of the parameters passed. - * Any parameters not provided will be left unchanged.

- * - *

If you update the name or tax ID, the identity verification will automatically be rerun. - * If you update the bank account, the bank account validation will automatically be rerun.

- */ - post: operations['PostRecipientsId'] - /**

Permanently deletes a recipient. It cannot be undone.

*/ - delete: operations['DeleteRecipientsId'] - } - '/v1/refunds': { - /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ - get: operations['GetRefunds'] - /**

Create a refund.

*/ - post: operations['PostRefunds'] - } - '/v1/refunds/{refund}': { - /**

Retrieves the details of an existing refund.

*/ - get: operations['GetRefundsRefund'] - /** - *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - post: operations['PostRefundsRefund'] - } - '/v1/reporting/report_runs': { - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - get: operations['GetReportingReportRuns'] - /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ - post: operations['PostReportingReportRuns'] - } - '/v1/reporting/report_runs/{report_run}': { - /**

Retrieves the details of an existing Report Run.

*/ - get: operations['GetReportingReportRunsReportRun'] - } - '/v1/reporting/report_types': { - /**

Returns a full list of Report Types.

*/ - get: operations['GetReportingReportTypes'] - } - '/v1/reporting/report_types/{report_type}': { - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - get: operations['GetReportingReportTypesReportType'] - } - '/v1/reviews': { - /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - get: operations['GetReviews'] - } - '/v1/reviews/{review}': { - /**

Retrieves a Review object.

*/ - get: operations['GetReviewsReview'] - } - '/v1/reviews/{review}/approve': { - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - post: operations['PostReviewsReviewApprove'] - } - '/v1/setup_attempts': { - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - get: operations['GetSetupAttempts'] - } - '/v1/setup_intents': { - /**

Returns a list of SetupIntents.

*/ - get: operations['GetSetupIntents'] - /** - *

Creates a SetupIntent object.

- * - *

After the SetupIntent is created, attach a payment method and confirm - * to collect any required permissions to charge the payment method later.

- */ - post: operations['PostSetupIntents'] - } - '/v1/setup_intents/{intent}': { - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - get: operations['GetSetupIntentsIntent'] - /**

Updates a SetupIntent object.

*/ - post: operations['PostSetupIntentsIntent'] - } - '/v1/setup_intents/{intent}/cancel': { - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - post: operations['PostSetupIntentsIntentCancel'] - } - '/v1/setup_intents/{intent}/confirm': { - /** - *

Confirm that your customer intends to set up the current or - * provided payment method. For example, you would confirm a SetupIntent - * when a customer hits the “Save” button on a payment method management - * page on your website.

- * - *

If the selected payment method does not require any additional - * steps from the customer, the SetupIntent will transition to the - * succeeded status.

- * - *

Otherwise, it will transition to the requires_action status and - * suggest additional actions via next_action. If setup fails, - * the SetupIntent will transition to the - * requires_payment_method status.

- */ - post: operations['PostSetupIntentsIntentConfirm'] - } - '/v1/setup_intents/{intent}/verify_microdeposits': { - /**

Verifies microdeposits on a SetupIntent object.

*/ - post: operations['PostSetupIntentsIntentVerifyMicrodeposits'] - } - '/v1/shipping_rates': { - /**

Returns a list of your shipping rates.

*/ - get: operations['GetShippingRates'] - /**

Creates a new shipping rate object.

*/ - post: operations['PostShippingRates'] - } - '/v1/shipping_rates/{shipping_rate_token}': { - /**

Returns the shipping rate object with the given ID.

*/ - get: operations['GetShippingRatesShippingRateToken'] - /**

Updates an existing shipping rate object.

*/ - post: operations['PostShippingRatesShippingRateToken'] - } - '/v1/sigma/scheduled_query_runs': { - /**

Returns a list of scheduled query runs.

*/ - get: operations['GetSigmaScheduledQueryRuns'] - } - '/v1/sigma/scheduled_query_runs/{scheduled_query_run}': { - /**

Retrieves the details of an scheduled query run.

*/ - get: operations['GetSigmaScheduledQueryRunsScheduledQueryRun'] - } - '/v1/skus': { - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - get: operations['GetSkus'] - /**

Creates a new SKU associated with a product.

*/ - post: operations['PostSkus'] - } - '/v1/skus/{id}': { - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - get: operations['GetSkusId'] - /** - *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

- */ - post: operations['PostSkusId'] - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - delete: operations['DeleteSkusId'] - } - '/v1/sources': { - /**

Creates a new source object.

*/ - post: operations['PostSources'] - } - '/v1/sources/{source}': { - /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ - get: operations['GetSourcesSource'] - /** - *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

- */ - post: operations['PostSourcesSource'] - } - '/v1/sources/{source}/mandate_notifications/{mandate_notification}': { - /**

Retrieves a new Source MandateNotification.

*/ - get: operations['GetSourcesSourceMandateNotificationsMandateNotification'] - } - '/v1/sources/{source}/source_transactions': { - /**

List source transactions for a given source.

*/ - get: operations['GetSourcesSourceSourceTransactions'] - } - '/v1/sources/{source}/source_transactions/{source_transaction}': { - /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ - get: operations['GetSourcesSourceSourceTransactionsSourceTransaction'] - } - '/v1/sources/{source}/verify': { - /**

Verify a given source.

*/ - post: operations['PostSourcesSourceVerify'] - } - '/v1/subscription_items': { - /**

Returns a list of your subscription items for a given subscription.

*/ - get: operations['GetSubscriptionItems'] - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - post: operations['PostSubscriptionItems'] - } - '/v1/subscription_items/{item}': { - /**

Retrieves the subscription item with the given ID.

*/ - get: operations['GetSubscriptionItemsItem'] - /**

Updates the plan or quantity of an item on a current subscription.

*/ - post: operations['PostSubscriptionItemsItem'] - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - delete: operations['DeleteSubscriptionItemsItem'] - } - '/v1/subscription_items/{subscription_item}/usage_record_summaries': { - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - get: operations['GetSubscriptionItemsSubscriptionItemUsageRecordSummaries'] - } - '/v1/subscription_items/{subscription_item}/usage_records': { - /** - *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

- * - *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

- * - *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

- * - *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

- */ - post: operations['PostSubscriptionItemsSubscriptionItemUsageRecords'] - } - '/v1/subscription_schedules': { - /**

Retrieves the list of your subscription schedules.

*/ - get: operations['GetSubscriptionSchedules'] - /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ - post: operations['PostSubscriptionSchedules'] - } - '/v1/subscription_schedules/{schedule}': { - /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ - get: operations['GetSubscriptionSchedulesSchedule'] - /**

Updates an existing subscription schedule.

*/ - post: operations['PostSubscriptionSchedulesSchedule'] - } - '/v1/subscription_schedules/{schedule}/cancel': { - /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ - post: operations['PostSubscriptionSchedulesScheduleCancel'] - } - '/v1/subscription_schedules/{schedule}/release': { - /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ - post: operations['PostSubscriptionSchedulesScheduleRelease'] - } - '/v1/subscriptions': { - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - get: operations['GetSubscriptions'] - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ - post: operations['PostSubscriptions'] - } - '/v1/subscriptions/{subscription_exposed_id}': { - /**

Retrieves the subscription with the given ID.

*/ - get: operations['GetSubscriptionsSubscriptionExposedId'] - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - post: operations['PostSubscriptionsSubscriptionExposedId'] - /** - *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - delete: operations['DeleteSubscriptionsSubscriptionExposedId'] - } - '/v1/subscriptions/{subscription_exposed_id}/discount': { - /**

Removes the currently applied discount on a subscription.

*/ - delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] - } - '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - get: operations['GetTaxCodes'] - } - '/v1/tax_codes/{id}': { - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ - get: operations['GetTaxCodesId'] - } - '/v1/tax_rates': { - /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ - get: operations['GetTaxRates'] - /**

Creates a new tax rate.

*/ - post: operations['PostTaxRates'] - } - '/v1/tax_rates/{tax_rate}': { - /**

Retrieves a tax rate with the given ID

*/ - get: operations['GetTaxRatesTaxRate'] - /**

Updates an existing tax rate.

*/ - post: operations['PostTaxRatesTaxRate'] - } - '/v1/terminal/connection_tokens': { - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - post: operations['PostTerminalConnectionTokens'] - } - '/v1/terminal/locations': { - /**

Returns a list of Location objects.

*/ - get: operations['GetTerminalLocations'] - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - post: operations['PostTerminalLocations'] - } - '/v1/terminal/locations/{location}': { - /**

Retrieves a Location object.

*/ - get: operations['GetTerminalLocationsLocation'] - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostTerminalLocationsLocation'] - /**

Deletes a Location object.

*/ - delete: operations['DeleteTerminalLocationsLocation'] - } - '/v1/terminal/readers': { - /**

Returns a list of Reader objects.

*/ - get: operations['GetTerminalReaders'] - /**

Creates a new Reader object.

*/ - post: operations['PostTerminalReaders'] - } - '/v1/terminal/readers/{reader}': { - /**

Retrieves a Reader object.

*/ - get: operations['GetTerminalReadersReader'] - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - post: operations['PostTerminalReadersReader'] - /**

Deletes a Reader object.

*/ - delete: operations['DeleteTerminalReadersReader'] - } - '/v1/tokens': { - /** - *

Creates a single-use token that represents a bank account’s details. - * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

- */ - post: operations['PostTokens'] - } - '/v1/tokens/{token}': { - /**

Retrieves the token with the given ID.

*/ - get: operations['GetTokensToken'] - } - '/v1/topups': { - /**

Returns a list of top-ups.

*/ - get: operations['GetTopups'] - /**

Top up the balance of an account

*/ - post: operations['PostTopups'] - } - '/v1/topups/{topup}': { - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - get: operations['GetTopupsTopup'] - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - post: operations['PostTopupsTopup'] - } - '/v1/topups/{topup}/cancel': { - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - post: operations['PostTopupsTopupCancel'] - } - '/v1/transfers': { - /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ - get: operations['GetTransfers'] - /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ - post: operations['PostTransfers'] - } - '/v1/transfers/{id}/reversals': { - /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ - get: operations['GetTransfersIdReversals'] - /** - *

When you create a new reversal, you must specify a transfer to create it on.

- * - *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

- * - *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

- */ - post: operations['PostTransfersIdReversals'] - } - '/v1/transfers/{transfer}': { - /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ - get: operations['GetTransfersTransfer'] - /** - *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts only metadata as an argument.

- */ - post: operations['PostTransfersTransfer'] - } - '/v1/transfers/{transfer}/reversals/{id}': { - /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ - get: operations['GetTransfersTransferReversalsId'] - /** - *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata and description as arguments.

- */ - post: operations['PostTransfersTransferReversalsId'] - } - '/v1/webhook_endpoints': { - /**

Returns a list of your webhook endpoints.

*/ - get: operations['GetWebhookEndpoints'] - /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ - post: operations['PostWebhookEndpoints'] - } - '/v1/webhook_endpoints/{webhook_endpoint}': { - /**

Retrieves the webhook endpoint with the given ID.

*/ - get: operations['GetWebhookEndpointsWebhookEndpoint'] - /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ - post: operations['PostWebhookEndpointsWebhookEndpoint'] - /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ - delete: operations['DeleteWebhookEndpointsWebhookEndpoint'] - } -} - -export interface components { - schemas: { - /** - * Account - * @description This is an object representing a Stripe account. You can retrieve it to see - * properties on the account like its current e-mail address or if the account is - * enabled yet to make live charges. - * - * Some properties, marked below, are available only to platforms that want to - * [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts). - */ - account: { - /** @description Business information about the account. */ - business_profile?: components['schemas']['account_business_profile'] | null - /** - * @description The business type. - * @enum {string|null} - */ - business_type?: ('company' | 'government_entity' | 'individual' | 'non_profit') | null - capabilities?: components['schemas']['account_capabilities'] - /** @description Whether the account can create live charges. */ - charges_enabled?: boolean - company?: components['schemas']['legal_entity_company'] - controller?: components['schemas']['account_unification_account_controller'] - /** @description The account's country. */ - country?: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created?: number - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** @description Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. */ - details_submitted?: boolean - /** @description An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. */ - email?: string | null - /** - * ExternalAccountList - * @description External accounts (bank accounts and debit cards) currently attached to this account - */ - external_accounts?: { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (components['schemas']['bank_account'] | components['schemas']['card'])[] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - future_requirements?: components['schemas']['account_future_requirements'] - /** @description Unique identifier for the object. */ - id: string - individual?: components['schemas']['person'] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account' - /** @description Whether Stripe can send payouts to this account. */ - payouts_enabled?: boolean - requirements?: components['schemas']['account_requirements'] - /** @description Options for customizing how the account functions within Stripe. */ - settings?: components['schemas']['account_settings'] | null - tos_acceptance?: components['schemas']['account_tos_acceptance'] - /** - * @description The Stripe account type. Can be `standard`, `express`, or `custom`. - * @enum {string} - */ - type?: 'custom' | 'express' | 'standard' - } - /** AccountBacsDebitPaymentsSettings */ - account_bacs_debit_payments_settings: { - /** @description The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor. */ - display_name?: string - } - /** AccountBrandingSettings */ - account_branding_settings: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. */ - icon?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. */ - logo?: (string | components['schemas']['file']) | null - /** @description A CSS hex color value representing the primary branding color for this account */ - primary_color?: string | null - /** @description A CSS hex color value representing the secondary branding color for this account */ - secondary_color?: string | null - } - /** AccountBusinessProfile */ - account_business_profile: { - /** @description [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. */ - mcc?: string | null - /** @description The customer-facing business name. */ - name?: string | null - /** @description Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ - product_description?: string | null - /** @description A publicly available mailing address for sending support issues to. */ - support_address?: components['schemas']['address'] | null - /** @description A publicly available email address for sending support issues to. */ - support_email?: string | null - /** @description A publicly available phone number to call with support issues. */ - support_phone?: string | null - /** @description A publicly available website for handling support issues. */ - support_url?: string | null - /** @description The business's publicly available website. */ - url?: string | null - } - /** AccountCapabilities */ - account_capabilities: { - /** - * @description The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. - * @enum {string} - */ - acss_debit_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. - * @enum {string} - */ - afterpay_clearpay_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. - * @enum {string} - */ - au_becs_debit_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. - * @enum {string} - */ - bacs_debit_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. - * @enum {string} - */ - bancontact_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. - * @enum {string} - */ - boleto_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards - * @enum {string} - */ - card_issuing?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. - * @enum {string} - */ - card_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. - * @enum {string} - */ - cartes_bancaires_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. - * @enum {string} - */ - eps_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. - * @enum {string} - */ - fpx_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. - * @enum {string} - */ - giropay_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. - * @enum {string} - */ - grabpay_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. - * @enum {string} - */ - ideal_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. - * @enum {string} - */ - jcb_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. - * @enum {string} - */ - klarna_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the legacy payments capability of the account. - * @enum {string} - */ - legacy_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. - * @enum {string} - */ - oxxo_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. - * @enum {string} - */ - p24_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. - * @enum {string} - */ - sepa_debit_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. - * @enum {string} - */ - sofort_payments?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the tax reporting 1099-K (US) capability of the account. - * @enum {string} - */ - tax_reporting_us_1099_k?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the tax reporting 1099-MISC (US) capability of the account. - * @enum {string} - */ - tax_reporting_us_1099_misc?: 'active' | 'inactive' | 'pending' - /** - * @description The status of the transfers capability of the account, or whether your platform can transfer funds to the account. - * @enum {string} - */ - transfers?: 'active' | 'inactive' | 'pending' - } - /** AccountCapabilityFutureRequirements */ - account_capability_future_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** - * Format: unix-time - * @description Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. - */ - current_deadline?: number | null - /** @description Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. */ - currently_due: string[] - /** @description This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. */ - disabled_reason?: string | null - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors: components['schemas']['account_requirements_error'][] - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. */ - eventually_due: string[] - /** @description Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ - pending_verification: string[] - } - /** AccountCapabilityRequirements */ - account_capability_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** - * Format: unix-time - * @description Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. - */ - current_deadline?: number | null - /** @description Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. */ - currently_due: string[] - /** - * @description If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. - * - * `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service: - * - * - [Afterpay Clearpay's terms of service](/afterpay-clearpay/legal#restricted-businesses) - * - * If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance. - */ - disabled_reason?: string | null - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors: components['schemas']['account_requirements_error'][] - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. */ - eventually_due: string[] - /** @description Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ - pending_verification: string[] - } - /** AccountCardIssuingSettings */ - account_card_issuing_settings: { - tos_acceptance?: components['schemas']['card_issuing_account_terms_of_service'] - } - /** AccountCardPaymentsSettings */ - account_card_payments_settings: { - decline_on?: components['schemas']['account_decline_charge_on'] - /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ - statement_descriptor_prefix?: string | null - } - /** AccountDashboardSettings */ - account_dashboard_settings: { - /** @description The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ - display_name?: string | null - /** @description The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). */ - timezone?: string | null - } - /** AccountDeclineChargeOn */ - account_decline_charge_on: { - /** @description Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. */ - avs_failure: boolean - /** @description Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. */ - cvc_failure: boolean - } - /** AccountFutureRequirements */ - account_future_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** - * Format: unix-time - * @description Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. - */ - current_deadline?: number | null - /** @description Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. */ - currently_due?: string[] | null - /** @description This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account. */ - disabled_reason?: string | null - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors?: components['schemas']['account_requirements_error'][] | null - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. */ - eventually_due?: string[] | null - /** @description Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ - past_due?: string[] | null - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ - pending_verification?: string[] | null - } - /** - * AccountLink - * @description Account Links are the means by which a Connect platform grants a connected account permission to access - * Stripe-hosted applications, such as Connect Onboarding. - * - * Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding). - */ - account_link: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * Format: unix-time - * @description The timestamp at which this account link will expire. - */ - expires_at: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account_link' - /** @description The URL for the account link. */ - url: string - } - /** AccountPaymentsSettings */ - account_payments_settings: { - /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. */ - statement_descriptor?: string | null - /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only) */ - statement_descriptor_kana?: string | null - /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ - statement_descriptor_kanji?: string | null - } - /** AccountPayoutSettings */ - account_payout_settings: { - /** @description A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`. */ - debit_negative_balances: boolean - schedule: components['schemas']['transfer_schedule'] - /** @description The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. */ - statement_descriptor?: string | null - } - /** AccountRequirements */ - account_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** - * Format: unix-time - * @description Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. - */ - current_deadline?: number | null - /** @description Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ - currently_due?: string[] | null - /** @description If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`. */ - disabled_reason?: string | null - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors?: components['schemas']['account_requirements_error'][] | null - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. */ - eventually_due?: string[] | null - /** @description Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. */ - past_due?: string[] | null - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ - pending_verification?: string[] | null - } - /** AccountRequirementsAlternative */ - account_requirements_alternative: { - /** @description Fields that can be provided to satisfy all fields in `original_fields_due`. */ - alternative_fields_due: string[] - /** @description Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. */ - original_fields_due: string[] - } - /** AccountRequirementsError */ - account_requirements_error: { - /** - * @description The code for the type of error. - * @enum {string} - */ - code: - | 'invalid_address_city_state_postal_code' - | 'invalid_street_address' - | 'invalid_value_other' - | 'verification_document_address_mismatch' - | 'verification_document_address_missing' - | 'verification_document_corrupt' - | 'verification_document_country_not_supported' - | 'verification_document_dob_mismatch' - | 'verification_document_duplicate_type' - | 'verification_document_expired' - | 'verification_document_failed_copy' - | 'verification_document_failed_greyscale' - | 'verification_document_failed_other' - | 'verification_document_failed_test_mode' - | 'verification_document_fraudulent' - | 'verification_document_id_number_mismatch' - | 'verification_document_id_number_missing' - | 'verification_document_incomplete' - | 'verification_document_invalid' - | 'verification_document_issue_or_expiry_date_missing' - | 'verification_document_manipulated' - | 'verification_document_missing_back' - | 'verification_document_missing_front' - | 'verification_document_name_mismatch' - | 'verification_document_name_missing' - | 'verification_document_nationality_mismatch' - | 'verification_document_not_readable' - | 'verification_document_not_signed' - | 'verification_document_not_uploaded' - | 'verification_document_photo_mismatch' - | 'verification_document_too_large' - | 'verification_document_type_not_supported' - | 'verification_failed_address_match' - | 'verification_failed_business_iec_number' - | 'verification_failed_document_match' - | 'verification_failed_id_number_match' - | 'verification_failed_keyed_identity' - | 'verification_failed_keyed_match' - | 'verification_failed_name_match' - | 'verification_failed_other' - | 'verification_failed_tax_id_match' - | 'verification_failed_tax_id_not_issued' - | 'verification_missing_executives' - | 'verification_missing_owners' - | 'verification_requires_additional_memorandum_of_associations' - /** @description An informative message that indicates the error type and provides additional details about the error. */ - reason: string - /** @description The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ - requirement: string - } - /** AccountSepaDebitPaymentsSettings */ - account_sepa_debit_payments_settings: { - /** @description SEPA creditor identifier that identifies the company making the payment. */ - creditor_id?: string - } - /** AccountSettings */ - account_settings: { - bacs_debit_payments?: components['schemas']['account_bacs_debit_payments_settings'] - branding: components['schemas']['account_branding_settings'] - card_issuing?: components['schemas']['account_card_issuing_settings'] - card_payments: components['schemas']['account_card_payments_settings'] - dashboard: components['schemas']['account_dashboard_settings'] - payments: components['schemas']['account_payments_settings'] - payouts?: components['schemas']['account_payout_settings'] - sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] - } - /** AccountTOSAcceptance */ - account_tos_acceptance: { - /** - * Format: unix-time - * @description The Unix timestamp marking when the account representative accepted their service agreement - */ - date?: number | null - /** @description The IP address from which the account representative accepted their service agreement */ - ip?: string | null - /** @description The user's service agreement type */ - service_agreement?: string - /** @description The user agent of the browser from which the account representative accepted their service agreement */ - user_agent?: string | null - } - /** AccountUnificationAccountController */ - account_unification_account_controller: { - /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ - is_controller?: boolean - /** - * @description The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. - * @enum {string} - */ - type: 'account' | 'application' - } - /** Address */ - address: { - /** @description City, district, suburb, town, or village. */ - city?: string | null - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string | null - /** @description Address line 1 (e.g., street, PO Box, or company name). */ - line1?: string | null - /** @description Address line 2 (e.g., apartment, suite, unit, or building). */ - line2?: string | null - /** @description ZIP or postal code. */ - postal_code?: string | null - /** @description State, county, province, or region. */ - state?: string | null - } - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } - /** APIErrors */ - api_errors: { - /** @description For card errors, the ID of the failed charge. */ - charge?: string - /** @description For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ - code?: string - /** @description For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. */ - decline_code?: string - /** @description A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ - doc_url?: string - /** @description A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ - message?: string - /** @description If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */ - param?: string - payment_intent?: components['schemas']['payment_intent'] - payment_method?: components['schemas']['payment_method'] - /** @description If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. */ - payment_method_type?: string - setup_intent?: components['schemas']['setup_intent'] - /** @description The source object for errors returned on a request involving a source. */ - source?: components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'] - /** - * @description The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - * @enum {string} - */ - type: 'api_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error' - } - /** ApplePayDomain */ - apple_pay_domain: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - domain_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'apple_pay_domain' - } - /** Application */ - application: { - /** @description Unique identifier for the object. */ - id: string - /** @description The name of the application. */ - name?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'application' - } - /** PlatformFee */ - application_fee: { - /** @description ID of the Stripe account this fee was taken from. */ - account: string | components['schemas']['account'] - /** @description Amount earned, in %s. */ - amount: number - /** @description Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ - amount_refunded: number - /** @description ID of the Connect application that earned the fee. */ - application: string | components['schemas']['application'] - /** @description Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** @description ID of the charge that the application fee was taken from. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'application_fee' - /** @description ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ - originating_transaction?: (string | components['schemas']['charge']) | null - /** @description Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ - refunded: boolean - /** - * FeeRefundList - * @description A list of refunds that have been applied to the fee. - */ - refunds: { - /** @description Details about each object. */ - data: components['schemas']['fee_refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** AutomaticTax */ - automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ - enabled: boolean - /** - * @description The status of the most recent automated tax calculation for this invoice. - * @enum {string|null} - */ - status?: ('complete' | 'failed' | 'requires_location_inputs') | null - } - /** - * Balance - * @description This is an object representing your Stripe balance. You can retrieve it to see - * the balance currently on your Stripe account. - * - * You can also retrieve the balance history, which contains a list of - * [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance - * (charges, payouts, and so forth). - * - * The available and pending amounts for each currency are broken down further by - * payment source types. - * - * Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). - */ - balance: { - /** @description Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property. */ - available: components['schemas']['balance_amount'][] - /** @description Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property. */ - connect_reserved?: components['schemas']['balance_amount'][] - /** @description Funds that can be paid out using Instant Payouts. */ - instant_available?: components['schemas']['balance_amount'][] - issuing?: components['schemas']['balance_detail'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'balance' - /** @description Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property. */ - pending: components['schemas']['balance_amount'][] - } - /** BalanceAmount */ - balance_amount: { - /** @description Balance amount. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - source_types?: components['schemas']['balance_amount_by_source_type'] - } - /** BalanceAmountBySourceType */ - balance_amount_by_source_type: { - /** @description Amount for bank account. */ - bank_account?: number - /** @description Amount for card. */ - card?: number - /** @description Amount for FPX. */ - fpx?: number - } - /** BalanceDetail */ - balance_detail: { - /** @description Funds that are available for use. */ - available: components['schemas']['balance_amount'][] - } - /** - * BalanceTransaction - * @description Balance transactions represent funds moving through your Stripe account. - * They're created for every type of transaction that comes into or flows out of your Stripe account balance. - * - * Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types). - */ - balance_transaction: { - /** @description Gross amount of the transaction, in %s. */ - amount: number - /** - * Format: unix-time - * @description The date the transaction's net funds will become available in the Stripe balance. - */ - available_on: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. */ - exchange_rate?: number | null - /** @description Fees (in %s) paid for this transaction. */ - fee: number - /** @description Detailed breakdown of fees (in %s) paid for this transaction. */ - fee_details: components['schemas']['fee'][] - /** @description Unique identifier for the object. */ - id: string - /** @description Net amount of the transaction, in %s. */ - net: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'balance_transaction' - /** @description [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. */ - reporting_category: string - /** @description The Stripe object to which this transaction is related. */ - source?: - | ( - | string - | components['schemas']['application_fee'] - | components['schemas']['charge'] - | components['schemas']['connect_collection_transfer'] - | components['schemas']['dispute'] - | components['schemas']['fee_refund'] - | components['schemas']['issuing.authorization'] - | components['schemas']['issuing.dispute'] - | components['schemas']['issuing.transaction'] - | components['schemas']['payout'] - | components['schemas']['platform_tax_fee'] - | components['schemas']['refund'] - | components['schemas']['reserve_transaction'] - | components['schemas']['tax_deducted_at_source'] - | components['schemas']['topup'] - | components['schemas']['transfer'] - | components['schemas']['transfer_reversal'] - ) - | null - /** @description If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ - status: string - /** - * @description Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. - * @enum {string} - */ - type: - | 'adjustment' - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'application_fee' - | 'application_fee_refund' - | 'charge' - | 'connect_collection_transfer' - | 'contribution' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'payment' - | 'payment_failure_refund' - | 'payment_refund' - | 'payout' - | 'payout_cancel' - | 'payout_failure' - | 'refund' - | 'refund_failure' - | 'reserve_transaction' - | 'reserved_funds' - | 'stripe_fee' - | 'stripe_fx_fee' - | 'tax_fee' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_cancel' - | 'transfer_failure' - | 'transfer_refund' - } - /** - * BankAccount - * @description These bank accounts are payment methods on `Customer` objects. - * - * On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer - * destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). - * They can be bank accounts or debit cards as well, and are documented in the links above. - * - * Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers). - */ - bank_account: { - /** @description The ID of the account that the bank account is associated with. */ - account?: (string | components['schemas']['account']) | null - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string | null - /** @description The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: string | null - /** @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. */ - account_type?: string | null - /** @description A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. */ - available_payout_methods?: ('instant' | 'standard')[] | null - /** @description Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ - bank_name?: string | null - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country: string - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency: string - /** @description The ID of the customer that the bank account is associated with. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Whether this bank account is the default external account for its currency. */ - default_for_currency?: boolean | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description The last four digits of the bank account number. */ - last4: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - /** @description The routing transit number for the bank account. */ - routing_number?: string | null - /** - * @description For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. - * - * For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. - */ - status: string - } - /** billing_details */ - billing_details: { - /** @description Billing address. */ - address?: components['schemas']['address'] | null - /** @description Email address. */ - email?: string | null - /** @description Full name. */ - name?: string | null - /** @description Billing phone number (including extension). */ - phone?: string | null - } - /** - * PortalConfiguration - * @description A portal configuration describes the functionality and behavior of a portal session. - */ - 'billing_portal.configuration': { - /** @description Whether the configuration is active and can be used to create portal sessions. */ - active: boolean - /** @description ID of the Connect Application that created the configuration. */ - application?: string | null - business_profile: components['schemas']['portal_business_profile'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: string | null - features: components['schemas']['portal_features'] - /** @description Unique identifier for the object. */ - id: string - /** @description Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. */ - is_default: boolean - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'billing_portal.configuration' - /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. - */ - updated: number - } - /** - * PortalSession - * @description The Billing customer portal is a Stripe-hosted UI for subscription and - * billing management. - * - * A portal configuration describes the functionality and features that you - * want to provide to your customers through the portal. - * - * A portal session describes the instantiation of the customer portal for - * a particular customer. By visiting the session's URL, the customer - * can manage their subscriptions and billing details. For security reasons, - * sessions are short-lived and will expire if the customer does not visit the URL. - * Create sessions on-demand when customers intend to manage their subscriptions - * and billing details. - * - * Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal). - */ - 'billing_portal.session': { - /** @description The configuration used by this session, describing the features available. */ - configuration: string | components['schemas']['billing_portal.configuration'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer for this session. */ - customer: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. - * @enum {string|null} - */ - locale?: - | ( - | 'auto' - | 'bg' - | 'cs' - | 'da' - | 'de' - | 'el' - | 'en' - | 'en-AU' - | 'en-CA' - | 'en-GB' - | 'en-IE' - | 'en-IN' - | 'en-NZ' - | 'en-SG' - | 'es' - | 'es-419' - | 'et' - | 'fi' - | 'fil' - | 'fr' - | 'fr-CA' - | 'hr' - | 'hu' - | 'id' - | 'it' - | 'ja' - | 'ko' - | 'lt' - | 'lv' - | 'ms' - | 'mt' - | 'nb' - | 'nl' - | 'pl' - | 'pt' - | 'pt-BR' - | 'ro' - | 'ru' - | 'sk' - | 'sl' - | 'sv' - | 'th' - | 'tr' - | 'vi' - | 'zh' - | 'zh-HK' - | 'zh-TW' - ) - | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'billing_portal.session' - /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ - on_behalf_of?: string | null - /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string - /** @description The short-lived URL of the session that gives customers access to the customer portal. */ - url: string - } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null - } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } - /** - * AccountCapability - * @description This is an object representing a capability for a Stripe account. - * - * Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities). - */ - capability: { - /** @description The account for which the capability enables functionality. */ - account: string | components['schemas']['account'] - future_requirements?: components['schemas']['account_capability_future_requirements'] - /** @description The identifier for the capability. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'capability' - /** @description Whether the capability has been requested. */ - requested: boolean - /** - * Format: unix-time - * @description Time at which the capability was requested. Measured in seconds since the Unix epoch. - */ - requested_at?: number | null - requirements?: components['schemas']['account_capability_requirements'] - /** - * @description The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. - * @enum {string} - */ - status: 'active' | 'disabled' | 'inactive' | 'pending' | 'unrequested' - } - /** - * Card - * @description You can store multiple cards on a customer in order to charge the customer - * later. You can also store multiple debit cards on a recipient in order to - * transfer to those cards later. - * - * Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards). - */ - card: { - /** @description The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. */ - account?: (string | components['schemas']['account']) | null - /** @description City/District/Suburb/Town/Village. */ - address_city?: string | null - /** @description Billing address country, if provided when creating card. */ - address_country?: string | null - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string | null - /** @description If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string | null - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string | null - /** @description State/County/Province/Region. */ - address_state?: string | null - /** @description ZIP or postal code. */ - address_zip?: string | null - /** @description If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_zip_check?: string | null - /** @description A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. */ - available_payout_methods?: ('instant' | 'standard')[] | null - /** @description Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ - brand: string - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. */ - currency?: string | null - /** @description The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). */ - cvc_check?: string | null - /** @description Whether this card is the default external account for its currency. */ - default_for_currency?: boolean | null - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding: string - /** @description Unique identifier for the object. */ - id: string - /** @description The last four digits of the card. */ - last4: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description Cardholder name. */ - name?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: (string | components['schemas']['recipient']) | null - /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ - tokenization_method?: string | null - } - /** card_generated_from_payment_method_details */ - card_generated_from_payment_method_details: { - card_present?: components['schemas']['payment_method_details_card_present'] - /** @description The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. */ - type: string - } - /** CardIssuingAccountTermsOfService */ - card_issuing_account_terms_of_service: { - /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ - date?: number | null - /** @description The IP address from which the account representative accepted the service agreement. */ - ip?: string | null - /** @description The user agent of the browser from which the account representative accepted the service agreement. */ - user_agent?: string - } - /** card_mandate_payment_method_details */ - card_mandate_payment_method_details: { [key: string]: unknown } - /** - * Charge - * @description To charge a credit or a debit card, you create a `Charge` object. You can - * retrieve and refund individual charges as well as list all charges. Charges - * are identified by a unique, random ID. - * - * Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). - */ - charge: { - /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). */ - amount_captured: number - /** @description Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ - amount_refunded: number - /** @description ID of the Connect application that created the charge. */ - application?: (string | components['schemas']['application']) | null - /** @description The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ - application_fee?: (string | components['schemas']['application_fee']) | null - /** @description The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ - application_fee_amount?: number | null - /** @description ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - billing_details: components['schemas']['billing_details'] - /** @description The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. */ - calculated_statement_descriptor?: string | null - /** @description If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ - captured: boolean - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the customer this charge is for if one exists. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Whether the charge has been disputed. */ - disputed: boolean - /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ - failure_code?: string | null - /** @description Message to user further explaining reason for charge failure if available. */ - failure_message?: string | null - /** @description Information on fraud assessments for the charge. */ - fraud_details?: components['schemas']['charge_fraud_details'] | null - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice this charge is for if one exists. */ - invoice?: (string | components['schemas']['invoice']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'charge' - /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the order this charge is for if one exists. */ - order?: (string | components['schemas']['order']) | null - /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ - outcome?: components['schemas']['charge_outcome'] | null - /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ - paid: boolean - /** @description ID of the PaymentIntent associated with this charge, if one exists. */ - payment_intent?: (string | components['schemas']['payment_intent']) | null - /** @description ID of the payment method used in this charge. */ - payment_method?: string | null - /** @description Details about the payment method at the time of the transaction. */ - payment_method_details?: components['schemas']['payment_method_details'] | null - /** @description This is the email address that the receipt for this charge was sent to. */ - receipt_email?: string | null - /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ - receipt_number?: string | null - /** @description This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. */ - receipt_url?: string | null - /** @description Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ - refunded: boolean - /** - * RefundList - * @description A list of refunds that have been applied to the charge. - */ - refunds: { - /** @description Details about each object. */ - data: components['schemas']['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description ID of the review associated with this charge if one exists. */ - review?: (string | components['schemas']['review']) | null - /** @description Shipping information for the charge. */ - shipping?: components['schemas']['shipping'] | null - /** @description The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ - source_transfer?: (string | components['schemas']['transfer']) | null - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string | null - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string | null - /** - * @description The status of the payment is either `succeeded`, `pending`, or `failed`. - * @enum {string} - */ - status: 'failed' | 'pending' | 'succeeded' - /** @description ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ - transfer?: string | components['schemas']['transfer'] - /** @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ - transfer_data?: components['schemas']['charge_transfer_data'] | null - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string | null - } - /** ChargeFraudDetails */ - charge_fraud_details: { - /** @description Assessments from Stripe. If set, the value is `fraudulent`. */ - stripe_report?: string - /** @description Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ - user_report?: string - } - /** ChargeOutcome */ - charge_outcome: { - /** @description Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. */ - network_status?: string | null - /** @description An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. */ - reason?: string | null - /** @description Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. */ - risk_level?: string - /** @description Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. */ - risk_score?: number - /** @description The ID of the Radar rule that matched the payment, if applicable. */ - rule?: string | components['schemas']['rule'] - /** @description A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ - seller_message?: string | null - /** @description Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. */ - type: string - } - /** ChargeTransferData */ - charge_transfer_data: { - /** @description The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ - amount?: number | null - /** @description ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ - destination: string | components['schemas']['account'] - } - /** CheckoutAcssDebitMandateOptions */ - checkout_acss_debit_mandate_options: { - /** @description A URL for custom mandate text */ - custom_mandate_url?: string - /** @description List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. */ - default_for?: ('invoice' | 'subscription')[] - /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ - interval_description?: string | null - /** - * @description Payment schedule for the mandate. - * @enum {string|null} - */ - payment_schedule?: ('combined' | 'interval' | 'sporadic') | null - /** - * @description Transaction type of the mandate. - * @enum {string|null} - */ - transaction_type?: ('business' | 'personal') | null - } - /** CheckoutAcssDebitPaymentMethodOptions */ - checkout_acss_debit_payment_method_options: { - /** - * @description Currency supported by the bank account. Returned when the Session is in `setup` mode. - * @enum {string} - */ - currency?: 'cad' | 'usd' - mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] - /** - * @description Bank account verification method. - * @enum {string} - */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** CheckoutBoletoPaymentMethodOptions */ - checkout_boleto_payment_method_options: { - /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ - expires_after_days: number - } - /** CheckoutOxxoPaymentMethodOptions */ - checkout_oxxo_payment_method_options: { - /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ - expires_after_days: number - } - /** CheckoutSessionPaymentMethodOptions */ - checkout_session_payment_method_options: { - acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] - boleto?: components['schemas']['checkout_boleto_payment_method_options'] - oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] - } - /** - * Session - * @description A Checkout Session represents your customer's session as they pay for - * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) - * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a - * new Session each time your customer attempts to pay. - * - * Once payment is successful, the Checkout Session will contain a reference - * to the [Customer](https://stripe.com/docs/api/customers), and either the successful - * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active - * [Subscription](https://stripe.com/docs/api/subscriptions). - * - * You can create a Checkout Session on your server and pass its ID to the - * client to begin Checkout. - * - * Related guide: [Checkout Server Quickstart](https://stripe.com/docs/payments/checkout/api). - */ - 'checkout.session': { - /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ - after_expiration?: components['schemas']['payment_pages_checkout_session_after_expiration'] | null - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean | null - /** @description Total of all items before discounts or taxes are applied. */ - amount_subtotal?: number | null - /** @description Total of all items after discounts and taxes are applied. */ - amount_total?: number | null - automatic_tax: components['schemas']['payment_pages_checkout_session_automatic_tax'] - /** - * @description Describes whether Checkout should collect the customer's billing address. - * @enum {string|null} - */ - billing_address_collection?: ('auto' | 'required') | null - /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string - /** - * @description A unique string to reference the Checkout Session. This can be a - * customer ID, a cart ID, or similar, and can be used to reconcile the - * Session with your internal systems. - */ - client_reference_id?: string | null - /** @description Results of `consent_collection` for this session. */ - consent?: components['schemas']['payment_pages_checkout_session_consent'] | null - /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ - consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string | null - /** - * @description The ID of the customer for this Session. - * For Checkout Sessions in `payment` or `subscription` mode, Checkout - * will create a new customer object based on information provided - * during the payment flow unless an existing customer was provided when - * the Session was created. - */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** - * @description Configure whether a Checkout Session creates a Customer when the Checkout Session completes. - * @enum {string|null} - */ - customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ - customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null - /** - * @description If provided, this value will be used when the Customer object is created. - * If not provided, customers will be asked to enter their email address. - * Use this parameter to prefill customer data if you already have an email - * on file. To access information about the customer once the payment flow is - * complete, use the `customer` attribute. - */ - customer_email?: string | null - /** - * Format: unix-time - * @description The timestamp at which the Checkout Session will expire. - */ - expires_at: number - /** - * @description Unique identifier for the object. Used to pass to `redirectToCheckout` - * in Stripe.js. - */ - id: string - /** - * PaymentPagesCheckoutSessionListLineItems - * @description The line items purchased by the customer. - */ - line_items?: { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - * @enum {string|null} - */ - locale?: - | ( - | 'auto' - | 'bg' - | 'cs' - | 'da' - | 'de' - | 'el' - | 'en' - | 'en-GB' - | 'es' - | 'es-419' - | 'et' - | 'fi' - | 'fil' - | 'fr' - | 'fr-CA' - | 'hr' - | 'hu' - | 'id' - | 'it' - | 'ja' - | 'ko' - | 'lt' - | 'lv' - | 'ms' - | 'mt' - | 'nb' - | 'nl' - | 'pl' - | 'pt' - | 'pt-BR' - | 'ro' - | 'ru' - | 'sk' - | 'sl' - | 'sv' - | 'th' - | 'tr' - | 'vi' - | 'zh' - | 'zh-HK' - | 'zh-TW' - ) - | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description The mode of the Checkout Session. - * @enum {string} - */ - mode: 'payment' | 'setup' | 'subscription' - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'checkout.session' - /** @description The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ - payment_intent?: (string | components['schemas']['payment_intent']) | null - /** @description The ID of the Payment Link that created this Session. */ - payment_link?: (string | components['schemas']['payment_link']) | null - /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ - payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null - /** - * @description A list of the types of payment methods (e.g. card) this Checkout - * Session is allowed to accept. - */ - payment_method_types: string[] - /** - * @description The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. - * You can use this value to decide when to fulfill your customer's order. - * @enum {string} - */ - payment_status: 'no_payment_required' | 'paid' | 'unpaid' - phone_number_collection?: components['schemas']['payment_pages_checkout_session_phone_number_collection'] - /** @description The ID of the original expired Checkout Session that triggered the recovery flow. */ - recovered_from?: string | null - /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description Shipping information for this Checkout Session. */ - shipping?: components['schemas']['shipping'] | null - /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ - shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null - /** @description The shipping rate options applied to this Session. */ - shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: (string | components['schemas']['shipping_rate']) | null - /** - * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. - * @enum {string|null} - */ - status?: ('complete' | 'expired' | 'open') | null - /** - * @description Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - * in `subscription` or `setup` mode. - * @enum {string|null} - */ - submit_type?: ('auto' | 'book' | 'donate' | 'pay') | null - /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ - subscription?: (string | components['schemas']['subscription']) | null - /** - * @description The URL the customer will be directed to after the payment or - * subscription creation is successful. - */ - success_url: string - tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] - /** @description Tax and discount details for the computed total amount. */ - total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null - /** @description The URL to the Checkout Session. */ - url?: string | null - } - /** ConnectCollectionTransfer */ - connect_collection_transfer: { - /** @description Amount transferred, in %s. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the account that funds are being collected for. */ - destination: string | components['schemas']['account'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'connect_collection_transfer' - } - /** - * CountrySpec - * @description Stripe needs to collect certain pieces of information about each account - * created. These requirements can differ depending on the account's country. The - * Country Specs API makes these rules available to your integration. - * - * You can also view the information from this API call as [an online - * guide](/docs/connect/required-verification-information). - */ - country_spec: { - /** @description The default currency for this country. This applies to both payment methods and bank accounts. */ - default_currency: string - /** @description Unique identifier for the object. Represented as the ISO country code for this country. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'country_spec' - /** @description Currencies that can be accepted in the specific country (for transfers). */ - supported_bank_account_currencies: { [key: string]: string[] } - /** @description Currencies that can be accepted in the specified country (for payments). */ - supported_payment_currencies: string[] - /** @description Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). */ - supported_payment_methods: string[] - /** @description Countries that can accept transfers from the specified country. */ - supported_transfer_countries: string[] - verification_fields: components['schemas']['country_spec_verification_fields'] - } - /** CountrySpecVerificationFieldDetails */ - country_spec_verification_field_details: { - /** @description Additional fields which are only required for some users. */ - additional: string[] - /** @description Fields which every account must eventually provide. */ - minimum: string[] - } - /** CountrySpecVerificationFields */ - country_spec_verification_fields: { - company: components['schemas']['country_spec_verification_field_details'] - individual: components['schemas']['country_spec_verification_field_details'] - } - /** - * Coupon - * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). - */ - coupon: { - /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ - amount_off?: number | null - applies_to?: components['schemas']['coupon_applies_to'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ - currency?: string | null - /** - * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. - * @enum {string} - */ - duration: 'forever' | 'once' | 'repeating' - /** @description If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ - duration_in_months?: number | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ - max_redemptions?: number | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description Name of the coupon displayed to customers on for instance invoices or receipts. */ - name?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'coupon' - /** @description Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. */ - percent_off?: number | null - /** - * Format: unix-time - * @description Date after which the coupon can no longer be redeemed. - */ - redeem_by?: number | null - /** @description Number of times this coupon has been applied to a customer. */ - times_redeemed: number - /** @description Taking account of the above properties, whether this coupon can still be applied to a customer. */ - valid: boolean - } - /** CouponAppliesTo */ - coupon_applies_to: { - /** @description A list of product IDs this coupon applies to */ - products: string[] - } - /** - * CreditNote - * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. - * - * Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes). - */ - credit_note: { - /** @description The integer amount in %s representing the total amount of the credit note, including tax. */ - amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the customer. */ - customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] - /** @description Customer balance transaction related to this credit note. */ - customer_balance_transaction?: (string | components['schemas']['customer_balance_transaction']) | null - /** @description The integer amount in %s representing the total amount of discount that was credited. */ - discount_amount: number - /** @description The aggregate amounts calculated per discount for all line items. */ - discount_amounts: components['schemas']['discounts_resource_discount_amount'][] - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice. */ - invoice: string | components['schemas']['invoice'] - /** - * CreditNoteLinesList - * @description Line items that make up the credit note - */ - lines: { - /** @description Details about each object. */ - data: components['schemas']['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Customer-facing text that appears on the credit note PDF. */ - memo?: string | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ - number: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'credit_note' - /** @description Amount that was credited outside of Stripe. */ - out_of_band_amount?: number | null - /** @description The link to download the PDF of the credit note. */ - pdf: string - /** - * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - * @enum {string|null} - */ - reason?: ('duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory') | null - /** @description Refund related to this credit note. */ - refund?: (string | components['schemas']['refund']) | null - /** - * @description Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). - * @enum {string} - */ - status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ - subtotal: number - /** @description The aggregate amounts calculated per tax rate for all line items. */ - tax_amounts: components['schemas']['credit_note_tax_amount'][] - /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ - total: number - /** - * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. - * @enum {string} - */ - type: 'post_payment' | 'pre_payment' - /** - * Format: unix-time - * @description The time that the credit note was voided. - */ - voided_at?: number | null - } - /** CreditNoteLineItem */ - credit_note_line_item: { - /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ - amount: number - /** @description Description of the item being credited. */ - description?: string | null - /** @description The integer amount in %s representing the discount being credited for this line item. */ - discount_amount: number - /** @description The amount of discount calculated per discount for this line item */ - discount_amounts: components['schemas']['discounts_resource_discount_amount'][] - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice line item being credited */ - invoice_line_item?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'credit_note_line_item' - /** @description The number of units of product being credited. */ - quantity?: number | null - /** @description The amount of tax calculated per tax rate for this line item */ - tax_amounts: components['schemas']['credit_note_tax_amount'][] - /** @description The tax rates which apply to the line item. */ - tax_rates: components['schemas']['tax_rate'][] - /** - * @description The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. - * @enum {string} - */ - type: 'custom_line_item' | 'invoice_line_item' - /** @description The cost of each unit of product being credited. */ - unit_amount?: number | null - /** - * Format: decimal - * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - */ - unit_amount_decimal?: string | null - } - /** CreditNoteTaxAmount */ - credit_note_tax_amount: { - /** @description The amount, in %s, of the tax. */ - amount: number - /** @description Whether this tax amount is inclusive or exclusive. */ - inclusive: boolean - /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: string | components['schemas']['tax_rate'] - } - /** - * Customer - * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. - * - * Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment). - */ - customer: { - /** @description The customer's address. */ - address?: components['schemas']['address'] | null - /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ - balance?: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. */ - currency?: string | null - /** - * @description ID of the default payment source for the customer. - * - * If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. - */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null - /** - * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. - * - * If an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`. - */ - delinquent?: boolean | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Describes the current discount active on the customer, if there is one. */ - discount?: components['schemas']['discount'] | null - /** @description The customer's email address. */ - email?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description The prefix for the customer used to generate unique invoice numbers. */ - invoice_prefix?: string | null - invoice_settings?: components['schemas']['invoice_setting_customer_setting'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** @description The customer's full name or business name. */ - name?: string | null - /** @description The suffix of the customer's next invoice number, e.g., 0001. */ - next_invoice_sequence?: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer' - /** @description The customer's phone number. */ - phone?: string | null - /** @description The customer's preferred locales (languages), ordered by preference. */ - preferred_locales?: string[] | null - /** @description Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ - shipping?: components['schemas']['shipping'] | null - /** - * ApmsSourcesSourceList - * @description The customer's payment sources, if any. - */ - sources?: { - /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * SubscriptionList - * @description The customer's current subscriptions, if any. - */ - subscriptions?: { - /** @description Details about each object. */ - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - tax?: components['schemas']['customer_tax'] - /** - * @description Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**. - * @enum {string|null} - */ - tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** - * TaxIDsList - * @description The customer's tax IDs. - */ - tax_ids?: { - /** @description Details about each object. */ - data: components['schemas']['tax_id'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - /** customer_acceptance */ - customer_acceptance: { - /** - * Format: unix-time - * @description The time at which the customer accepted the Mandate. - */ - accepted_at?: number | null - offline?: components['schemas']['offline_acceptance'] - online?: components['schemas']['online_acceptance'] - /** - * @description The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - * @enum {string} - */ - type: 'offline' | 'online' - } - /** - * CustomerBalanceTransaction - * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, - * which denotes a debit or credit that's automatically applied to their next invoice upon finalization. - * You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), - * or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. - * - * Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. - */ - customer_balance_transaction: { - /** @description The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. */ - amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the credit note (if any) related to the transaction. */ - credit_note?: (string | components['schemas']['credit_note']) | null - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of the customer the transaction belongs to. */ - customer: string | components['schemas']['customer'] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. */ - ending_balance: number - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the invoice (if any) related to the transaction. */ - invoice?: (string | components['schemas']['invoice']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer_balance_transaction' - /** - * @description Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. - * @enum {string} - */ - type: - | 'adjustment' - | 'applied_to_invoice' - | 'credit_note' - | 'initial' - | 'invoice_too_large' - | 'invoice_too_small' - | 'migration' - | 'unapplied_from_invoice' - | 'unspent_receiver_credit' - } - /** CustomerTax */ - customer_tax: { - /** - * @description Surfaces if automatic tax computation is possible given the current customer location information. - * @enum {string} - */ - automatic_tax: 'failed' | 'not_collecting' | 'supported' | 'unrecognized_location' - /** @description A recent IP address of the customer used for tax reporting and tax location inference. */ - ip_address?: string | null - /** @description The customer's location as identified by Stripe Tax. */ - location?: components['schemas']['customer_tax_location'] | null - } - /** CustomerTaxLocation */ - customer_tax_location: { - /** @description The customer's country as identified by Stripe Tax. */ - country: string - /** - * @description The data source used to infer the customer's location. - * @enum {string} - */ - source: 'billing_address' | 'ip_address' | 'payment_method' | 'shipping_destination' - /** @description The customer's state, county, province, or region as identified by Stripe Tax. */ - state?: string | null - } - /** DeletedAccount */ - deleted_account: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'account' - } - /** AlipayDeletedAccount */ - deleted_alipay_account: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'apple_pay_domain' - } - /** DeletedBankAccount */ - deleted_bank_account: { - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency?: string | null - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bank_account' - } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } - /** DeletedCard */ - deleted_card: { - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ - currency?: string | null - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'card' - } - /** DeletedCoupon */ - deleted_coupon: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'coupon' - } - /** DeletedCustomer */ - deleted_customer: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'customer' - } - /** DeletedDiscount */ - deleted_discount: { - /** @description The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. */ - checkout_session?: string | null - coupon: components['schemas']['coupon'] - /** @description The ID of the customer associated with this discount. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. */ - id: string - /** @description The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ - invoice?: string | null - /** @description The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. */ - invoice_item?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'discount' - /** @description The promotion code applied to create this discount. */ - promotion_code?: (string | components['schemas']['promotion_code']) | null - /** - * Format: unix-time - * @description Date that the coupon was applied. - */ - start: number - /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ - subscription?: string | null - } - /** Polymorphic */ - deleted_external_account: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] - /** DeletedInvoice */ - deleted_invoice: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoice' - } - /** DeletedInvoiceItem */ - deleted_invoiceitem: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoiceitem' - } - /** Polymorphic */ - deleted_payment_source: - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] - /** DeletedPerson */ - deleted_person: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'person' - } - /** DeletedPlan */ - deleted_plan: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'plan' - } - /** DeletedPrice */ - deleted_price: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'price' - } - /** DeletedProduct */ - deleted_product: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'product' - } - /** RadarListDeletedList */ - 'deleted_radar.value_list': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list' - } - /** RadarListDeletedListItem */ - 'deleted_radar.value_list_item': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list_item' - } - /** DeletedTransferRecipient */ - deleted_recipient: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'recipient' - } - /** DeletedSku */ - deleted_sku: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'sku' - } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_item' - } - /** deleted_tax_id */ - deleted_tax_id: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_id' - } - /** TerminalLocationDeletedLocation */ - 'deleted_terminal.location': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.location' - } - /** TerminalReaderDeletedReader */ - 'deleted_terminal.reader': { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.reader' - } - /** NotificationWebhookEndpointDeleted */ - deleted_webhook_endpoint: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'webhook_endpoint' - } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } - /** - * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. - * - * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). - */ - discount: { - /** @description The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. */ - checkout_session?: string | null - coupon: components['schemas']['coupon'] - /** @description The ID of the customer associated with this discount. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** - * Format: unix-time - * @description If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. - */ - end?: number | null - /** @description The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. */ - id: string - /** @description The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. */ - invoice?: string | null - /** @description The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. */ - invoice_item?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'discount' - /** @description The promotion code applied to create this discount. */ - promotion_code?: (string | components['schemas']['promotion_code']) | null - /** - * Format: unix-time - * @description Date that the coupon was applied. - */ - start: number - /** @description The subscription that this coupon is applied to, if it is applied to a particular subscription. */ - subscription?: string | null - } - /** DiscountsResourceDiscountAmount */ - discounts_resource_discount_amount: { - /** @description The amount, in %s, of the discount. */ - amount: number - /** @description The discount that was applied to get this discount amount. */ - discount: string | components['schemas']['discount'] | components['schemas']['deleted_discount'] - } - /** - * Dispute - * @description A dispute occurs when a customer questions your charge with their card issuer. - * When this happens, you're given the opportunity to respond to the dispute with - * evidence that shows that the charge is legitimate. You can find more - * information about the dispute process in our [Disputes and - * Fraud](/docs/disputes) documentation. - * - * Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). - */ - dispute: { - /** @description Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). */ - amount: number - /** @description List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ - balance_transactions: components['schemas']['balance_transaction'][] - /** @description ID of the charge that was disputed. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - evidence: components['schemas']['dispute_evidence'] - evidence_details: components['schemas']['dispute_evidence_details'] - /** @description Unique identifier for the object. */ - id: string - /** @description If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. */ - is_charge_refundable: boolean - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'dispute' - /** @description ID of the PaymentIntent that was disputed. */ - payment_intent?: (string | components['schemas']['payment_intent']) | null - /** @description Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ - reason: string - /** - * @description Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. - * @enum {string} - */ - status: - | 'charge_refunded' - | 'lost' - | 'needs_response' - | 'under_review' - | 'warning_closed' - | 'warning_needs_response' - | 'warning_under_review' - | 'won' - } - /** DisputeEvidence */ - dispute_evidence: { - /** @description Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. */ - access_activity_log?: string | null - /** @description The billing address provided by the customer. */ - billing_address?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - cancellation_policy?: (string | components['schemas']['file']) | null - /** @description An explanation of how and when the customer was shown your refund policy prior to purchase. */ - cancellation_policy_disclosure?: string | null - /** @description A justification for why the customer's subscription was not canceled. */ - cancellation_rebuttal?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. */ - customer_communication?: (string | components['schemas']['file']) | null - /** @description The email address of the customer. */ - customer_email_address?: string | null - /** @description The name of the customer. */ - customer_name?: string | null - /** @description The IP address that the customer used when making the purchase. */ - customer_purchase_ip?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - customer_signature?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. */ - duplicate_charge_documentation?: (string | components['schemas']['file']) | null - /** @description An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ - duplicate_charge_explanation?: string | null - /** @description The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ - duplicate_charge_id?: string | null - /** @description A description of the product or service that was sold. */ - product_description?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. */ - receipt?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - refund_policy?: (string | components['schemas']['file']) | null - /** @description Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ - refund_policy_disclosure?: string | null - /** @description A justification for why the customer is not entitled to a refund. */ - refund_refusal_explanation?: string | null - /** @description The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ - service_date?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. */ - service_documentation?: (string | components['schemas']['file']) | null - /** @description The address to which a physical product was shipped. You should try to include as complete address information as possible. */ - shipping_address?: string | null - /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. */ - shipping_carrier?: string | null - /** @description The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ - shipping_date?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. */ - shipping_documentation?: (string | components['schemas']['file']) | null - /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ - shipping_tracking_number?: string | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - uncategorized_file?: (string | components['schemas']['file']) | null - /** @description Any additional evidence or statements. */ - uncategorized_text?: string | null - } - /** DisputeEvidenceDetails */ - dispute_evidence_details: { - /** - * Format: unix-time - * @description Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute. - */ - due_by?: number | null - /** @description Whether evidence has been staged for this dispute. */ - has_evidence: boolean - /** @description Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. */ - past_due: boolean - /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ - submission_count: number - } - /** EphemeralKey */ - ephemeral_key: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * Format: unix-time - * @description Time at which the key will expire. Measured in seconds since the Unix epoch. - */ - expires: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'ephemeral_key' - /** @description The key's secret. You can use this value to make authorized requests to the Stripe API. */ - secret?: string - } - /** @description An error response from the Stripe API */ - error: { - error: components['schemas']['api_errors'] - } - /** - * NotificationEvent - * @description Events are our way of letting you know when something interesting happens in - * your account. When an interesting event occurs, we create a new `Event` - * object. For example, when a charge succeeds, we create a `charge.succeeded` - * event; and when an invoice payment attempt fails, we create an - * `invoice.payment_failed` event. Note that many API requests may cause multiple - * events to be created. For example, if you create a new subscription for a - * customer, you will receive both a `customer.subscription.created` event and a - * `charge.succeeded` event. - * - * Events occur when the state of another API resource changes. The state of that - * resource at the time of the change is embedded in the event's data field. For - * example, a `charge.succeeded` event will contain a charge, and an - * `invoice.payment_failed` event will contain an invoice. - * - * As with other API resources, you can use endpoints to retrieve an - * [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) - * from the API. We also have a separate - * [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the - * `Event` objects directly to an endpoint on your server. Webhooks are managed - * in your - * [account settings](https://dashboard.stripe.com/account/webhooks), - * and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up. - * - * When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of - * events that occur in connected accounts. For these events, there will be an - * additional `account` attribute in the received `Event` object. - * - * **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is - * guaranteed only for 30 days. - */ - event: { - /** @description The connected account that originated the event. */ - account?: string - /** @description The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*. */ - api_version?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - data: components['schemas']['notification_event_data'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'event' - /** @description Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ - pending_webhooks: number - /** @description Information on the API request that instigated the event. */ - request?: components['schemas']['notification_event_request'] | null - /** @description Description of the event (e.g., `invoice.created` or `charge.refunded`). */ - type: string - } - /** - * ExchangeRate - * @description `Exchange Rate` objects allow you to determine the rates that Stripe is - * currently using to convert from one currency to another. Since this number is - * variable throughout the day, there are various reasons why you might want to - * know the current rate (for example, to dynamically price an item for a user - * with a default payment in a foreign currency). - * - * If you want a guarantee that the charge is made with a certain exchange rate - * you expect is current, you can pass in `exchange_rate` to charges endpoints. - * If the value is no longer up to date, the charge won't go through. Please - * refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more - * details. - */ - exchange_rate: { - /** @description Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'exchange_rate' - /** @description Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. */ - rates: { [key: string]: number } - } - /** Polymorphic */ - external_account: components['schemas']['bank_account'] | components['schemas']['card'] - /** Fee */ - fee: { - /** @description Amount of the fee, in cents. */ - amount: number - /** @description ID of the Connect application that earned the fee. */ - application?: string | null - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ - type: string - } - /** - * FeeRefund - * @description `Application Fee Refund` objects allow you to refund an application fee that - * has previously been created but not yet refunded. Funds will be refunded to - * the Stripe account from which the fee was originally collected. - * - * Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). - */ - fee_refund: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description ID of the application fee that was refunded. */ - fee: string | components['schemas']['application_fee'] - /** @description Unique identifier for the object. */ - id: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'fee_refund' - } - /** - * File - * @description This is an object representing a file hosted on Stripe's servers. The - * file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) - * request (for example, when uploading dispute evidence) or it may have - * been created by Stripe (for example, the results of a [Sigma scheduled - * query](#scheduled_queries)). - * - * Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). - */ - file: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * Format: unix-time - * @description The time at which the file expires and is no longer available in epoch seconds. - */ - expires_at?: number | null - /** @description A filename for the file, suitable for saving to a filesystem. */ - filename?: string | null - /** @description Unique identifier for the object. */ - id: string - /** - * FileFileLinkList - * @description A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. - */ - links?: { - /** @description Details about each object. */ - data: components['schemas']['file_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'file' - /** - * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. - * @enum {string} - */ - purpose: - | 'account_requirement' - | 'additional_verification' - | 'business_icon' - | 'business_logo' - | 'customer_signature' - | 'dispute_evidence' - | 'document_provider_identity_document' - | 'finance_report_run' - | 'identity_document' - | 'identity_document_downloadable' - | 'pci_document' - | 'selfie' - | 'sigma_scheduled_query' - | 'tax_document_user_upload' - /** @description The size in bytes of the file object. */ - size: number - /** @description A user friendly title for the document. */ - title?: string | null - /** @description The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). */ - type?: string | null - /** @description The URL from which the file can be downloaded using your live secret API key. */ - url?: string | null - } - /** - * FileLink - * @description To share the contents of a `File` object with non-Stripe users, you can - * create a `FileLink`. `FileLink`s contain a URL that can be used to - * retrieve the contents of the file without authentication. - */ - file_link: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Whether this link is already expired. */ - expired: boolean - /** - * Format: unix-time - * @description Time at which the link expires. - */ - expires_at?: number | null - /** @description The file object this link points to. */ - file: string | components['schemas']['file'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'file_link' - /** @description The publicly accessible URL to download the file. */ - url?: string | null - } - /** FinancialReportingFinanceReportRunRunParameters */ - financial_reporting_finance_report_run_run_parameters: { - /** @description The set of output columns requested for inclusion in the report run. */ - columns?: string[] - /** @description Connected account ID by which to filter the report run. */ - connected_account?: string - /** @description Currency of objects to be included in the report run. */ - currency?: string - /** - * Format: unix-time - * @description Ending timestamp of data to be included in the report run (exclusive). - */ - interval_end?: number - /** - * Format: unix-time - * @description Starting timestamp of data to be included in the report run. - */ - interval_start?: number - /** @description Payout ID by which to filter the report run. */ - payout?: string - /** @description Category of balance transactions to be included in the report run. */ - reporting_category?: string - /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ - timezone?: string - } - /** - * GelatoDataDocumentReportDateOfBirth - * @description Point in Time - */ - gelato_data_document_report_date_of_birth: { - /** @description Numerical day between 1 and 31. */ - day?: number | null - /** @description Numerical month between 1 and 12. */ - month?: number | null - /** @description The four-digit year. */ - year?: number | null - } - /** - * GelatoDataDocumentReportExpirationDate - * @description Point in Time - */ - gelato_data_document_report_expiration_date: { - /** @description Numerical day between 1 and 31. */ - day?: number | null - /** @description Numerical month between 1 and 12. */ - month?: number | null - /** @description The four-digit year. */ - year?: number | null - } - /** - * GelatoDataDocumentReportIssuedDate - * @description Point in Time - */ - gelato_data_document_report_issued_date: { - /** @description Numerical day between 1 and 31. */ - day?: number | null - /** @description Numerical month between 1 and 12. */ - month?: number | null - /** @description The four-digit year. */ - year?: number | null - } - /** - * GelatoDataIdNumberReportDate - * @description Point in Time - */ - gelato_data_id_number_report_date: { - /** @description Numerical day between 1 and 31. */ - day?: number | null - /** @description Numerical month between 1 and 12. */ - month?: number | null - /** @description The four-digit year. */ - year?: number | null - } - /** - * GelatoDataVerifiedOutputsDate - * @description Point in Time - */ - gelato_data_verified_outputs_date: { - /** @description Numerical day between 1 and 31. */ - day?: number | null - /** @description Numerical month between 1 and 12. */ - month?: number | null - /** @description The four-digit year. */ - year?: number | null - } - /** - * GelatoDocumentReport - * @description Result from a document check - */ - gelato_document_report: { - /** @description Address as it appears in the document. */ - address?: components['schemas']['address'] | null - /** @description Date of birth as it appears in the document. */ - dob?: components['schemas']['gelato_data_document_report_date_of_birth'] | null - /** @description Details on the verification error. Present when status is `unverified`. */ - error?: components['schemas']['gelato_document_report_error'] | null - /** @description Expiration date of the document. */ - expiration_date?: components['schemas']['gelato_data_document_report_expiration_date'] | null - /** @description Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. */ - files?: string[] | null - /** @description First name as it appears in the document. */ - first_name?: string | null - /** @description Issued date of the document. */ - issued_date?: components['schemas']['gelato_data_document_report_issued_date'] | null - /** @description Issuing country of the document. */ - issuing_country?: string | null - /** @description Last name as it appears in the document. */ - last_name?: string | null - /** @description Document ID number. */ - number?: string | null - /** - * @description Status of this `document` check. - * @enum {string} - */ - status: 'unverified' | 'verified' - /** - * @description Type of the document. - * @enum {string|null} - */ - type?: ('driving_license' | 'id_card' | 'passport') | null - } - /** GelatoDocumentReportError */ - gelato_document_report_error: { - /** - * @description A short machine-readable string giving the reason for the verification failure. - * @enum {string|null} - */ - code?: ('document_expired' | 'document_type_not_supported' | 'document_unverified_other') | null - /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ - reason?: string | null - } - /** - * GelatoIdNumberReport - * @description Result from an id_number check - */ - gelato_id_number_report: { - /** @description Date of birth. */ - dob?: components['schemas']['gelato_data_id_number_report_date'] | null - /** @description Details on the verification error. Present when status is `unverified`. */ - error?: components['schemas']['gelato_id_number_report_error'] | null - /** @description First name. */ - first_name?: string | null - /** @description ID number. */ - id_number?: string | null - /** - * @description Type of ID number. - * @enum {string|null} - */ - id_number_type?: ('br_cpf' | 'sg_nric' | 'us_ssn') | null - /** @description Last name. */ - last_name?: string | null - /** - * @description Status of this `id_number` check. - * @enum {string} - */ - status: 'unverified' | 'verified' - } - /** GelatoIdNumberReportError */ - gelato_id_number_report_error: { - /** - * @description A short machine-readable string giving the reason for the verification failure. - * @enum {string|null} - */ - code?: ('id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other') | null - /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ - reason?: string | null - } - /** GelatoReportDocumentOptions */ - gelato_report_document_options: { - /** @description Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. */ - allowed_types?: ('driving_license' | 'id_card' | 'passport')[] - /** @description Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. */ - require_id_number?: boolean - /** @description Disable image uploads, identity document images have to be captured using the device’s camera. */ - require_live_capture?: boolean - /** @description Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). */ - require_matching_selfie?: boolean - } - /** GelatoReportIdNumberOptions */ - gelato_report_id_number_options: { [key: string]: unknown } - /** - * GelatoSelfieReport - * @description Result from a selfie check - */ - gelato_selfie_report: { - /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. */ - document?: string | null - /** @description Details on the verification error. Present when status is `unverified`. */ - error?: components['schemas']['gelato_selfie_report_error'] | null - /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. */ - selfie?: string | null - /** - * @description Status of this `selfie` check. - * @enum {string} - */ - status: 'unverified' | 'verified' - } - /** GelatoSelfieReportError */ - gelato_selfie_report_error: { - /** - * @description A short machine-readable string giving the reason for the verification failure. - * @enum {string|null} - */ - code?: ('selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other') | null - /** @description A human-readable message giving the reason for the failure. These messages can be shown to your users. */ - reason?: string | null - } - /** GelatoSessionDocumentOptions */ - gelato_session_document_options: { - /** @description Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. */ - allowed_types?: ('driving_license' | 'id_card' | 'passport')[] - /** @description Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. */ - require_id_number?: boolean - /** @description Disable image uploads, identity document images have to be captured using the device’s camera. */ - require_live_capture?: boolean - /** @description Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). */ - require_matching_selfie?: boolean - } - /** GelatoSessionIdNumberOptions */ - gelato_session_id_number_options: { [key: string]: unknown } - /** - * GelatoSessionLastError - * @description Shows last VerificationSession error - */ - gelato_session_last_error: { - /** - * @description A short machine-readable string giving the reason for the verification or user-session failure. - * @enum {string|null} - */ - code?: - | ( - | 'abandoned' - | 'consent_declined' - | 'country_not_supported' - | 'device_not_supported' - | 'document_expired' - | 'document_type_not_supported' - | 'document_unverified_other' - | 'id_number_insufficient_document_data' - | 'id_number_mismatch' - | 'id_number_unverified_other' - | 'selfie_document_missing_photo' - | 'selfie_face_mismatch' - | 'selfie_manipulated' - | 'selfie_unverified_other' - | 'under_supported_age' - ) - | null - /** @description A message that explains the reason for verification or user-session failure. */ - reason?: string | null - } - /** GelatoVerificationReportOptions */ - gelato_verification_report_options: { - document?: components['schemas']['gelato_report_document_options'] - id_number?: components['schemas']['gelato_report_id_number_options'] - } - /** GelatoVerificationSessionOptions */ - gelato_verification_session_options: { - document?: components['schemas']['gelato_session_document_options'] - id_number?: components['schemas']['gelato_session_id_number_options'] - } - /** GelatoVerifiedOutputs */ - gelato_verified_outputs: { - /** @description The user's verified address. */ - address?: components['schemas']['address'] | null - /** @description The user’s verified date of birth. */ - dob?: components['schemas']['gelato_data_verified_outputs_date'] | null - /** @description The user's verified first name. */ - first_name?: string | null - /** @description The user's verified id number. */ - id_number?: string | null - /** - * @description The user's verified id number type. - * @enum {string|null} - */ - id_number_type?: ('br_cpf' | 'sg_nric' | 'us_ssn') | null - /** @description The user's verified last name. */ - last_name?: string | null - } - /** - * GelatoVerificationReport - * @description A VerificationReport is the result of an attempt to collect and verify data from a user. - * The collection of verification checks performed is determined from the `type` and `options` - * parameters used. You can find the result of each verification check performed in the - * appropriate sub-resource: `document`, `id_number`, `selfie`. - * - * Each VerificationReport contains a copy of any data collected by the user as well as - * reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) - * API. To configure and create VerificationReports, use the - * [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. - * - * Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). - */ - 'identity.verification_report': { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - document?: components['schemas']['gelato_document_report'] - /** @description Unique identifier for the object. */ - id: string - id_number?: components['schemas']['gelato_id_number_report'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'identity.verification_report' - options: components['schemas']['gelato_verification_report_options'] - selfie?: components['schemas']['gelato_selfie_report'] - /** - * @description Type of report. - * @enum {string} - */ - type: 'document' | 'id_number' - /** @description ID of the VerificationSession that created this report. */ - verification_session?: string | null - } - /** - * GelatoVerificationSession - * @description A VerificationSession guides you through the process of collecting and verifying the identities - * of your users. It contains details about the type of verification, such as what [verification - * check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for - * each verification in your system. - * - * A VerificationSession transitions through [multiple - * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after - * verification checks are complete. - * - * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) - */ - 'identity.verification_session': { - /** @description The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. */ - client_secret?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description If present, this property tells you the last error encountered when processing the verification. */ - last_error?: components['schemas']['gelato_session_last_error'] | null - /** @description ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) */ - last_verification_report?: (string | components['schemas']['identity.verification_report']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'identity.verification_session' - options: components['schemas']['gelato_verification_session_options'] - /** @description Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. */ - redaction?: components['schemas']['verification_session_redaction'] | null - /** - * @description Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - * @enum {string} - */ - status: 'canceled' | 'processing' | 'requires_input' | 'verified' - /** - * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - * @enum {string} - */ - type: 'document' | 'id_number' - /** @description The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. */ - url?: string | null - /** @description The user’s verified data. */ - verified_outputs?: components['schemas']['gelato_verified_outputs'] | null - } - /** - * Invoice - * @description Invoices are statements of amounts owed by a customer, and are either - * generated one-off, or generated periodically from a subscription. - * - * They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments - * that may be caused by subscription upgrades/downgrades (if necessary). - * - * If your invoice is configured to be billed through automatic charges, - * Stripe automatically finalizes your invoice and attempts payment. Note - * that finalizing the invoice, - * [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does - * not happen immediately as the invoice is created. Stripe waits - * until one hour after the last webhook was successfully sent (or the last - * webhook timed out after failing). If you (and the platforms you may have - * connected to) have no webhooks configured, Stripe waits one hour after - * creation to finalize the invoice. - * - * If your invoice is configured to be billed by sending an email, then based on your - * [email settings](https://dashboard.stripe.com/account/billing/automatic), - * Stripe will email the invoice to your customer and await payment. These - * emails can contain a link to a hosted page to pay the invoice. - * - * Stripe applies any customer credit on the account before determining the - * amount due for the invoice (i.e., the amount that will be actually - * charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge - * per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the - * invoice is automatically marked paid, and we add the amount due to the - * customer's credit balance which is applied to the next invoice. - * - * More details on the customer's credit balance are - * [here](https://stripe.com/docs/billing/customer/balance). - * - * Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending). - */ - invoice: { - /** @description The country of the business associated with this invoice, most often the business creating the invoice. */ - account_country?: string | null - /** @description The public name of the business associated with this invoice, most often the business creating the invoice. */ - account_name?: string | null - /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: (string | components['schemas']['tax_id'] | components['schemas']['deleted_tax_id'])[] | null - /** @description Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. */ - amount_due: number - /** @description The amount, in %s, that was paid. */ - amount_paid: number - /** @description The amount remaining, in %s, that is due. */ - amount_remaining: number - /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ - application_fee_amount?: number | null - /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ - attempt_count: number - /** @description Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. */ - attempted: boolean - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - automatic_tax: components['schemas']['automatic_tax'] - /** - * @description Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached. - * @enum {string|null} - */ - billing_reason?: - | ( - | 'automatic_pending_invoice_item_invoice' - | 'manual' - | 'quote_accept' - | 'subscription' - | 'subscription_create' - | 'subscription_cycle' - | 'subscription_threshold' - | 'subscription_update' - | 'upcoming' - ) - | null - /** @description ID of the latest charge generated for this invoice, if any. */ - charge?: (string | components['schemas']['charge']) | null - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. - * @enum {string} - */ - collection_method: 'charge_automatically' | 'send_invoice' - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Custom fields displayed on the invoice. */ - custom_fields?: components['schemas']['invoice_setting_custom_field'][] | null - /** @description The ID of the customer who will be billed. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. */ - customer_address?: components['schemas']['address'] | null - /** @description The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. */ - customer_email?: string | null - /** @description The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. */ - customer_name?: string | null - /** @description The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. */ - customer_phone?: string | null - /** @description The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. */ - customer_shipping?: components['schemas']['shipping'] | null - /** - * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. - * @enum {string|null} - */ - customer_tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. */ - customer_tax_ids?: components['schemas']['invoices_resource_invoice_tax_id'][] | null - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: (string | components['schemas']['payment_method']) | null - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null - /** @description The tax rates applied to this invoice, if any. */ - default_tax_rates: components['schemas']['tax_rate'][] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string | null - /** @description Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. */ - discount?: components['schemas']['discount'] | null - /** @description The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ - discounts?: (string | components['schemas']['discount'] | components['schemas']['deleted_discount'])[] | null - /** - * Format: unix-time - * @description The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. - */ - due_date?: number | null - /** @description Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. */ - ending_balance?: number | null - /** @description Footer displayed on the invoice. */ - footer?: string | null - /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ - hosted_invoice_url?: string | null - /** @description Unique identifier for the object. */ - id?: string - /** @description The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ - invoice_pdf?: string | null - /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ - last_finalization_error?: components['schemas']['api_errors'] | null - /** - * InvoiceLinesList - * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. - */ - lines: { - /** @description Details about each object. */ - data: components['schemas']['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * Format: unix-time - * @description The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. - */ - next_payment_attempt?: number | null - /** @description A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. */ - number?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoice' - /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ - paid: boolean - /** @description Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. */ - paid_out_of_band: boolean - /** @description The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ - payment_intent?: (string | components['schemas']['payment_intent']) | null - payment_settings: components['schemas']['invoices_payment_settings'] - /** - * Format: unix-time - * @description End of the usage period during which invoice items were added to this invoice. - */ - period_end: number - /** - * Format: unix-time - * @description Start of the usage period during which invoice items were added to this invoice. - */ - period_start: number - /** @description Total amount of all post-payment credit notes issued for this invoice. */ - post_payment_credit_notes_amount: number - /** @description Total amount of all pre-payment credit notes issued for this invoice. */ - pre_payment_credit_notes_amount: number - /** @description The quote this invoice was generated from. */ - quote?: (string | components['schemas']['quote']) | null - /** @description This is the transaction number that appears on email receipts sent for this invoice. */ - receipt_number?: string | null - /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ - starting_balance: number - /** @description Extra information about an invoice for the customer's credit card statement. */ - statement_descriptor?: string | null - /** - * @description The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) - * @enum {string|null} - */ - status?: ('deleted' | 'draft' | 'open' | 'paid' | 'uncollectible' | 'void') | null - status_transitions: components['schemas']['invoices_status_transitions'] - /** @description The subscription that this invoice was prepared for, if any. */ - subscription?: (string | components['schemas']['subscription']) | null - /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ - subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ - subtotal: number - /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ - tax?: number | null - threshold_reason?: components['schemas']['invoice_threshold_reason'] - /** @description Total after discounts and taxes. */ - total: number - /** @description The aggregate amounts calculated per discount across all line items. */ - total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null - /** @description The aggregate amounts calculated per tax rate for all line items. */ - total_tax_amounts: components['schemas']['invoice_tax_amount'][] - /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ - transfer_data?: components['schemas']['invoice_transfer_data'] | null - /** - * Format: unix-time - * @description Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. - */ - webhooks_delivered_at?: number | null - } - /** InvoiceItemThresholdReason */ - invoice_item_threshold_reason: { - /** @description The IDs of the line items that triggered the threshold invoice. */ - line_item_ids: string[] - /** @description The quantity threshold boundary that applied to the given line item. */ - usage_gte: number - } - /** InvoiceLineItemPeriod */ - invoice_line_item_period: { - /** - * Format: unix-time - * @description End of the line item's billing period - */ - end: number - /** - * Format: unix-time - * @description Start of the line item's billing period - */ - start: number - } - /** invoice_mandate_options_card */ - invoice_mandate_options_card: { - /** @description Amount to be charged for future payments. */ - amount?: number | null - /** - * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - * @enum {string|null} - */ - amount_type?: ('fixed' | 'maximum') | null - /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ - description?: string | null - } - /** invoice_payment_method_options_acss_debit */ - invoice_payment_method_options_acss_debit: { - mandate_options?: components['schemas']['invoice_payment_method_options_acss_debit_mandate_options'] - /** - * @description Bank account verification method. - * @enum {string} - */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** invoice_payment_method_options_acss_debit_mandate_options */ - invoice_payment_method_options_acss_debit_mandate_options: { - /** - * @description Transaction type of the mandate. - * @enum {string|null} - */ - transaction_type?: ('business' | 'personal') | null - } - /** invoice_payment_method_options_bancontact */ - invoice_payment_method_options_bancontact: { - /** - * @description Preferred language of the Bancontact authorization page that the customer is redirected to. - * @enum {string} - */ - preferred_language: 'de' | 'en' | 'fr' | 'nl' - } - /** invoice_payment_method_options_card */ - invoice_payment_method_options_card: { - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string|null} - */ - request_three_d_secure?: ('any' | 'automatic') | null - } - /** InvoiceSettingCustomField */ - invoice_setting_custom_field: { - /** @description The name of the custom field. */ - name: string - /** @description The value of the custom field. */ - value: string - } - /** InvoiceSettingCustomerSetting */ - invoice_setting_customer_setting: { - /** @description Default custom fields to be displayed on invoices for this customer. */ - custom_fields?: components['schemas']['invoice_setting_custom_field'][] | null - /** @description ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. */ - default_payment_method?: (string | components['schemas']['payment_method']) | null - /** @description Default footer to be displayed on invoices for this customer. */ - footer?: string | null - } - /** InvoiceSettingQuoteSetting */ - invoice_setting_quote_setting: { - /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ - days_until_due?: number | null - } - /** InvoiceSettingSubscriptionScheduleSetting */ - invoice_setting_subscription_schedule_setting: { - /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ - days_until_due?: number | null - } - /** InvoiceTaxAmount */ - invoice_tax_amount: { - /** @description The amount, in %s, of the tax. */ - amount: number - /** @description Whether this tax amount is inclusive or exclusive. */ - inclusive: boolean - /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: string | components['schemas']['tax_rate'] - } - /** InvoiceThresholdReason */ - invoice_threshold_reason: { - /** @description The total invoice amount threshold boundary if it triggered the threshold invoice. */ - amount_gte?: number | null - /** @description Indicates which line items triggered a threshold invoice. */ - item_reasons: components['schemas']['invoice_item_threshold_reason'][] - } - /** InvoiceTransferData */ - invoice_transfer_data: { - /** @description The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. */ - amount?: number | null - /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: string | components['schemas']['account'] - } - /** - * InvoiceItem - * @description Sometimes you want to add a charge or credit to a customer, but actually - * charge or credit the customer's card only at the end of a regular billing - * cycle. This is useful for combining several charges (to minimize - * per-transaction fees), or for having Stripe tabulate your usage-based billing - * totals. - * - * Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). - */ - invoiceitem: { - /** @description Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - date: number - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description If true, discounts will apply to this invoice item. Always false for prorations. */ - discountable: boolean - /** @description The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ - discounts?: (string | components['schemas']['discount'])[] | null - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the invoice this invoice item belongs to. */ - invoice?: (string | components['schemas']['invoice']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'invoiceitem' - period: components['schemas']['invoice_line_item_period'] - /** @description The price of the invoice item. */ - price?: components['schemas']['price'] | null - /** @description Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ - proration: boolean - /** @description Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ - quantity: number - /** @description The subscription that this invoice item has been created for, if any. */ - subscription?: (string | components['schemas']['subscription']) | null - /** @description The subscription item that this invoice item has been created for, if any. */ - subscription_item?: string - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ - tax_rates?: components['schemas']['tax_rate'][] | null - /** @description Unit amount (in the `currency` specified) of the invoice item. */ - unit_amount?: number | null - /** - * Format: decimal - * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - */ - unit_amount_decimal?: string | null - } - /** InvoicesPaymentMethodOptions */ - invoices_payment_method_options: { - /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ - acss_debit?: components['schemas']['invoice_payment_method_options_acss_debit'] | null - /** @description If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. */ - bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null - /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ - card?: components['schemas']['invoice_payment_method_options_card'] | null - } - /** InvoicesPaymentSettings */ - invoices_payment_settings: { - /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ - payment_method_options?: components['schemas']['invoices_payment_method_options'] | null - /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | null - } - /** InvoicesResourceInvoiceTaxID */ - invoices_resource_invoice_tax_id: { - /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` - * @enum {string} - */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'unknown' - | 'us_ein' - | 'za_vat' - /** @description The value of the tax ID. */ - value?: string | null - } - /** InvoicesStatusTransitions */ - invoices_status_transitions: { - /** - * Format: unix-time - * @description The time that the invoice draft was finalized. - */ - finalized_at?: number | null - /** - * Format: unix-time - * @description The time that the invoice was marked uncollectible. - */ - marked_uncollectible_at?: number | null - /** - * Format: unix-time - * @description The time that the invoice was paid. - */ - paid_at?: number | null - /** - * Format: unix-time - * @description The time that the invoice was voided. - */ - voided_at?: number | null - } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } - /** IssuingAuthorizationAmountDetails */ - issuing_authorization_amount_details: { - /** @description The fee charged by the ATM for the cash withdrawal. */ - atm_fee?: number | null - } - /** IssuingAuthorizationMerchantData */ - issuing_authorization_merchant_data: { - /** @description A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. */ - category: string - /** @description The merchant category code for the seller’s business */ - category_code: string - /** @description City where the seller is located */ - city?: string | null - /** @description Country where the seller is located */ - country?: string | null - /** @description Name of the seller */ - name?: string | null - /** @description Identifier assigned to the seller by the card brand */ - network_id: string - /** @description Postal code where the seller is located */ - postal_code?: string | null - /** @description State where the seller is located */ - state?: string | null - } - /** IssuingAuthorizationPendingRequest */ - issuing_authorization_pending_request: { - /** @description The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: components['schemas']['issuing_authorization_amount_details'] | null - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. */ - is_amount_controllable: boolean - /** @description The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The local currency the merchant is requesting to authorize. */ - merchant_currency: string - } - /** IssuingAuthorizationRequest */ - issuing_authorization_request: { - /** @description The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. */ - amount: number - /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: components['schemas']['issuing_authorization_amount_details'] | null - /** @description Whether this request was approved. */ - approved: boolean - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - merchant_currency: string - /** - * @description The reason for the approval or decline. - * @enum {string} - */ - reason: - | 'account_disabled' - | 'card_active' - | 'card_inactive' - | 'cardholder_inactive' - | 'cardholder_verification_required' - | 'insufficient_funds' - | 'not_allowed' - | 'spending_controls' - | 'suspected_fraud' - | 'verification_failed' - | 'webhook_approved' - | 'webhook_declined' - | 'webhook_timeout' - } - /** IssuingAuthorizationVerificationData */ - issuing_authorization_verification_data: { - /** - * @description Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. - * @enum {string} - */ - address_line1_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. - * @enum {string} - */ - address_postal_code_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided a CVC and if it matched Stripe’s record. - * @enum {string} - */ - cvc_check: 'match' | 'mismatch' | 'not_provided' - /** - * @description Whether the cardholder provided an expiry date and if it matched Stripe’s record. - * @enum {string} - */ - expiry_check: 'match' | 'mismatch' | 'not_provided' - } - /** IssuingCardApplePay */ - issuing_card_apple_pay: { - /** @description Apple Pay Eligibility */ - eligible: boolean - /** - * @description Reason the card is ineligible for Apple Pay - * @enum {string|null} - */ - ineligible_reason?: ('missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region') | null - } - /** IssuingCardAuthorizationControls */ - issuing_card_authorization_controls: { - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. */ - allowed_categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. */ - blocked_categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** @description Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). */ - spending_limits?: components['schemas']['issuing_card_spending_limit'][] | null - /** @description Currency of the amounts within `spending_limits`. Always the same as the currency of the card. */ - spending_limits_currency?: string | null - } - /** IssuingCardGooglePay */ - issuing_card_google_pay: { - /** @description Google Pay Eligibility */ - eligible: boolean - /** - * @description Reason the card is ineligible for Google Pay - * @enum {string|null} - */ - ineligible_reason?: ('missing_agreement' | 'missing_cardholder_contact' | 'unsupported_region') | null - } - /** IssuingCardShipping */ - issuing_card_shipping: { - address: components['schemas']['address'] - /** - * @description The delivery company that shipped a card. - * @enum {string|null} - */ - carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null - /** - * Format: unix-time - * @description A unix timestamp representing a best estimate of when the card will be delivered. - */ - eta?: number | null - /** @description Recipient name. */ - name: string - /** - * @description Shipment service, such as `standard` or `express`. - * @enum {string} - */ - service: 'express' | 'priority' | 'standard' - /** - * @description The delivery status of the card. - * @enum {string|null} - */ - status?: ('canceled' | 'delivered' | 'failure' | 'pending' | 'returned' | 'shipped') | null - /** @description A tracking number for a card shipment. */ - tracking_number?: string | null - /** @description A link to the shipping carrier's site where you can view detailed information about a card shipment. */ - tracking_url?: string | null - /** - * @description Packaging options. - * @enum {string} - */ - type: 'bulk' | 'individual' - } - /** IssuingCardSpendingLimit */ - issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ - amount: number - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ - categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** - * @description Interval (or event) to which the amount applies. - * @enum {string} - */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - } - /** IssuingCardWallets */ - issuing_card_wallets: { - apple_pay: components['schemas']['issuing_card_apple_pay'] - google_pay: components['schemas']['issuing_card_google_pay'] - /** @description Unique identifier for a card used with digital wallets */ - primary_account_identifier?: string | null - } - /** IssuingCardholderAddress */ - issuing_cardholder_address: { - address: components['schemas']['address'] - } - /** IssuingCardholderAuthorizationControls */ - issuing_cardholder_authorization_controls: { - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. */ - allowed_categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. */ - blocked_categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** @description Limit spending with amount-based rules that apply across this cardholder's cards. */ - spending_limits?: components['schemas']['issuing_cardholder_spending_limit'][] | null - /** @description Currency of the amounts within `spending_limits`. */ - spending_limits_currency?: string | null - } - /** IssuingCardholderCompany */ - issuing_cardholder_company: { - /** @description Whether the company's business ID number was provided. */ - tax_id_provided: boolean - } - /** IssuingCardholderIdDocument */ - issuing_cardholder_id_document: { - /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: (string | components['schemas']['file']) | null - /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: (string | components['schemas']['file']) | null - } - /** IssuingCardholderIndividual */ - issuing_cardholder_individual: { - /** @description The date of birth of this cardholder. */ - dob?: components['schemas']['issuing_cardholder_individual_dob'] | null - /** @description The first name of this cardholder. */ - first_name: string - /** @description The last name of this cardholder. */ - last_name: string - /** @description Government-issued ID document for this cardholder. */ - verification?: components['schemas']['issuing_cardholder_verification'] | null - } - /** IssuingCardholderIndividualDOB */ - issuing_cardholder_individual_dob: { - /** @description The day of birth, between 1 and 31. */ - day?: number | null - /** @description The month of birth, between 1 and 12. */ - month?: number | null - /** @description The four-digit year of birth. */ - year?: number | null - } - /** IssuingCardholderRequirements */ - issuing_cardholder_requirements: { - /** - * @description If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. - * @enum {string|null} - */ - disabled_reason?: ('listed' | 'rejected.listed' | 'under_review') | null - /** @description Array of fields that need to be collected in order to verify and re-enable the cardholder. */ - past_due?: - | ( - | 'company.tax_id' - | 'individual.dob.day' - | 'individual.dob.month' - | 'individual.dob.year' - | 'individual.first_name' - | 'individual.last_name' - | 'individual.verification.document' - )[] - | null - } - /** IssuingCardholderSpendingLimit */ - issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ - amount: number - /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ - categories?: - | ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - | null - /** - * @description Interval (or event) to which the amount applies. - * @enum {string} - */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - } - /** IssuingCardholderVerification */ - issuing_cardholder_verification: { - /** @description An identifying document, either a passport or local ID card. */ - document?: components['schemas']['issuing_cardholder_id_document'] | null - } - /** IssuingDisputeCanceledEvidence */ - issuing_dispute_canceled_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** - * Format: unix-time - * @description Date when order was canceled. - */ - canceled_at?: number | null - /** @description Whether the cardholder was provided with a cancellation policy. */ - cancellation_policy_provided?: boolean | null - /** @description Reason for canceling the order. */ - cancellation_reason?: string | null - /** - * Format: unix-time - * @description Date when the cardholder expected to receive the product. - */ - expected_at?: number | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** @description Description of the merchandise or service that was purchased. */ - product_description?: string | null - /** - * @description Whether the product was a merchandise or service. - * @enum {string|null} - */ - product_type?: ('merchandise' | 'service') | null - /** - * @description Result of cardholder's attempt to return the product. - * @enum {string|null} - */ - return_status?: ('merchant_rejected' | 'successful') | null - /** - * Format: unix-time - * @description Date when the product was returned or attempted to be returned. - */ - returned_at?: number | null - } - /** IssuingDisputeDuplicateEvidence */ - issuing_dispute_duplicate_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. */ - card_statement?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. */ - cash_receipt?: (string | components['schemas']['file']) | null - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. */ - check_image?: (string | components['schemas']['file']) | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** @description Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. */ - original_transaction?: string | null - } - /** IssuingDisputeEvidence */ - issuing_dispute_evidence: { - canceled?: components['schemas']['issuing_dispute_canceled_evidence'] - duplicate?: components['schemas']['issuing_dispute_duplicate_evidence'] - fraudulent?: components['schemas']['issuing_dispute_fraudulent_evidence'] - merchandise_not_as_described?: components['schemas']['issuing_dispute_merchandise_not_as_described_evidence'] - not_received?: components['schemas']['issuing_dispute_not_received_evidence'] - other?: components['schemas']['issuing_dispute_other_evidence'] - /** - * @description The reason for filing the dispute. Its value will match the field containing the evidence. - * @enum {string} - */ - reason: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' - service_not_as_described?: components['schemas']['issuing_dispute_service_not_as_described_evidence'] - } - /** IssuingDisputeFraudulentEvidence */ - issuing_dispute_fraudulent_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - } - /** IssuingDisputeMerchandiseNotAsDescribedEvidence */ - issuing_dispute_merchandise_not_as_described_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** - * Format: unix-time - * @description Date when the product was received. - */ - received_at?: number | null - /** @description Description of the cardholder's attempt to return the product. */ - return_description?: string | null - /** - * @description Result of cardholder's attempt to return the product. - * @enum {string|null} - */ - return_status?: ('merchant_rejected' | 'successful') | null - /** - * Format: unix-time - * @description Date when the product was returned or attempted to be returned. - */ - returned_at?: number | null - } - /** IssuingDisputeNotReceivedEvidence */ - issuing_dispute_not_received_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** - * Format: unix-time - * @description Date when the cardholder expected to receive the product. - */ - expected_at?: number | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** @description Description of the merchandise or service that was purchased. */ - product_description?: string | null - /** - * @description Whether the product was a merchandise or service. - * @enum {string|null} - */ - product_type?: ('merchandise' | 'service') | null - } - /** IssuingDisputeOtherEvidence */ - issuing_dispute_other_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** @description Description of the merchandise or service that was purchased. */ - product_description?: string | null - /** - * @description Whether the product was a merchandise or service. - * @enum {string|null} - */ - product_type?: ('merchandise' | 'service') | null - } - /** IssuingDisputeServiceNotAsDescribedEvidence */ - issuing_dispute_service_not_as_described_evidence: { - /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ - additional_documentation?: (string | components['schemas']['file']) | null - /** - * Format: unix-time - * @description Date when order was canceled. - */ - canceled_at?: number | null - /** @description Reason for canceling the order. */ - cancellation_reason?: string | null - /** @description Explanation of why the cardholder is disputing this transaction. */ - explanation?: string | null - /** - * Format: unix-time - * @description Date when the product was received. - */ - received_at?: number | null - } - /** IssuingTransactionAmountDetails */ - issuing_transaction_amount_details: { - /** @description The fee charged by the ATM for the cash withdrawal. */ - atm_fee?: number | null - } - /** IssuingTransactionFlightData */ - issuing_transaction_flight_data: { - /** @description The time that the flight departed. */ - departure_at?: number | null - /** @description The name of the passenger. */ - passenger_name?: string | null - /** @description Whether the ticket is refundable. */ - refundable?: boolean | null - /** @description The legs of the trip. */ - segments?: components['schemas']['issuing_transaction_flight_data_leg'][] | null - /** @description The travel agency that issued the ticket. */ - travel_agency?: string | null - } - /** IssuingTransactionFlightDataLeg */ - issuing_transaction_flight_data_leg: { - /** @description The three-letter IATA airport code of the flight's destination. */ - arrival_airport_code?: string | null - /** @description The airline carrier code. */ - carrier?: string | null - /** @description The three-letter IATA airport code that the flight departed from. */ - departure_airport_code?: string | null - /** @description The flight number. */ - flight_number?: string | null - /** @description The flight's service class. */ - service_class?: string | null - /** @description Whether a stopover is allowed on this flight. */ - stopover_allowed?: boolean | null - } - /** IssuingTransactionFuelData */ - issuing_transaction_fuel_data: { - /** @description The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. */ - type: string - /** @description The units for `volume_decimal`. One of `us_gallon` or `liter`. */ - unit: string - /** - * Format: decimal - * @description The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - */ - unit_cost_decimal: string - /** - * Format: decimal - * @description The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - */ - volume_decimal?: string | null - } - /** IssuingTransactionLodgingData */ - issuing_transaction_lodging_data: { - /** @description The time of checking into the lodging. */ - check_in_at?: number | null - /** @description The number of nights stayed at the lodging. */ - nights?: number | null - } - /** IssuingTransactionPurchaseDetails */ - issuing_transaction_purchase_details: { - /** @description Information about the flight that was purchased with this transaction. */ - flight?: components['schemas']['issuing_transaction_flight_data'] | null - /** @description Information about fuel that was purchased with this transaction. */ - fuel?: components['schemas']['issuing_transaction_fuel_data'] | null - /** @description Information about lodging that was purchased with this transaction. */ - lodging?: components['schemas']['issuing_transaction_lodging_data'] | null - /** @description The line items in the purchase. */ - receipt?: components['schemas']['issuing_transaction_receipt_data'][] | null - /** @description A merchant-specific order number. */ - reference?: string | null - } - /** IssuingTransactionReceiptData */ - issuing_transaction_receipt_data: { - /** @description The description of the item. The maximum length of this field is 26 characters. */ - description?: string | null - /** @description The quantity of the item. */ - quantity?: number | null - /** @description The total for this line item in cents. */ - total?: number | null - /** @description The unit cost of the item in cents. */ - unit_cost?: number | null - } - /** - * IssuingAuthorization - * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - * object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - * purchase to be completed successfully. - * - * Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations). - */ - 'issuing.authorization': { - /** @description The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: components['schemas']['issuing_authorization_amount_details'] | null - /** @description Whether the authorization has been approved. */ - approved: boolean - /** - * @description How the card details were provided. - * @enum {string} - */ - authorization_method: 'chip' | 'contactless' | 'keyed_in' | 'online' | 'swipe' - /** @description List of balance transactions associated with this authorization. */ - balance_transactions: components['schemas']['balance_transaction'][] - card: components['schemas']['issuing.card'] - /** @description The cardholder to whom this authorization belongs. */ - cardholder?: (string | components['schemas']['issuing.cardholder']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - merchant_amount: number - /** @description The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - merchant_currency: string - merchant_data: components['schemas']['issuing_authorization_merchant_data'] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.authorization' - /** @description The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ - pending_request?: components['schemas']['issuing_authorization_pending_request'] | null - /** @description History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization. */ - request_history: components['schemas']['issuing_authorization_request'][] - /** - * @description The current status of the authorization in its lifecycle. - * @enum {string} - */ - status: 'closed' | 'pending' | 'reversed' - /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ - transactions: components['schemas']['issuing.transaction'][] - verification_data: components['schemas']['issuing_authorization_verification_data'] - /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ - wallet?: string | null - } - /** - * IssuingCard - * @description You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. - */ - 'issuing.card': { - /** @description The brand of the card. */ - brand: string - /** - * @description The reason why the card was canceled. - * @enum {string|null} - */ - cancellation_reason?: ('lost' | 'stolen') | null - cardholder: components['schemas']['issuing.cardholder'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ - cvc?: string - /** @description The expiration month of the card. */ - exp_month: number - /** @description The expiration year of the card. */ - exp_year: number - /** @description Unique identifier for the object. */ - id: string - /** @description The last 4 digits of the card number. */ - last4: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ - number?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.card' - /** @description The latest card that replaces this card, if any. */ - replaced_by?: (string | components['schemas']['issuing.card']) | null - /** @description The card this card replaces, if any. */ - replacement_for?: (string | components['schemas']['issuing.card']) | null - /** - * @description The reason why the previous card needed to be replaced. - * @enum {string|null} - */ - replacement_reason?: ('damaged' | 'expired' | 'lost' | 'stolen') | null - /** @description Where and how the card will be shipped. */ - shipping?: components['schemas']['issuing_card_shipping'] | null - spending_controls: components['schemas']['issuing_card_authorization_controls'] - /** - * @description Whether authorizations can be approved on this card. - * @enum {string} - */ - status: 'active' | 'canceled' | 'inactive' - /** - * @description The type of the card. - * @enum {string} - */ - type: 'physical' | 'virtual' - /** @description Information relating to digital wallets (like Apple Pay and Google Pay). */ - wallets?: components['schemas']['issuing_card_wallets'] | null - } - /** - * IssuingCardholder - * @description An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. - * - * Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) - */ - 'issuing.cardholder': { - billing: components['schemas']['issuing_cardholder_address'] - /** @description Additional information about a `company` cardholder. */ - company?: components['schemas']['issuing_cardholder_company'] | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The cardholder's email address. */ - email?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description Additional information about an `individual` cardholder. */ - individual?: components['schemas']['issuing_cardholder_individual'] | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.cardholder' - /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ - phone_number?: string | null - requirements: components['schemas']['issuing_cardholder_requirements'] - /** @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. */ - spending_controls?: components['schemas']['issuing_cardholder_authorization_controls'] | null - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. - * @enum {string} - */ - status: 'active' | 'blocked' | 'inactive' - /** - * @description One of `individual` or `company`. - * @enum {string} - */ - type: 'company' | 'individual' - } - /** - * IssuingDispute - * @description As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. - * - * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) - */ - 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ - amount: number - /** @description List of balance transactions associated with the dispute. */ - balance_transactions?: components['schemas']['balance_transaction'][] | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The currency the `transaction` was made in. */ - currency: string - evidence: components['schemas']['issuing_dispute_evidence'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.dispute' - /** - * @description Current status of the dispute. - * @enum {string} - */ - status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' - /** @description The transaction being disputed. */ - transaction: string | components['schemas']['issuing.transaction'] - } - /** - * IssuingSettlement - * @description When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. - */ - 'issuing.settlement': { - /** @description The Bank Identification Number reflecting this settlement record. */ - bin: string - /** @description The date that the transactions are cleared and posted to user's accounts. */ - clearing_date: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The total interchange received as reimbursement for the transactions. */ - interchange_fees: number - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The total net amount required to settle with the network. */ - net_total: number - /** - * @description The card network for this settlement report. One of ["visa"] - * @enum {string} - */ - network: 'visa' - /** @description The total amount of fees owed to the network. */ - network_fees: number - /** @description The Settlement Identification Number assigned by the network. */ - network_settlement_identifier: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.settlement' - /** @description One of `international` or `uk_national_net`. */ - settlement_service: string - /** @description The total number of transactions reflected in this settlement. */ - transaction_count: number - /** @description The total transaction amount reflected in this settlement. */ - transaction_volume: number - } - /** - * IssuingTransaction - * @description Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving - * your Stripe account, such as a completed purchase or refund, is represented by an Issuing - * `Transaction` object. - * - * Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions). - */ - 'issuing.transaction': { - /** @description The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount: number - /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: components['schemas']['issuing_transaction_amount_details'] | null - /** @description The `Authorization` object that led to this transaction. */ - authorization?: (string | components['schemas']['issuing.authorization']) | null - /** @description ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** @description The card used to make this transaction. */ - card: string | components['schemas']['issuing.card'] - /** @description The cardholder to whom this transaction belongs. */ - cardholder?: (string | components['schemas']['issuing.cardholder']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description If you've disputed the transaction, the ID of the dispute. */ - dispute?: (string | components['schemas']['issuing.dispute']) | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. */ - merchant_amount: number - /** @description The currency with which the merchant is taking payment. */ - merchant_currency: string - merchant_data: components['schemas']['issuing_authorization_merchant_data'] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuing.transaction' - /** @description Additional purchase information that is optionally provided by the merchant. */ - purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null - /** - * @description The nature of the transaction. - * @enum {string} - */ - type: 'capture' | 'refund' - /** - * @description The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. - * @enum {string|null} - */ - wallet?: ('apple_pay' | 'google_pay' | 'samsung_pay') | null - } - /** - * LineItem - * @description A line item. - */ - item: { - /** @description Total before any discounts or taxes are applied. */ - amount_subtotal: number - /** @description Total after discounts and taxes. */ - amount_total: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. */ - description: string - /** @description The discounts applied to the line item. */ - discounts?: components['schemas']['line_items_discount_amount'][] - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'item' - /** @description The price used to generate the line item. */ - price?: components['schemas']['price'] | null - /** @description The quantity of products being purchased. */ - quantity?: number | null - /** @description The taxes applied to the line item. */ - taxes?: components['schemas']['line_items_tax_amount'][] - } - /** LegalEntityCompany */ - legal_entity_company: { - address?: components['schemas']['address'] - /** @description The Kana variation of the company's primary address (Japan only). */ - address_kana?: components['schemas']['legal_entity_japan_address'] | null - /** @description The Kanji variation of the company's primary address (Japan only). */ - address_kanji?: components['schemas']['legal_entity_japan_address'] | null - /** @description Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). */ - directors_provided?: boolean - /** @description Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. */ - executives_provided?: boolean - /** @description The company's legal name. */ - name?: string | null - /** @description The Kana variation of the company's legal name (Japan only). */ - name_kana?: string | null - /** @description The Kanji variation of the company's legal name (Japan only). */ - name_kanji?: string | null - /** @description Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). */ - owners_provided?: boolean - /** @description This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. */ - ownership_declaration?: components['schemas']['legal_entity_ubo_declaration'] | null - /** @description The company's phone number (used for verification). */ - phone?: string | null - /** - * @description The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. - * @enum {string} - */ - structure?: - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - /** @description Whether the company's business ID number was provided. */ - tax_id_provided?: boolean - /** @description The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ - tax_id_registrar?: string - /** @description Whether the company's business VAT number was provided. */ - vat_id_provided?: boolean - /** @description Information on the verification state of the company. */ - verification?: components['schemas']['legal_entity_company_verification'] | null - } - /** LegalEntityCompanyVerification */ - legal_entity_company_verification: { - document: components['schemas']['legal_entity_company_verification_document'] - } - /** LegalEntityCompanyVerificationDocument */ - legal_entity_company_verification_document: { - /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - back?: (string | components['schemas']['file']) | null - /** @description A user-displayable string describing the verification state of this document. */ - details?: string | null - /** @description One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. */ - details_code?: string | null - /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - front?: (string | components['schemas']['file']) | null - } - /** LegalEntityDOB */ - legal_entity_dob: { - /** @description The day of birth, between 1 and 31. */ - day?: number | null - /** @description The month of birth, between 1 and 12. */ - month?: number | null - /** @description The four-digit year of birth. */ - year?: number | null - } - /** LegalEntityJapanAddress */ - legal_entity_japan_address: { - /** @description City/Ward. */ - city?: string | null - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string | null - /** @description Block/Building number. */ - line1?: string | null - /** @description Building details. */ - line2?: string | null - /** @description ZIP or postal code. */ - postal_code?: string | null - /** @description Prefecture. */ - state?: string | null - /** @description Town/cho-me. */ - town?: string | null - } - /** LegalEntityPersonVerification */ - legal_entity_person_verification: { - /** @description A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ - additional_document?: components['schemas']['legal_entity_person_verification_document'] | null - /** @description A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ - details?: string | null - /** @description One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. */ - details_code?: string | null - document?: components['schemas']['legal_entity_person_verification_document'] - /** @description The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ - status: string - } - /** LegalEntityPersonVerificationDocument */ - legal_entity_person_verification_document: { - /** @description The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: (string | components['schemas']['file']) | null - /** @description A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". */ - details?: string | null - /** @description One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. */ - details_code?: string | null - /** @description The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: (string | components['schemas']['file']) | null - } - /** LegalEntityUBODeclaration */ - legal_entity_ubo_declaration: { - /** - * Format: unix-time - * @description The Unix timestamp marking when the beneficial owner attestation was made. - */ - date?: number | null - /** @description The IP address from which the beneficial owner attestation was made. */ - ip?: string | null - /** @description The user-agent string from the browser where the beneficial owner attestation was made. */ - user_agent?: string | null - } - /** InvoiceLineItem */ - line_item: { - /** @description The amount, in %s. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The amount of discount calculated per discount for this line item. */ - discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null - /** @description If true, discounts will apply to this line item. Always false for prorations. */ - discountable: boolean - /** @description The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ - discounts?: (string | components['schemas']['discount'])[] | null - /** @description Unique identifier for the object. */ - id: string - /** @description The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ - invoice_item?: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'line_item' - period: components['schemas']['invoice_line_item_period'] - /** @description The price of the line item. */ - price?: components['schemas']['price'] | null - /** @description Whether this is a proration. */ - proration: boolean - /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ - quantity?: number | null - /** @description The subscription that the invoice item pertains to, if any. */ - subscription?: string | null - /** @description The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. */ - subscription_item?: string - /** @description The amount of tax calculated per tax rate for this line item */ - tax_amounts?: components['schemas']['invoice_tax_amount'][] - /** @description The tax rates which apply to the line item. */ - tax_rates?: components['schemas']['tax_rate'][] - /** - * @description A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. - * @enum {string} - */ - type: 'invoiceitem' | 'subscription' - } - /** LineItemsDiscountAmount */ - line_items_discount_amount: { - /** @description The amount discounted. */ - amount: number - discount: components['schemas']['discount'] - } - /** LineItemsTaxAmount */ - line_items_tax_amount: { - /** @description Amount of tax applied for this rate. */ - amount: number - rate: components['schemas']['tax_rate'] - } - /** LoginLink */ - login_link: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'login_link' - /** @description The URL for the login link. */ - url: string - } - /** - * Mandate - * @description A Mandate is a record of the permission a customer has given you to debit their payment method. - */ - mandate: { - customer_acceptance: components['schemas']['customer_acceptance'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - multi_use?: components['schemas']['mandate_multi_use'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'mandate' - /** @description ID of the payment method associated with this mandate. */ - payment_method: string | components['schemas']['payment_method'] - payment_method_details: components['schemas']['mandate_payment_method_details'] - single_use?: components['schemas']['mandate_single_use'] - /** - * @description The status of the mandate, which indicates whether it can be used to initiate a payment. - * @enum {string} - */ - status: 'active' | 'inactive' | 'pending' - /** - * @description The type of the mandate. - * @enum {string} - */ - type: 'multi_use' | 'single_use' - } - /** mandate_acss_debit */ - mandate_acss_debit: { - /** @description List of Stripe products where this mandate can be selected automatically. */ - default_for?: ('invoice' | 'subscription')[] - /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ - interval_description?: string | null - /** - * @description Payment schedule for the mandate. - * @enum {string} - */ - payment_schedule: 'combined' | 'interval' | 'sporadic' - /** - * @description Transaction type of the mandate. - * @enum {string} - */ - transaction_type: 'business' | 'personal' - } - /** mandate_au_becs_debit */ - mandate_au_becs_debit: { - /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ - url: string - } - /** mandate_bacs_debit */ - mandate_bacs_debit: { - /** - * @description The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. - * @enum {string} - */ - network_status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @description The unique reference identifying the mandate on the Bacs network. */ - reference: string - /** @description The URL that will contain the mandate that the customer has signed. */ - url: string - } - /** mandate_multi_use */ - mandate_multi_use: { [key: string]: unknown } - /** mandate_payment_method_details */ - mandate_payment_method_details: { - acss_debit?: components['schemas']['mandate_acss_debit'] - au_becs_debit?: components['schemas']['mandate_au_becs_debit'] - bacs_debit?: components['schemas']['mandate_bacs_debit'] - card?: components['schemas']['card_mandate_payment_method_details'] - sepa_debit?: components['schemas']['mandate_sepa_debit'] - /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ - type: string - } - /** mandate_sepa_debit */ - mandate_sepa_debit: { - /** @description The unique reference of the mandate. */ - reference: string - /** @description The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ - url: string - } - /** mandate_single_use */ - mandate_single_use: { - /** @description On a single use mandate, the amount of the payment. */ - amount: number - /** @description On a single use mandate, the currency of the payment. */ - currency: string - } - /** networks */ - networks: { - /** @description All available networks for the card. */ - available: string[] - /** @description The preferred network for the card. */ - preferred?: string | null - } - /** NotificationEventData */ - notification_event_data: { - /** @description Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. */ - object: { [key: string]: unknown } - /** @description Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ - previous_attributes?: { [key: string]: unknown } - } - /** NotificationEventRequest */ - notification_event_request: { - /** @description ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. */ - id?: string | null - /** @description The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ - idempotency_key?: string | null - } - /** offline_acceptance */ - offline_acceptance: { [key: string]: unknown } - /** online_acceptance */ - online_acceptance: { - /** @description The IP address from which the Mandate was accepted by the customer. */ - ip_address?: string | null - /** @description The user agent of the browser from which the Mandate was accepted by the customer. */ - user_agent?: string | null - } - /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). - */ - order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: (string | components['schemas']['charge']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer used for the order. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The email address of the customer placing the order. */ - email?: string | null - /** @description External coupon code to load for this order. */ - external_coupon_code?: string - /** @description Unique identifier for the object. */ - id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order' - /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. - */ - returns?: { - /** @description Details about each object. */ - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: components['schemas']['shipping'] | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - /** @description The timestamps at which the order status was updated. */ - status_transitions?: components['schemas']['status_transitions'] | null - /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. - */ - updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string - } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: (string | components['schemas']['sku']) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string - } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The items included in this order return. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: (string | components['schemas']['order']) | null - /** @description The ID of the refund issued for this return. */ - refund?: (string | components['schemas']['refund']) | null - } - /** PackageDimensions */ - package_dimensions: { - /** @description Height, in inches. */ - height: number - /** @description Length, in inches. */ - length: number - /** @description Weight, in ounces. */ - weight: number - /** @description Width, in inches. */ - width: number - } - /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ - payment_flows_automatic_payment_methods_payment_intent: { - /** @description Automatically calculates compatible payment methods */ - enabled: boolean - } - /** PaymentFlowsPrivatePaymentMethodsAlipay */ - payment_flows_private_payment_methods_alipay: { [key: string]: unknown } - /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ - payment_flows_private_payment_methods_alipay_details: { - /** @description Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ - buyer_id?: string - /** @description Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. */ - fingerprint?: string | null - /** @description Transaction ID of this particular Alipay transaction. */ - transaction_id?: string | null - } - /** PaymentFlowsPrivatePaymentMethodsKlarnaDOB */ - payment_flows_private_payment_methods_klarna_dob: { - /** @description The day of birth, between 1 and 31. */ - day?: number | null - /** @description The month of birth, between 1 and 12. */ - month?: number | null - /** @description The four-digit year of birth. */ - year?: number | null - } - /** - * PaymentIntent - * @description A PaymentIntent guides you through the process of collecting a payment from your customer. - * We recommend that you create exactly one PaymentIntent for each order or - * customer session in your system. You can reference the PaymentIntent later to - * see the history of payment attempts for a particular session. - * - * A PaymentIntent transitions through - * [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - * throughout its lifetime as it interfaces with Stripe.js to perform - * authentication flows and ultimately creates at most one successful charge. - * - * Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). - */ - payment_intent: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description Amount that can be captured from this PaymentIntent. */ - amount_capturable?: number - /** @description Amount that was collected by this PaymentIntent. */ - amount_received?: number - /** @description ID of the Connect application that created the PaymentIntent. */ - application?: (string | components['schemas']['application']) | null - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | null - /** @description Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) */ - automatic_payment_methods?: components['schemas']['payment_flows_automatic_payment_methods_payment_intent'] | null - /** - * Format: unix-time - * @description Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. - */ - canceled_at?: number | null - /** - * @description Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). - * @enum {string|null} - */ - cancellation_reason?: - | ('abandoned' | 'automatic' | 'duplicate' | 'failed_invoice' | 'fraudulent' | 'requested_by_customer' | 'void_invoice') - | null - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method: 'automatic' | 'manual' - /** - * PaymentFlowsPaymentIntentResourceChargeList - * @description Charges that were created by this PaymentIntent, if any. - */ - charges?: { - /** @description This list only contains the latest charge, even if there were previously multiple unsuccessful charges. To view all previous charges for a PaymentIntent, you can filter the charges list using the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). */ - data: components['schemas']['charge'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** - * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. - * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. - */ - client_secret?: string | null - /** @enum {string} */ - confirmation_method: 'automatic' | 'manual' - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description ID of the invoice that created this PaymentIntent, if it exists. */ - invoice?: (string | components['schemas']['invoice']) | null - /** @description The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. */ - last_payment_error?: components['schemas']['api_errors'] | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ - metadata?: { [key: string]: string } - /** @description If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. */ - next_action?: components['schemas']['payment_intent_next_action'] | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payment_intent' - /** @description The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the payment method used in this PaymentIntent. */ - payment_method?: (string | components['schemas']['payment_method']) | null - /** @description Payment-method-specific configuration for this PaymentIntent. */ - payment_method_options?: components['schemas']['payment_intent_payment_method_options'] | null - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types: string[] - /** @description If present, this property tells you about the processing state of the payment. */ - processing?: components['schemas']['payment_intent_processing'] | null - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | null - /** @description ID of the review associated with this PaymentIntent, if any. */ - review?: (string | components['schemas']['review']) | null - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string|null} - */ - setup_future_usage?: ('off_session' | 'on_session') | null - /** @description Shipping information for this PaymentIntent. */ - shipping?: components['schemas']['shipping'] | null - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string | null - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string | null - /** - * @description Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). - * @enum {string} - */ - status: 'canceled' | 'processing' | 'requires_action' | 'requires_capture' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' - /** @description The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_data?: components['schemas']['transfer_data'] | null - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string | null - } - /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown } - /** PaymentIntentNextAction */ - payment_intent_next_action: { - alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] - boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] - oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] - redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] - /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ - type: string - /** @description When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ - use_stripe_sdk?: { [key: string]: unknown } - verify_with_microdeposits?: components['schemas']['payment_intent_next_action_verify_with_microdeposits'] - wechat_pay_display_qr_code?: components['schemas']['payment_intent_next_action_wechat_pay_display_qr_code'] - wechat_pay_redirect_to_android_app?: components['schemas']['payment_intent_next_action_wechat_pay_redirect_to_android_app'] - wechat_pay_redirect_to_ios_app?: components['schemas']['payment_intent_next_action_wechat_pay_redirect_to_ios_app'] - } - /** PaymentIntentNextActionAlipayHandleRedirect */ - payment_intent_next_action_alipay_handle_redirect: { - /** @description The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. */ - native_data?: string | null - /** @description The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. */ - native_url?: string | null - /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ - return_url?: string | null - /** @description The URL you must redirect your customer to in order to authenticate the payment. */ - url?: string | null - } - /** payment_intent_next_action_boleto */ - payment_intent_next_action_boleto: { - /** - * Format: unix-time - * @description The timestamp after which the boleto expires. - */ - expires_at?: number | null - /** @description The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. */ - hosted_voucher_url?: string | null - /** @description The boleto number. */ - number?: string | null - /** @description The URL to the downloadable boleto voucher PDF. */ - pdf?: string | null - } - /** PaymentIntentNextActionDisplayOxxoDetails */ - payment_intent_next_action_display_oxxo_details: { - /** - * Format: unix-time - * @description The timestamp after which the OXXO voucher expires. - */ - expires_after?: number | null - /** @description The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. */ - hosted_voucher_url?: string | null - /** @description OXXO reference number. */ - number?: string | null - } - /** PaymentIntentNextActionRedirectToUrl */ - payment_intent_next_action_redirect_to_url: { - /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ - return_url?: string | null - /** @description The URL you must redirect your customer to in order to authenticate the payment. */ - url?: string | null - } - /** PaymentIntentNextActionVerifyWithMicrodeposits */ - payment_intent_next_action_verify_with_microdeposits: { - /** - * Format: unix-time - * @description The timestamp when the microdeposits are expected to land. - */ - arrival_date: number - /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ - hosted_verification_url: string - } - /** PaymentIntentNextActionWechatPayDisplayQrCode */ - payment_intent_next_action_wechat_pay_display_qr_code: { - /** @description The data being used to generate QR code */ - data: string - /** @description The base64 image data for a pre-generated QR code */ - image_data_url: string - /** @description The image_url_png string used to render QR code */ - image_url_png: string - /** @description The image_url_svg string used to render QR code */ - image_url_svg: string - } - /** PaymentIntentNextActionWechatPayRedirectToAndroidApp */ - payment_intent_next_action_wechat_pay_redirect_to_android_app: { - /** @description app_id is the APP ID registered on WeChat open platform */ - app_id: string - /** @description nonce_str is a random string */ - nonce_str: string - /** @description package is static value */ - package: string - /** @description an unique merchant ID assigned by Wechat Pay */ - partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ - prepay_id: string - /** @description A signature */ - sign: string - /** @description Specifies the current time in epoch format */ - timestamp: string - } - /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ - payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ - native_url: string - } - /** PaymentIntentPaymentMethodOptions */ - payment_intent_payment_method_options: { - acss_debit?: - | components['schemas']['payment_intent_payment_method_options_acss_debit'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - afterpay_clearpay?: - | components['schemas']['payment_method_options_afterpay_clearpay'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - alipay?: - | components['schemas']['payment_method_options_alipay'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - au_becs_debit?: - | components['schemas']['payment_intent_payment_method_options_au_becs_debit'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - bacs_debit?: - | components['schemas']['payment_method_options_bacs_debit'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - bancontact?: - | components['schemas']['payment_method_options_bancontact'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - boleto?: - | components['schemas']['payment_method_options_boleto'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - card?: - | components['schemas']['payment_intent_payment_method_options_card'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - card_present?: - | components['schemas']['payment_method_options_card_present'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - eps?: - | components['schemas']['payment_intent_payment_method_options_eps'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - fpx?: components['schemas']['payment_method_options_fpx'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - giropay?: - | components['schemas']['payment_method_options_giropay'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - grabpay?: - | components['schemas']['payment_method_options_grabpay'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - ideal?: - | components['schemas']['payment_method_options_ideal'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - interac_present?: - | components['schemas']['payment_method_options_interac_present'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - klarna?: - | components['schemas']['payment_method_options_klarna'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - oxxo?: - | components['schemas']['payment_method_options_oxxo'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - p24?: components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - sepa_debit?: - | components['schemas']['payment_intent_payment_method_options_sepa_debit'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - sofort?: - | components['schemas']['payment_method_options_sofort'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - wechat_pay?: - | components['schemas']['payment_method_options_wechat_pay'] - | components['schemas']['payment_intent_type_specific_payment_method_options_client'] - } - /** payment_intent_payment_method_options_acss_debit */ - payment_intent_payment_method_options_acss_debit: { - mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] - /** - * @description Bank account verification method. - * @enum {string} - */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** payment_intent_payment_method_options_au_becs_debit */ - payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } - /** payment_intent_payment_method_options_card */ - payment_intent_payment_method_options_card: { - /** - * @description Installment details for this payment (Mexico only). - * - * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - */ - installments?: components['schemas']['payment_method_options_card_installments'] | null - /** - * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. - * @enum {string|null} - */ - network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string|null} - */ - request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'none' | 'off_session' | 'on_session' - } - /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown } - /** payment_intent_payment_method_options_mandate_options_acss_debit */ - payment_intent_payment_method_options_mandate_options_acss_debit: { - /** @description A URL for custom mandate text */ - custom_mandate_url?: string - /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ - interval_description?: string | null - /** - * @description Payment schedule for the mandate. - * @enum {string|null} - */ - payment_schedule?: ('combined' | 'interval' | 'sporadic') | null - /** - * @description Transaction type of the mandate. - * @enum {string|null} - */ - transaction_type?: ('business' | 'personal') | null - } - /** payment_intent_payment_method_options_mandate_options_sepa_debit */ - payment_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } - /** payment_intent_payment_method_options_sepa_debit */ - payment_intent_payment_method_options_sepa_debit: { - mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] - } - /** PaymentIntentProcessing */ - payment_intent_processing: { - card?: components['schemas']['payment_intent_card_processing'] - /** - * @description Type of the payment method for which payment is in `processing` state, one of `card`. - * @enum {string} - */ - type: 'card' - } - /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ - payment_intent_type_specific_payment_method_options_client: { - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'none' | 'off_session' | 'on_session' - } - /** - * PaymentLink - * @description A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. - * - * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. - * - * Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api) - */ - payment_link: { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active: boolean - after_completion: components['schemas']['payment_links_resource_after_completion'] - /** @description Whether user redeemable promotion codes are enabled. */ - allow_promotion_codes: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ - application_fee_amount?: number | null - /** @description This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ - application_fee_percent?: number | null - automatic_tax: components['schemas']['payment_links_resource_automatic_tax'] - /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} - */ - billing_address_collection: 'auto' | 'required' - /** @description Unique identifier for the object. */ - id: string - /** - * PaymentLinksResourceListLineItems - * @description The line items representing what is being sold. - */ - line_items?: { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payment_link' - /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | null - phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null - /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ - subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null - /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ - transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null - /** @description The public URL that can be shared with customers. */ - url: string - } - /** PaymentLinksResourceAfterCompletion */ - payment_links_resource_after_completion: { - hosted_confirmation?: components['schemas']['payment_links_resource_completion_behavior_confirmation_page'] - redirect?: components['schemas']['payment_links_resource_completion_behavior_redirect'] - /** - * @description The specified behavior after the purchase is complete. - * @enum {string} - */ - type: 'hosted_confirmation' | 'redirect' - } - /** PaymentLinksResourceAutomaticTax */ - payment_links_resource_automatic_tax: { - /** @description If `true`, tax will be calculated automatically using the customer's location. */ - enabled: boolean - } - /** PaymentLinksResourceCompletionBehaviorConfirmationPage */ - payment_links_resource_completion_behavior_confirmation_page: { - /** @description The custom message that is displayed to the customer after the purchase is complete. */ - custom_message?: string | null - } - /** PaymentLinksResourceCompletionBehaviorRedirect */ - payment_links_resource_completion_behavior_redirect: { - /** @description The URL the customer will be redirected to after the purchase is complete. */ - url: string - } - /** PaymentLinksResourcePhoneNumberCollection */ - payment_links_resource_phone_number_collection: { - /** @description If `true`, a phone number will be collected during checkout. */ - enabled: boolean - } - /** PaymentLinksResourceShippingAddressCollection */ - payment_links_resource_shipping_address_collection: { - /** @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. */ - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** PaymentLinksResourceSubscriptionData */ - payment_links_resource_subscription_data: { - /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ - trial_period_days?: number | null - } - /** PaymentLinksResourceTransferData */ - payment_links_resource_transfer_data: { - /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ - amount?: number | null - /** @description The connected account receiving the transfer. */ - destination: string | components['schemas']['account'] - } - /** - * PaymentMethod - * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to - * Customer objects to store instrument details for future payments. - * - * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - */ - payment_method: { - acss_debit?: components['schemas']['payment_method_acss_debit'] - afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] - alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] - au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] - bacs_debit?: components['schemas']['payment_method_bacs_debit'] - bancontact?: components['schemas']['payment_method_bancontact'] - billing_details: components['schemas']['billing_details'] - boleto?: components['schemas']['payment_method_boleto'] - card?: components['schemas']['payment_method_card'] - card_present?: components['schemas']['payment_method_card_present'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ - customer?: (string | components['schemas']['customer']) | null - eps?: components['schemas']['payment_method_eps'] - fpx?: components['schemas']['payment_method_fpx'] - giropay?: components['schemas']['payment_method_giropay'] - grabpay?: components['schemas']['payment_method_grabpay'] - /** @description Unique identifier for the object. */ - id: string - ideal?: components['schemas']['payment_method_ideal'] - interac_present?: components['schemas']['payment_method_interac_present'] - klarna?: components['schemas']['payment_method_klarna'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payment_method' - oxxo?: components['schemas']['payment_method_oxxo'] - p24?: components['schemas']['payment_method_p24'] - sepa_debit?: components['schemas']['payment_method_sepa_debit'] - sofort?: components['schemas']['payment_method_sofort'] - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'card_present' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'interac_present' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - wechat_pay?: components['schemas']['payment_method_wechat_pay'] - } - /** payment_method_acss_debit */ - payment_method_acss_debit: { - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Institution number of the bank account. */ - institution_number?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description Transit number of the bank account. */ - transit_number?: string | null - } - /** payment_method_afterpay_clearpay */ - payment_method_afterpay_clearpay: { [key: string]: unknown } - /** payment_method_au_becs_debit */ - payment_method_au_becs_debit: { - /** @description Six-digit number identifying bank and branch associated with this bank account. */ - bsb_number?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - } - /** payment_method_bacs_debit */ - payment_method_bacs_debit: { - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description Sort code of the bank account. (e.g., `10-20-30`) */ - sort_code?: string | null - } - /** payment_method_bancontact */ - payment_method_bancontact: { [key: string]: unknown } - /** payment_method_boleto */ - payment_method_boleto: { - /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ - tax_id: string - } - /** payment_method_card */ - payment_method_card: { - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand: string - /** @description Checks on Card address and CVC if provided. */ - checks?: components['schemas']['payment_method_card_checks'] | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding: string - /** @description Details of the original PaymentMethod that created this object. */ - generated_from?: components['schemas']['payment_method_card_generated_card'] | null - /** @description The last four digits of the card. */ - last4: string - /** @description Contains information about card networks that can be used to process the payment. */ - networks?: components['schemas']['networks'] | null - /** @description Contains details on how this Card maybe be used for 3D Secure authentication. */ - three_d_secure_usage?: components['schemas']['three_d_secure_usage'] | null - /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: components['schemas']['payment_method_card_wallet'] | null - } - /** payment_method_card_checks */ - payment_method_card_checks: { - /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string | null - /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_postal_code_check?: string | null - /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - cvc_check?: string | null - } - /** payment_method_card_generated_card */ - payment_method_card_generated_card: { - /** @description The charge that created this object. */ - charge?: string | null - /** @description Transaction-specific details of the payment method used in the payment. */ - payment_method_details?: components['schemas']['card_generated_from_payment_method_details'] | null - /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ - setup_attempt?: (string | components['schemas']['setup_attempt']) | null - } - /** payment_method_card_present */ - payment_method_card_present: { [key: string]: unknown } - /** payment_method_card_wallet */ - payment_method_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_card_wallet_visa_checkout'] - } - /** payment_method_card_wallet_amex_express_checkout */ - payment_method_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_card_wallet_apple_pay */ - payment_method_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_card_wallet_google_pay */ - payment_method_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_card_wallet_masterpass */ - payment_method_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_card_wallet_samsung_pay */ - payment_method_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_card_wallet_visa_checkout */ - payment_method_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details */ - payment_method_details: { - ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] - ach_debit?: components['schemas']['payment_method_details_ach_debit'] - acss_debit?: components['schemas']['payment_method_details_acss_debit'] - afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] - alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] - au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] - bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] - bancontact?: components['schemas']['payment_method_details_bancontact'] - boleto?: components['schemas']['payment_method_details_boleto'] - card?: components['schemas']['payment_method_details_card'] - card_present?: components['schemas']['payment_method_details_card_present'] - eps?: components['schemas']['payment_method_details_eps'] - fpx?: components['schemas']['payment_method_details_fpx'] - giropay?: components['schemas']['payment_method_details_giropay'] - grabpay?: components['schemas']['payment_method_details_grabpay'] - ideal?: components['schemas']['payment_method_details_ideal'] - interac_present?: components['schemas']['payment_method_details_interac_present'] - klarna?: components['schemas']['payment_method_details_klarna'] - multibanco?: components['schemas']['payment_method_details_multibanco'] - oxxo?: components['schemas']['payment_method_details_oxxo'] - p24?: components['schemas']['payment_method_details_p24'] - sepa_debit?: components['schemas']['payment_method_details_sepa_debit'] - sofort?: components['schemas']['payment_method_details_sofort'] - stripe_account?: components['schemas']['payment_method_details_stripe_account'] - /** - * @description The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. - * An additional hash is included on `payment_method_details` with a name matching this value. - * It contains information specific to the payment method. - */ - type: string - wechat?: components['schemas']['payment_method_details_wechat'] - wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] - } - /** payment_method_details_ach_credit_transfer */ - payment_method_details_ach_credit_transfer: { - /** @description Account number to transfer funds to. */ - account_number?: string | null - /** @description Name of the bank associated with the routing number. */ - bank_name?: string | null - /** @description Routing transit number for the bank account to transfer funds to. */ - routing_number?: string | null - /** @description SWIFT code of the bank associated with the routing number. */ - swift_code?: string | null - } - /** payment_method_details_ach_debit */ - payment_method_details_ach_debit: { - /** - * @description Type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string|null} - */ - account_holder_type?: ('company' | 'individual') | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description Routing transit number of the bank account. */ - routing_number?: string | null - } - /** payment_method_details_acss_debit */ - payment_method_details_acss_debit: { - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Institution number of the bank account */ - institution_number?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description ID of the mandate used to make this payment. */ - mandate?: string - /** @description Transit number of the bank account. */ - transit_number?: string | null - } - /** payment_method_details_afterpay_clearpay */ - payment_method_details_afterpay_clearpay: { - /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ - reference?: string | null - } - /** payment_method_details_au_becs_debit */ - payment_method_details_au_becs_debit: { - /** @description Bank-State-Branch number of the bank account. */ - bsb_number?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description ID of the mandate used to make this payment. */ - mandate?: string - } - /** payment_method_details_bacs_debit */ - payment_method_details_bacs_debit: { - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four digits of the bank account number. */ - last4?: string | null - /** @description ID of the mandate used to make this payment. */ - mandate?: string | null - /** @description Sort code of the bank account. (e.g., `10-20-30`) */ - sort_code?: string | null - } - /** payment_method_details_bancontact */ - payment_method_details_bancontact: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Preferred language of the Bancontact authorization page that the customer is redirected to. - * Can be one of `en`, `de`, `fr`, or `nl` - * @enum {string|null} - */ - preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null - /** - * @description Owner's verified full name. Values are verified or provided by Bancontact directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** payment_method_details_boleto */ - payment_method_details_boleto: { - /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ - tax_id: string - } - /** payment_method_details_card */ - payment_method_details_card: { - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand?: string | null - /** @description Check results by Card networks on Card address and CVC at time of payment. */ - checks?: components['schemas']['payment_method_details_card_checks'] | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** - * @description Installment details for this payment (Mexico only). - * - * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - */ - installments?: components['schemas']['payment_method_details_card_installments'] | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Populated if this transaction used 3D Secure authentication. */ - three_d_secure?: components['schemas']['three_d_secure_details'] | null - /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: components['schemas']['payment_method_details_card_wallet'] | null - } - /** payment_method_details_card_checks */ - payment_method_details_card_checks: { - /** @description If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_line1_check?: string | null - /** @description If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - address_postal_code_check?: string | null - /** @description If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ - cvc_check?: string | null - } - /** payment_method_details_card_installments */ - payment_method_details_card_installments: { - /** @description Installment plan selected for the payment. */ - plan?: components['schemas']['payment_method_details_card_installments_plan'] | null - } - /** payment_method_details_card_installments_plan */ - payment_method_details_card_installments_plan: { - /** @description For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ - count?: number | null - /** - * @description For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - * One of `month`. - * @enum {string|null} - */ - interval?: 'month' | null - /** - * @description Type of installment plan, one of `fixed_count`. - * @enum {string} - */ - type: 'fixed_count' - } - /** payment_method_details_card_present */ - payment_method_details_card_present: { - /** @description The authorized amount */ - amount_authorized?: number | null - /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null - /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null - } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null - } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null - } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ - preferred_locales?: string[] | null - /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: components['schemas']['payment_method_details_interac_present_receipt'] | null - } - /** payment_method_details_interac_present_receipt */ - payment_method_details_interac_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'savings' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } - /** payment_method_details_klarna */ - payment_method_details_klarna: { - /** - * @description The Klarna payment method used for this transaction. - * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` - */ - payment_method_category?: string | null - /** - * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` - */ - preferred_locale?: string | null - } - /** payment_method_details_multibanco */ - payment_method_details_multibanco: { - /** @description Entity number associated with this Multibanco payment. */ - entity?: string | null - /** @description Reference number associated with this Multibanco payment. */ - reference?: string | null - } - /** payment_method_details_oxxo */ - payment_method_details_oxxo: { - /** @description OXXO reference number */ - number?: string | null - } - /** payment_method_details_p24 */ - payment_method_details_p24: { - /** - * @description The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. - * @enum {string|null} - */ - bank?: - | ( - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - ) - | null - /** @description Unique reference for this Przelewy24 payment. */ - reference?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Przelewy24 directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Przelewy24 rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_sepa_debit */ - payment_method_details_sepa_debit: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Branch code of bank associated with the bank account. */ - branch_code?: string | null - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Last four characters of the IBAN. */ - last4?: string | null - /** @description ID of the mandate used to make this payment. */ - mandate?: string | null - } - /** payment_method_details_sofort */ - payment_method_details_sofort: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Preferred language of the SOFORT authorization page that the customer is redirected to. - * Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` - * @enum {string|null} - */ - preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null - /** - * @description Owner's verified full name. Values are verified or provided by SOFORT directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** payment_method_details_stripe_account */ - payment_method_details_stripe_account: { [key: string]: unknown } - /** payment_method_details_wechat */ - payment_method_details_wechat: { [key: string]: unknown } - /** payment_method_details_wechat_pay */ - payment_method_details_wechat_pay: { - /** @description Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. */ - fingerprint?: string | null - /** @description Transaction ID of this particular WeChat Pay transaction. */ - transaction_id?: string | null - } - /** payment_method_eps */ - payment_method_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - } - /** payment_method_fpx */ - payment_method_fpx: { - /** - * @description The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** payment_method_giropay */ - payment_method_giropay: { [key: string]: unknown } - /** payment_method_grabpay */ - payment_method_grabpay: { [key: string]: unknown } - /** payment_method_ideal */ - payment_method_ideal: { - /** - * @description The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank, if the bank was provided. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - } - /** payment_method_interac_present */ - payment_method_interac_present: { [key: string]: unknown } - /** payment_method_klarna */ - payment_method_klarna: { - /** @description The customer's date of birth, if provided. */ - dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null - } - /** payment_method_options_afterpay_clearpay */ - payment_method_options_afterpay_clearpay: { - /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about - * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - */ - reference?: string | null - } - /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown } - /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown } - /** payment_method_options_bancontact */ - payment_method_options_bancontact: { - /** - * @description Preferred language of the Bancontact authorization page that the customer is redirected to. - * @enum {string} - */ - preferred_language: 'de' | 'en' | 'fr' | 'nl' - } - /** payment_method_options_boleto */ - payment_method_options_boleto: { - /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ - expires_after_days: number - } - /** payment_method_options_card_installments */ - payment_method_options_card_installments: { - /** @description Installment plans that may be selected for this PaymentIntent. */ - available_plans?: components['schemas']['payment_method_details_card_installments_plan'][] | null - /** @description Whether Installments are enabled for this PaymentIntent. */ - enabled: boolean - /** @description Installment plan selected for this PaymentIntent. */ - plan?: components['schemas']['payment_method_details_card_installments_plan'] | null - } - /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown } - /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown } - /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown } - /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown } - /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown } - /** payment_method_options_interac_present */ - payment_method_options_interac_present: { [key: string]: unknown } - /** payment_method_options_klarna */ - payment_method_options_klarna: { - /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ - preferred_locale?: string | null - } - /** payment_method_options_oxxo */ - payment_method_options_oxxo: { - /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ - expires_after_days: number - } - /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown } - /** payment_method_options_sofort */ - payment_method_options_sofort: { - /** - * @description Preferred language of the SOFORT authorization page that the customer is redirected to. - * @enum {string|null} - */ - preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null - } - /** payment_method_options_wechat_pay */ - payment_method_options_wechat_pay: { - /** @description The app ID registered with WeChat Pay. Only required when client is ios or android. */ - app_id?: string | null - /** - * @description The client type that the end customer will pay from - * @enum {string|null} - */ - client?: ('android' | 'ios' | 'web') | null - } - /** payment_method_oxxo */ - payment_method_oxxo: { [key: string]: unknown } - /** payment_method_p24 */ - payment_method_p24: { - /** - * @description The customer's bank, if provided. - * @enum {string|null} - */ - bank?: - | ( - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - ) - | null - } - /** payment_method_sepa_debit */ - payment_method_sepa_debit: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Branch code of bank associated with the bank account. */ - branch_code?: string | null - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string | null - /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ - fingerprint?: string | null - /** @description Information about the object that generated this PaymentMethod. */ - generated_from?: components['schemas']['sepa_debit_generated_from'] | null - /** @description Last four characters of the IBAN. */ - last4?: string | null - } - /** payment_method_sofort */ - payment_method_sofort: { - /** @description Two-letter ISO code representing the country the bank account is located in. */ - country?: string | null - } - /** payment_method_wechat_pay */ - payment_method_wechat_pay: { [key: string]: unknown } - /** PaymentPagesCheckoutSessionAfterExpiration */ - payment_pages_checkout_session_after_expiration: { - /** @description When set, configuration used to recover the Checkout Session on expiry. */ - recovery?: components['schemas']['payment_pages_checkout_session_after_expiration_recovery'] | null - } - /** PaymentPagesCheckoutSessionAfterExpirationRecovery */ - payment_pages_checkout_session_after_expiration_recovery: { - /** @description Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` */ - allow_promotion_codes: boolean - /** - * @description If `true`, a recovery url will be generated to recover this Checkout Session if it - * expires before a transaction is completed. It will be attached to the - * Checkout Session object upon expiration. - */ - enabled: boolean - /** - * Format: unix-time - * @description The timestamp at which the recovery URL will expire. - */ - expires_at?: number | null - /** @description URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session */ - url?: string | null - } - /** PaymentPagesCheckoutSessionAutomaticTax */ - payment_pages_checkout_session_automatic_tax: { - /** @description Indicates whether automatic tax is enabled for the session */ - enabled: boolean - /** - * @description The status of the most recent automated tax calculation for this session. - * @enum {string|null} - */ - status?: ('complete' | 'failed' | 'requires_location_inputs') | null - } - /** PaymentPagesCheckoutSessionConsent */ - payment_pages_checkout_session_consent: { - /** - * @description If `opt_in`, the customer consents to receiving promotional communications - * from the merchant about this Checkout Session. - * @enum {string|null} - */ - promotions?: ('opt_in' | 'opt_out') | null - } - /** PaymentPagesCheckoutSessionConsentCollection */ - payment_pages_checkout_session_consent_collection: { - /** - * @description If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - * Session will determine whether to display an option to opt into promotional communication - * from the merchant depending on the customer's locale. Only available to US merchants. - * @enum {string|null} - */ - promotions?: 'auto' | null - } - /** PaymentPagesCheckoutSessionCustomerDetails */ - payment_pages_checkout_session_customer_details: { - /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. - * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. - */ - email?: string | null - /** @description The customer's phone number at the time of checkout */ - phone?: string | null - /** - * @description The customer’s tax exempt status at time of checkout. - * @enum {string|null} - */ - tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ - tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null - } - /** PaymentPagesCheckoutSessionPhoneNumberCollection */ - payment_pages_checkout_session_phone_number_collection: { - /** @description Indicates whether phone number collection is enabled for the session */ - enabled: boolean - } - /** PaymentPagesCheckoutSessionShippingAddressCollection */ - payment_pages_checkout_session_shipping_address_collection: { - /** - * @description An array of two-letter ISO country codes representing which countries Checkout should provide as options for - * shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. - */ - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** PaymentPagesCheckoutSessionShippingOption */ - payment_pages_checkout_session_shipping_option: { - /** @description A non-negative integer in cents representing how much to charge. */ - shipping_amount: number - /** @description The shipping rate. */ - shipping_rate: string | components['schemas']['shipping_rate'] - } - /** PaymentPagesCheckoutSessionTaxID */ - payment_pages_checkout_session_tax_id: { - /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` - * @enum {string} - */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'unknown' - | 'us_ein' - | 'za_vat' - /** @description The value of the tax ID. */ - value?: string | null - } - /** PaymentPagesCheckoutSessionTaxIDCollection */ - payment_pages_checkout_session_tax_id_collection: { - /** @description Indicates whether tax ID collection is enabled for the session */ - enabled: boolean - } - /** PaymentPagesCheckoutSessionTotalDetails */ - payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ - amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ - amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ - amount_tax: number - breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] - } - /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ - payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ - discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ - taxes: components['schemas']['line_items_tax_amount'][] - } - /** Polymorphic */ - payment_source: - | components['schemas']['account'] - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - /** - * Payout - * @description A `Payout` object is created when you receive funds from Stripe, or when you - * initiate a payout to either a bank account or debit card of a [connected - * Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - * as well as list all payouts. Payouts are made on [varying - * schedules](/docs/connect/manage-payout-schedule), depending on your country and - * industry. - * - * Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). - */ - payout: { - /** @description Amount (in %s) to be transferred to your bank account or debit card. */ - amount: number - /** - * Format: unix-time - * @description Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. - */ - arrival_date: number - /** @description Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). */ - automatic: boolean - /** @description ID of the balance transaction that describes the impact of this payout on your account balance. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description ID of the bank account or card the payout was sent to. */ - destination?: - | ( - | string - | components['schemas']['bank_account'] - | components['schemas']['card'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_card'] - ) - | null - /** @description If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. */ - failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** @description Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. */ - failure_code?: string | null - /** @description Message to user further explaining reason for payout failure if available. */ - failure_message?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) */ - method: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'payout' - /** @description If the payout reverses another, this is the ID of the original payout. */ - original_payout?: (string | components['schemas']['payout']) | null - /** @description If the payout was reversed, this is the ID of the payout that reverses this payout. */ - reversed_by?: (string | components['schemas']['payout']) | null - /** @description The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ - source_type: string - /** @description Extra information about a payout to be displayed on the user's bank statement. */ - statement_descriptor?: string | null - /** @description Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. */ - status: string - /** - * @description Can be `bank_account` or `card`. - * @enum {string} - */ - type: 'bank_account' | 'card' - } - /** Period */ - period: { - /** - * Format: unix-time - * @description The end date of this usage period. All usage up to and including this point in time is included. - */ - end?: number | null - /** - * Format: unix-time - * @description The start date of this usage period. All usage after this point in time is included. - */ - start?: number | null - } - /** - * Person - * @description This is an object representing a person associated with a Stripe account. - * - * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. - * See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. - * - * Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). - */ - person: { - /** @description The account the person is associated with. */ - account: string - address?: components['schemas']['address'] - address_kana?: components['schemas']['legal_entity_japan_address'] | null - address_kanji?: components['schemas']['legal_entity_japan_address'] | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - dob?: components['schemas']['legal_entity_dob'] - /** @description The person's email address. */ - email?: string | null - /** @description The person's first name. */ - first_name?: string | null - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string | null - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string | null - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] - future_requirements?: components['schemas']['person_future_requirements'] | null - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description Whether the person's `id_number` was provided. */ - id_number_provided?: boolean - /** @description The person's last name. */ - last_name?: string | null - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string | null - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string | null - /** @description The person's maiden name. */ - maiden_name?: string | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** @description The country where the person is a national. */ - nationality?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'person' - /** @description The person's phone number. */ - phone?: string | null - /** - * @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - * @enum {string} - */ - political_exposure?: 'existing' | 'none' - relationship?: components['schemas']['person_relationship'] - requirements?: components['schemas']['person_requirements'] | null - /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ - ssn_last_4_provided?: boolean - verification?: components['schemas']['legal_entity_person_verification'] - } - /** PersonFutureRequirements */ - person_future_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. */ - currently_due: string[] - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors: components['schemas']['account_requirements_error'][] - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. */ - eventually_due: string[] - /** @description Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. */ - pending_verification: string[] - } - /** PersonRelationship */ - person_relationship: { - /** @description Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. */ - director?: boolean | null - /** @description Whether the person has significant responsibility to control, manage, or direct the organization. */ - executive?: boolean | null - /** @description Whether the person is an owner of the account’s legal entity. */ - owner?: boolean | null - /** @description The percent owned by the person of the account's legal entity. */ - percent_ownership?: number | null - /** @description Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. */ - representative?: boolean | null - /** @description The person's title (e.g., CEO, Support Engineer). */ - title?: string | null - } - /** PersonRequirements */ - person_requirements: { - /** @description Fields that are due and can be satisfied by providing the corresponding alternative fields instead. */ - alternatives?: components['schemas']['account_requirements_alternative'][] | null - /** @description Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. */ - currently_due: string[] - /** @description Fields that are `currently_due` and need to be collected again because validation or verification failed. */ - errors: components['schemas']['account_requirements_error'][] - /** @description Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. */ - eventually_due: string[] - /** @description Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. */ - past_due: string[] - /** @description Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. */ - pending_verification: string[] - } - /** - * Plan - * @description You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. - * - * Plans define the base price, currency, and billing cycle for recurring purchases of products. - * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. - * - * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. - * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). - */ - plan: { - /** @description Whether the plan can be used for new purchases. */ - active: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string|null} - */ - aggregate_usage?: ('last_during_period' | 'last_ever' | 'max' | 'sum') | null - /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ - amount?: number | null - /** - * Format: decimal - * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - */ - amount_decimal?: string | null - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme: 'per_unit' | 'tiered' - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ - interval_count: number - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'plan' - /** @description The product whose pricing this plan determines. */ - product?: (string | components['schemas']['product'] | components['schemas']['deleted_product']) | null - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: components['schemas']['plan_tier'][] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. - * @enum {string|null} - */ - tiers_mode?: ('graduated' | 'volume') | null - /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_usage?: components['schemas']['transform_usage'] | null - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number | null - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type: 'licensed' | 'metered' - } - /** PlanTier */ - plan_tier: { - /** @description Price for the entire tier. */ - flat_amount?: number | null - /** - * Format: decimal - * @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - */ - flat_amount_decimal?: string | null - /** @description Per unit price for units relevant to the tier. */ - unit_amount?: number | null - /** - * Format: decimal - * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - */ - unit_amount_decimal?: string | null - /** @description Up to and including to this quantity will be contained in the tier. */ - up_to?: number | null - } - /** PlatformTax */ - platform_tax_fee: { - /** @description The Connected account that incurred this charge. */ - account: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'platform_tax_fee' - /** @description The payment object that caused this tax to be inflicted. */ - source_transaction: string - /** @description The type of tax (VAT). */ - type: string - } - /** PortalBusinessProfile */ - portal_business_profile: { - /** @description The messaging shown to customers in the portal. */ - headline?: string | null - /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string - /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string - } - /** PortalCustomerUpdate */ - portal_customer_update: { - /** @description The types of customer updates that are supported. When empty, customers are not updateable. */ - allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] - /** @description Whether the feature is enabled. */ - enabled: boolean - } - /** PortalFeatures */ - portal_features: { - customer_update: components['schemas']['portal_customer_update'] - invoice_history: components['schemas']['portal_invoice_list'] - payment_method_update: components['schemas']['portal_payment_method_update'] - subscription_cancel: components['schemas']['portal_subscription_cancel'] - subscription_pause: components['schemas']['portal_subscription_pause'] - subscription_update: components['schemas']['portal_subscription_update'] - } - /** PortalInvoiceList */ - portal_invoice_list: { - /** @description Whether the feature is enabled. */ - enabled: boolean - } - /** PortalPaymentMethodUpdate */ - portal_payment_method_update: { - /** @description Whether the feature is enabled. */ - enabled: boolean - } - /** PortalSubscriptionCancel */ - portal_subscription_cancel: { - cancellation_reason: components['schemas']['portal_subscription_cancellation_reason'] - /** @description Whether the feature is enabled. */ - enabled: boolean - /** - * @description Whether to cancel subscriptions immediately or at the end of the billing period. - * @enum {string} - */ - mode: 'at_period_end' | 'immediately' - /** - * @description Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. - * @enum {string} - */ - proration_behavior: 'always_invoice' | 'create_prorations' | 'none' - } - /** PortalSubscriptionCancellationReason */ - portal_subscription_cancellation_reason: { - /** @description Whether the feature is enabled. */ - enabled: boolean - /** @description Which cancellation reasons will be given as options to the customer. */ - options: ('customer_service' | 'low_quality' | 'missing_features' | 'other' | 'switched_service' | 'too_complex' | 'too_expensive' | 'unused')[] - } - /** PortalSubscriptionPause */ - portal_subscription_pause: { - /** @description Whether the feature is enabled. */ - enabled: boolean - } - /** PortalSubscriptionUpdate */ - portal_subscription_update: { - /** @description The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. */ - default_allowed_updates: ('price' | 'promotion_code' | 'quantity')[] - /** @description Whether the feature is enabled. */ - enabled: boolean - /** @description The list of products that support subscription updates. */ - products?: components['schemas']['portal_subscription_update_product'][] | null - /** - * @description Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - * @enum {string} - */ - proration_behavior: 'always_invoice' | 'create_prorations' | 'none' - } - /** PortalSubscriptionUpdateProduct */ - portal_subscription_update_product: { - /** @description The list of price IDs which, when subscribed to, a subscription can be updated. */ - prices: string[] - /** @description The product ID. */ - product: string - } - /** - * Price - * @description Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - * [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. - * - * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. - * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). - */ - price: { - /** @description Whether the price can be used for new purchases. */ - active: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme: 'per_unit' | 'tiered' - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'price' - /** @description The ID of the product this price is associated with. */ - product: string | components['schemas']['product'] | components['schemas']['deleted_product'] - /** @description The recurring components of a price such as `interval` and `usage_type`. */ - recurring?: components['schemas']['recurring'] | null - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string|null} - */ - tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: components['schemas']['price_tier'][] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. - * @enum {string|null} - */ - tiers_mode?: ('graduated' | 'volume') | null - /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_quantity?: components['schemas']['transform_quantity'] | null - /** - * @description One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. - * @enum {string} - */ - type: 'one_time' | 'recurring' - /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ - unit_amount?: number | null - /** - * Format: decimal - * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - */ - unit_amount_decimal?: string | null - } - /** PriceTier */ - price_tier: { - /** @description Price for the entire tier. */ - flat_amount?: number | null - /** - * Format: decimal - * @description Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - */ - flat_amount_decimal?: string | null - /** @description Per unit price for units relevant to the tier. */ - unit_amount?: number | null - /** - * Format: decimal - * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - */ - unit_amount_decimal?: string | null - /** @description Up to and including to this quantity will be contained in the tier. */ - up_to?: number | null - } - /** - * Product - * @description Products describe the specific goods or services you offer to your customers. - * For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. - * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. - * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), - * [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), - * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), - * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) - */ - product: { - /** @description Whether the product is currently available for purchase. */ - active: boolean - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images: string[] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'product' - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: components['schemas']['package_dimensions'] | null - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean | null - /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ - statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: (string | components['schemas']['tax_code']) | null - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string | null - /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. - */ - updated: number - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string | null - } - /** - * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to - * create multiple codes for a single coupon. - */ - promotion_code: { - /** @description Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. */ - active: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. */ - code: string - coupon: components['schemas']['coupon'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The customer that this promotion code can be used by. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** - * Format: unix-time - * @description Date at which the promotion code can no longer be redeemed. - */ - expires_at?: number | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Maximum number of times this promotion code can be redeemed. */ - max_redemptions?: number | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'promotion_code' - restrictions: components['schemas']['promotion_codes_resource_restrictions'] - /** @description Number of times this promotion code has been used. */ - times_redeemed: number - } - /** PromotionCodesResourceRestrictions */ - promotion_codes_resource_restrictions: { - /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ - first_time_transaction: boolean - /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ - minimum_amount?: number | null - /** @description Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount */ - minimum_amount_currency?: string | null - } - /** - * Quote - * @description A Quote is a way to model prices that you'd like to provide to a customer. - * Once accepted, it will automatically create an invoice, subscription or subscription schedule. - */ - quote: { - /** @description Total before any discounts or taxes are applied. */ - amount_subtotal: number - /** @description Total after discounts and taxes are applied. */ - amount_total: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ - application_fee_amount?: number | null - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ - application_fee_percent?: number | null - automatic_tax: components['schemas']['quotes_resource_automatic_tax'] - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method: 'charge_automatically' | 'send_invoice' - computed: components['schemas']['quotes_resource_computed'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string | null - /** @description The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The tax rates applied to this quote. */ - default_tax_rates?: (string | components['schemas']['tax_rate'])[] - /** @description A description that will be displayed on the quote PDF. */ - description?: string | null - /** @description The discounts applied to this quote. */ - discounts: (string | components['schemas']['discount'])[] - /** - * Format: unix-time - * @description The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string | null - /** @description Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. */ - from_quote?: components['schemas']['quotes_resource_from_quote'] | null - /** @description A header that will be displayed on the quote PDF. */ - header?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description The invoice that was created from this quote. */ - invoice?: (string | components['schemas']['invoice'] | components['schemas']['deleted_invoice']) | null - /** @description All invoices will be billed using the specified settings. */ - invoice_settings?: components['schemas']['invoice_setting_quote_setting'] | null - /** - * QuotesResourceListLineItems - * @description A list of items the customer is being quoted for. - */ - line_items?: { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). */ - number?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'quote' - /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** - * @description The status of the quote. - * @enum {string} - */ - status: 'accepted' | 'canceled' | 'draft' | 'open' - status_transitions: components['schemas']['quotes_resource_status_transitions'] - /** @description The subscription that was created or updated from this quote. */ - subscription?: (string | components['schemas']['subscription']) | null - subscription_data: components['schemas']['quotes_resource_subscription_data'] - /** @description The subscription schedule that was created or updated from this quote. */ - subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null - total_details: components['schemas']['quotes_resource_total_details'] - /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ - transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null - } - /** QuotesResourceAutomaticTax */ - quotes_resource_automatic_tax: { - /** @description Automatically calculate taxes */ - enabled: boolean - /** - * @description The status of the most recent automated tax calculation for this quote. - * @enum {string|null} - */ - status?: ('complete' | 'failed' | 'requires_location_inputs') | null - } - /** QuotesResourceComputed */ - quotes_resource_computed: { - /** @description The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. */ - recurring?: components['schemas']['quotes_resource_recurring'] | null - upfront: components['schemas']['quotes_resource_upfront'] - } - /** QuotesResourceFromQuote */ - quotes_resource_from_quote: { - /** @description Whether this quote is a revision of a different quote. */ - is_revision: boolean - /** @description The quote that was cloned. */ - quote: string | components['schemas']['quote'] - } - /** QuotesResourceRecurring */ - quotes_resource_recurring: { - /** @description Total before any discounts or taxes are applied. */ - amount_subtotal: number - /** @description Total after discounts and taxes are applied. */ - amount_total: number - /** - * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ - interval_count: number - total_details: components['schemas']['quotes_resource_total_details'] - } - /** QuotesResourceStatusTransitions */ - quotes_resource_status_transitions: { - /** - * Format: unix-time - * @description The time that the quote was accepted. Measured in seconds since Unix epoch. - */ - accepted_at?: number | null - /** - * Format: unix-time - * @description The time that the quote was canceled. Measured in seconds since Unix epoch. - */ - canceled_at?: number | null - /** - * Format: unix-time - * @description The time that the quote was finalized. Measured in seconds since Unix epoch. - */ - finalized_at?: number | null - } - /** QuotesResourceSubscriptionData */ - quotes_resource_subscription_data: { - /** - * Format: unix-time - * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. - */ - effective_date?: number | null - /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ - trial_period_days?: number | null - } - /** QuotesResourceTotalDetails */ - quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ - amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ - amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ - amount_tax: number - breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] - } - /** QuotesResourceTotalDetailsResourceBreakdown */ - quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ - discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ - taxes: components['schemas']['line_items_tax_amount'][] - } - /** QuotesResourceTransferData */ - quotes_resource_transfer_data: { - /** @description The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. */ - amount?: number | null - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. */ - amount_percent?: number | null - /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: string | components['schemas']['account'] - } - /** QuotesResourceUpfront */ - quotes_resource_upfront: { - /** @description Total before any discounts or taxes are applied. */ - amount_subtotal: number - /** @description Total after discounts and taxes are applied. */ - amount_total: number - /** - * QuotesResourceListLineItems - * @description The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. - */ - line_items?: { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - total_details: components['schemas']['quotes_resource_total_details'] - } - /** RadarReviewResourceLocation */ - radar_review_resource_location: { - /** @description The city where the payment originated. */ - city?: string | null - /** @description Two-letter ISO code representing the country where the payment originated. */ - country?: string | null - /** @description The geographic latitude where the payment originated. */ - latitude?: number | null - /** @description The geographic longitude where the payment originated. */ - longitude?: number | null - /** @description The state/county/province/region where the payment originated. */ - region?: string | null - } - /** RadarReviewResourceSession */ - radar_review_resource_session: { - /** @description The browser used in this browser session (e.g., `Chrome`). */ - browser?: string | null - /** @description Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ - device?: string | null - /** @description The platform for the browser session (e.g., `Macintosh`). */ - platform?: string | null - /** @description The version for the browser session (e.g., `61.0.3163.100`). */ - version?: string | null - } - /** - * RadarEarlyFraudWarning - * @description An early fraud warning indicates that the card issuer has notified us that a - * charge may be fraudulent. - * - * Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). - */ - 'radar.early_fraud_warning': { - /** @description An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this early fraud warning is for, optionally expanded. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.early_fraud_warning' - /** @description ID of the Payment Intent this early fraud warning is for, optionally expanded. */ - payment_intent?: string | components['schemas']['payment_intent'] - } - /** - * RadarListList - * @description Value lists allow you to group values together which can then be referenced in rules. - * - * Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). - */ - 'radar.value_list': { - /** @description The name of the value list for use in rules. */ - alias: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The name or email address of the user who created this value list. */ - created_by: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. - * @enum {string} - */ - item_type: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' - /** - * RadarListListItemList - * @description List of items contained within this value list. - */ - list_items: { - /** @description Details about each object. */ - data: components['schemas']['radar.value_list_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The name of the value list. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list' - } - /** - * RadarListListItem - * @description Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. - * - * Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). - */ - 'radar.value_list_item': { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The name or email address of the user who added this item to the value list. */ - created_by: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'radar.value_list_item' - /** @description The value of the item. */ - value: string - /** @description The identifier of the value list this item belongs to. */ - value_list: string - } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: components['schemas']['bank_account'] | null - /** CardList */ - cards?: { - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: (string | components['schemas']['card']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - email?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: (string | components['schemas']['account']) | null - /** @description Full, legal name of the recipient. */ - name?: string | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'recipient' - rolled_back_from?: string | components['schemas']['account'] - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string - } - /** Recurring */ - recurring: { - /** - * @description Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string|null} - */ - aggregate_usage?: ('last_during_period' | 'last_ever' | 'max' | 'sum') | null - /** - * @description The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. */ - interval_count: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type: 'licensed' | 'metered' - } - /** - * Refund - * @description `Refund` objects allow you to refund a charge that has previously been created - * but not yet refunded. Funds will be refunded to the credit or debit card that - * was originally charged. - * - * Related guide: [Refunds](https://stripe.com/docs/refunds). - */ - refund: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** @description ID of the charge that was refunded. */ - charge?: (string | components['schemas']['charge']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ - description?: string - /** @description If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - failure_balance_transaction?: string | components['schemas']['balance_transaction'] - /** @description If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ - failure_reason?: string - /** @description Unique identifier for the object. */ - id: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'refund' - /** @description ID of the PaymentIntent that was refunded. */ - payment_intent?: (string | components['schemas']['payment_intent']) | null - /** - * @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). - * @enum {string|null} - */ - reason?: ('duplicate' | 'expired_uncaptured_charge' | 'fraudulent' | 'requested_by_customer') | null - /** @description This is the transaction number that appears on email receipts sent for this refund. */ - receipt_number?: string | null - /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ - source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ - status?: string | null - /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ - transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - } - /** - * reporting_report_run - * @description The Report Run object represents an instance of a report type generated with - * specific run parameters. Once the object is created, Stripe begins processing the report. - * When the report has finished running, it will give you a reference to a file - * where you can retrieve your results. For an overview, see - * [API Access to Reports](https://stripe.com/docs/reporting/statements/api). - * - * Note that certain report types can only be run based on your live-mode data (not test-mode - * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). - */ - 'reporting.report_run': { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * @description If something should go wrong during the run, a message about the failure (populated when - * `status=failed`). - */ - error?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description `true` if the report is run on live mode data and `false` if it is run on test mode data. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reporting.report_run' - parameters: components['schemas']['financial_reporting_finance_report_run_run_parameters'] - /** @description The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. */ - report_type: string - /** - * @description The file object representing the result of the report run (populated when - * `status=succeeded`). - */ - result?: components['schemas']['file'] | null - /** - * @description Status of this report run. This will be `pending` when the run is initially created. - * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. - * Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. - */ - status: string - /** - * Format: unix-time - * @description Timestamp at which this run successfully finished (populated when - * `status=succeeded`). Measured in seconds since the Unix epoch. - */ - succeeded_at?: number | null - } - /** - * reporting_report_type - * @description The Report Type resource corresponds to a particular type of report, such as - * the "Activity summary" or "Itemized payouts" reports. These objects are - * identified by an ID belonging to a set of enumerated values. See - * [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) - * for those Report Type IDs, along with required and optional parameters. - * - * Note that certain report types can only be run based on your live-mode data (not test-mode - * data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). - */ - 'reporting.report_type': { - /** - * Format: unix-time - * @description Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. - */ - data_available_end: number - /** - * Format: unix-time - * @description Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. - */ - data_available_start: number - /** @description List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) */ - default_columns?: string[] | null - /** @description The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Human-readable name of the Report Type */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reporting.report_type' - /** - * Format: unix-time - * @description When this Report Type was latest updated. Measured in seconds since the Unix epoch. - */ - updated: number - /** @description Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. */ - version: number - } - /** ReserveTransaction */ - reserve_transaction: { - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'reserve_transaction' - } - /** - * RadarReview - * @description Reviews can be used to supplement automated fraud detection with human expertise. - * - * Learn more about [Radar](/radar) and reviewing payments - * [here](https://stripe.com/docs/radar/reviews). - */ - review: { - /** @description The ZIP or postal code of the card used, if applicable. */ - billing_zip?: string | null - /** @description The charge associated with this review. */ - charge?: (string | components['schemas']['charge']) | null - /** - * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. - * @enum {string|null} - */ - closed_reason?: ('approved' | 'disputed' | 'redacted' | 'refunded' | 'refunded_as_fraud') | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description The IP address where the payment originated. */ - ip_address?: string | null - /** @description Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. */ - ip_address_location?: components['schemas']['radar_review_resource_location'] | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'review' - /** @description If `true`, the review needs action. */ - open: boolean - /** - * @description The reason the review was opened. One of `rule` or `manual`. - * @enum {string} - */ - opened_reason: 'manual' | 'rule' - /** @description The PaymentIntent ID associated with this review, if one exists. */ - payment_intent?: string | components['schemas']['payment_intent'] - /** @description The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. */ - reason: string - /** @description Information related to the browsing session of the user who initiated the payment. */ - session?: components['schemas']['radar_review_resource_session'] | null - } - /** RadarRule */ - rule: { - /** @description The action taken on the payment. */ - action: string - /** @description Unique identifier for the object. */ - id: string - /** @description The predicate to evaluate the payment against. */ - predicate: string - } - /** - * ScheduledQueryRun - * @description If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll - * receive a `sigma.scheduled_query_run.created` webhook each time the query - * runs. The webhook contains a `ScheduledQueryRun` object, which you can use to - * retrieve the query results. - */ - scheduled_query_run: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * Format: unix-time - * @description When the query was run, Sigma contained a snapshot of your Stripe data at this time. - */ - data_load_time: number - error?: components['schemas']['sigma_scheduled_query_run_error'] - /** @description The file object representing the results of the query. */ - file?: components['schemas']['file'] | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'scheduled_query_run' - /** - * Format: unix-time - * @description Time at which the result expires and is no longer available for download. - */ - result_available_until: number - /** @description SQL for the query. */ - sql: string - /** @description The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ - status: string - /** @description Title of the query. */ - title: string - } - /** SchedulesPhaseAutomaticTax */ - schedules_phase_automatic_tax: { - /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ - enabled: boolean - } - /** sepa_debit_generated_from */ - sepa_debit_generated_from: { - /** @description The ID of the Charge that generated this PaymentMethod, if any. */ - charge?: (string | components['schemas']['charge']) | null - /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ - setup_attempt?: (string | components['schemas']['setup_attempt']) | null - } - /** - * PaymentFlowsSetupIntentSetupAttempt - * @description A SetupAttempt describes one attempted confirmation of a SetupIntent, - * whether that confirmation was successful or unsuccessful. You can use - * SetupAttempts to inspect details of a specific attempt at setting up a - * payment method using a SetupIntent. - */ - setup_attempt: { - /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ - application?: (string | components['schemas']['application']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'setup_attempt' - /** @description The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the payment method used with this SetupAttempt. */ - payment_method: string | components['schemas']['payment_method'] - payment_method_details: components['schemas']['setup_attempt_payment_method_details'] - /** @description The error encountered during this attempt to confirm the SetupIntent, if any. */ - setup_error?: components['schemas']['api_errors'] | null - /** @description ID of the SetupIntent that this attempt belongs to. */ - setup_intent: string | components['schemas']['setup_intent'] - /** @description Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. */ - status: string - /** @description The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. */ - usage: string - } - /** SetupAttemptPaymentMethodDetails */ - setup_attempt_payment_method_details: { - acss_debit?: components['schemas']['setup_attempt_payment_method_details_acss_debit'] - au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] - bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] - bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] - boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] - card?: components['schemas']['setup_attempt_payment_method_details_card'] - card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] - ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] - sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] - sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] - /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ - type: string - } - /** setup_attempt_payment_method_details_acss_debit */ - setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } - /** setup_attempt_payment_method_details_au_becs_debit */ - setup_attempt_payment_method_details_au_becs_debit: { [key: string]: unknown } - /** setup_attempt_payment_method_details_bacs_debit */ - setup_attempt_payment_method_details_bacs_debit: { [key: string]: unknown } - /** setup_attempt_payment_method_details_bancontact */ - setup_attempt_payment_method_details_bancontact: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Preferred language of the Bancontact authorization page that the customer is redirected to. - * Can be one of `en`, `de`, `fr`, or `nl` - * @enum {string|null} - */ - preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null - /** - * @description Owner's verified full name. Values are verified or provided by Bancontact directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** setup_attempt_payment_method_details_boleto */ - setup_attempt_payment_method_details_boleto: { [key: string]: unknown } - /** setup_attempt_payment_method_details_card */ - setup_attempt_payment_method_details_card: { - /** @description Populated if this authorization used 3D Secure authentication. */ - three_d_secure?: components['schemas']['three_d_secure_details'] | null - } - /** setup_attempt_payment_method_details_card_present */ - setup_attempt_payment_method_details_card_present: { - /** @description The ID of the Card PaymentMethod which was generated by this SetupAttempt. */ - generated_card?: (string | components['schemas']['payment_method']) | null - } - /** setup_attempt_payment_method_details_ideal */ - setup_attempt_payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** setup_attempt_payment_method_details_sepa_debit */ - setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } - /** setup_attempt_payment_method_details_sofort */ - setup_attempt_payment_method_details_sofort: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Preferred language of the Sofort authorization page that the customer is redirected to. - * Can be one of `en`, `de`, `fr`, or `nl` - * @enum {string|null} - */ - preferred_language?: ('de' | 'en' | 'fr' | 'nl') | null - /** - * @description Owner's verified full name. Values are verified or provided by Sofort directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - */ - verified_name?: string | null - } - /** - * SetupIntent - * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - * For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - * Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - * - * Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - * Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - * The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides - * you through the setup process. - * - * Successful SetupIntents result in payment credentials that are optimized for future payments. - * For example, cardholders in [certain regions](/guides/strong-customer-authentication) may need to be run through - * [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection - * in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - * If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success, - * it will automatically attach the resulting payment method to that Customer. - * We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - * PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods. - * - * By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - * even as regulations change over time. - * - * Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). - */ - setup_intent: { - /** @description ID of the Connect application that created the SetupIntent. */ - application?: (string | components['schemas']['application']) | null - /** - * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. - * @enum {string|null} - */ - cancellation_reason?: ('abandoned' | 'duplicate' | 'requested_by_customer') | null - /** - * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. - * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - */ - client_secret?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description The error encountered in the previous SetupIntent confirmation. */ - last_setup_error?: components['schemas']['api_errors'] | null - /** @description The most recent SetupAttempt for this SetupIntent. */ - latest_attempt?: (string | components['schemas']['setup_attempt']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description ID of the multi use Mandate generated by the SetupIntent. */ - mandate?: (string | components['schemas']['mandate']) | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** @description If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ - next_action?: components['schemas']['setup_intent_next_action'] | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'setup_intent' - /** @description The account (if any) for which the setup is intended. */ - on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the payment method used with this SetupIntent. */ - payment_method?: (string | components['schemas']['payment_method']) | null - /** @description Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: components['schemas']['setup_intent_payment_method_options'] | null - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ - payment_method_types: string[] - /** @description ID of the single_use Mandate generated by the SetupIntent. */ - single_use_mandate?: (string | components['schemas']['mandate']) | null - /** - * @description [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. - * @enum {string} - */ - status: 'canceled' | 'processing' | 'requires_action' | 'requires_confirmation' | 'requires_payment_method' | 'succeeded' - /** - * @description Indicates how the payment method is intended to be used in the future. - * - * Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. - */ - usage: string - } - /** SetupIntentNextAction */ - setup_intent_next_action: { - redirect_to_url?: components['schemas']['setup_intent_next_action_redirect_to_url'] - /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ - type: string - /** @description When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. */ - use_stripe_sdk?: { [key: string]: unknown } - verify_with_microdeposits?: components['schemas']['setup_intent_next_action_verify_with_microdeposits'] - } - /** SetupIntentNextActionRedirectToUrl */ - setup_intent_next_action_redirect_to_url: { - /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ - return_url?: string | null - /** @description The URL you must redirect your customer to in order to authenticate. */ - url?: string | null - } - /** SetupIntentNextActionVerifyWithMicrodeposits */ - setup_intent_next_action_verify_with_microdeposits: { - /** - * Format: unix-time - * @description The timestamp when the microdeposits are expected to land. - */ - arrival_date: number - /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ - hosted_verification_url: string - } - /** SetupIntentPaymentMethodOptions */ - setup_intent_payment_method_options: { - acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] - card?: components['schemas']['setup_intent_payment_method_options_card'] - sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] - } - /** setup_intent_payment_method_options_acss_debit */ - setup_intent_payment_method_options_acss_debit: { - /** - * @description Currency supported by the bank account - * @enum {string|null} - */ - currency?: ('cad' | 'usd') | null - mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_acss_debit'] - /** - * @description Bank account verification method. - * @enum {string} - */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_payment_method_options_card */ - setup_intent_payment_method_options_card: { - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string|null} - */ - request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null - } - /** setup_intent_payment_method_options_mandate_options_acss_debit */ - setup_intent_payment_method_options_mandate_options_acss_debit: { - /** @description A URL for custom mandate text */ - custom_mandate_url?: string - /** @description List of Stripe products where this mandate can be selected automatically. */ - default_for?: ('invoice' | 'subscription')[] - /** @description Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ - interval_description?: string | null - /** - * @description Payment schedule for the mandate. - * @enum {string|null} - */ - payment_schedule?: ('combined' | 'interval' | 'sporadic') | null - /** - * @description Transaction type of the mandate. - * @enum {string|null} - */ - transaction_type?: ('business' | 'personal') | null - } - /** setup_intent_payment_method_options_mandate_options_sepa_debit */ - setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } - /** setup_intent_payment_method_options_sepa_debit */ - setup_intent_payment_method_options_sepa_debit: { - mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] - } - /** Shipping */ - shipping: { - address?: components['schemas']['address'] - /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ - carrier?: string | null - /** @description Recipient name. */ - name?: string | null - /** @description Recipient phone (including extension). */ - phone?: string | null - /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ - tracking_number?: string | null - } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: components['schemas']['delivery_estimate'] | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } - /** - * ShippingRate - * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. - */ - shipping_rate: { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active: boolean - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - delivery_estimate?: components['schemas']['shipping_rate_delivery_estimate'] | null - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name?: string | null - fixed_amount?: components['schemas']['shipping_rate_fixed_amount'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'shipping_rate' - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string|null} - */ - tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: (string | components['schemas']['tax_code']) | null - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type: 'fixed_amount' - } - /** ShippingRateDeliveryEstimate */ - shipping_rate_delivery_estimate: { - /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ - maximum?: components['schemas']['shipping_rate_delivery_estimate_bound'] | null - /** @description The lower bound of the estimated range. If empty, represents no lower bound. */ - minimum?: components['schemas']['shipping_rate_delivery_estimate_bound'] | null - } - /** ShippingRateDeliveryEstimateBound */ - shipping_rate_delivery_estimate_bound: { - /** - * @description A unit of time. - * @enum {string} - */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - /** @description Must be greater than 0. */ - value: number - } - /** ShippingRateFixedAmount */ - shipping_rate_fixed_amount: { - /** @description A non-negative integer in cents representing how much to charge. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - } - /** SigmaScheduledQueryRunError */ - sigma_scheduled_query_run_error: { - /** @description Information about the run failure. */ - message: string - } - /** - * Sku - * @description Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). - * SKUs describe specific product variations, taking into account any combination of: attributes, - * currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents - * the `size: large`, `color: red` version of that shirt. - * - * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). - */ - sku: { - /** @description Whether the SKU is available for purchase. */ - active: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes: { [key: string]: string } - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string | null - inventory: components['schemas']['sku_inventory'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'sku' - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: components['schemas']['package_dimensions'] | null - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. The product must be currently active. */ - product: string | components['schemas']['product'] - /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. - */ - updated: number - } - /** SKUInventory */ - sku_inventory: { - /** @description The count of inventory available. Will be present if and only if `type` is `finite`. */ - quantity?: number | null - /** @description Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`. */ - type: string - /** @description An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - value?: string | null - } - /** - * Source - * @description `Source` objects allow you to accept a variety of payment methods. They - * represent a customer's payment instrument, and can be used with the Stripe API - * just like a `Card` object: once chargeable, they can be charged, or can be - * attached to customers. - * - * Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). - */ - source: { - ach_credit_transfer?: components['schemas']['source_type_ach_credit_transfer'] - ach_debit?: components['schemas']['source_type_ach_debit'] - acss_debit?: components['schemas']['source_type_acss_debit'] - alipay?: components['schemas']['source_type_alipay'] - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. */ - amount?: number | null - au_becs_debit?: components['schemas']['source_type_au_becs_debit'] - bancontact?: components['schemas']['source_type_bancontact'] - card?: components['schemas']['source_type_card'] - card_present?: components['schemas']['source_type_card_present'] - /** @description The client secret of the source. Used for client-side retrieval using a publishable key. */ - client_secret: string - code_verification?: components['schemas']['source_code_verification_flow'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. */ - currency?: string | null - /** @description The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. */ - customer?: string - eps?: components['schemas']['source_type_eps'] - /** @description The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ - flow: string - giropay?: components['schemas']['source_type_giropay'] - /** @description Unique identifier for the object. */ - id: string - ideal?: components['schemas']['source_type_ideal'] - klarna?: components['schemas']['source_type_klarna'] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - multibanco?: components['schemas']['source_type_multibanco'] - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source' - /** @description Information about the owner of the payment instrument that may be used or required by particular source types. */ - owner?: components['schemas']['source_owner'] | null - p24?: components['schemas']['source_type_p24'] - receiver?: components['schemas']['source_receiver_flow'] - redirect?: components['schemas']['source_redirect_flow'] - sepa_debit?: components['schemas']['source_type_sepa_debit'] - sofort?: components['schemas']['source_type_sofort'] - source_order?: components['schemas']['source_order'] - /** @description Extra information about a source. This will appear on your customer's statement every time you charge the source. */ - statement_descriptor?: string | null - /** @description The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. */ - status: string - three_d_secure?: components['schemas']['source_type_three_d_secure'] - /** - * @description The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. - * @enum {string} - */ - type: - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'alipay' - | 'au_becs_debit' - | 'bancontact' - | 'card' - | 'card_present' - | 'eps' - | 'giropay' - | 'ideal' - | 'klarna' - | 'multibanco' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'three_d_secure' - | 'wechat' - /** @description Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. */ - usage?: string | null - wechat?: components['schemas']['source_type_wechat'] - } - /** SourceCodeVerificationFlow */ - source_code_verification_flow: { - /** @description The number of attempts remaining to authenticate the source object with a verification code. */ - attempts_remaining: number - /** @description The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). */ - status: string - } - /** - * SourceMandateNotification - * @description Source mandate notifications should be created when a notification related to - * a source mandate must be sent to the payer. They will trigger a webhook or - * deliver an email to the customer. - */ - source_mandate_notification: { - acss_debit?: components['schemas']['source_mandate_notification_acss_debit_data'] - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. */ - amount?: number | null - bacs_debit?: components['schemas']['source_mandate_notification_bacs_debit_data'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source_mandate_notification' - /** @description The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. */ - reason: string - sepa_debit?: components['schemas']['source_mandate_notification_sepa_debit_data'] - source: components['schemas']['source'] - /** @description The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ - status: string - /** @description The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. */ - type: string - } - /** SourceMandateNotificationAcssDebitData */ - source_mandate_notification_acss_debit_data: { - /** @description The statement descriptor associate with the debit. */ - statement_descriptor?: string - } - /** SourceMandateNotificationBacsDebitData */ - source_mandate_notification_bacs_debit_data: { - /** @description Last 4 digits of the account number associated with the debit. */ - last4?: string - } - /** SourceMandateNotificationSepaDebitData */ - source_mandate_notification_sepa_debit_data: { - /** @description SEPA creditor ID. */ - creditor_identifier?: string - /** @description Last 4 digits of the account number associated with the debit. */ - last4?: string - /** @description Mandate reference associated with the debit. */ - mandate_reference?: string - } - /** SourceOrder */ - source_order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description List of items constituting the order. */ - items?: components['schemas']['source_order_item'][] | null - shipping?: components['schemas']['shipping'] - } - /** SourceOrderItem */ - source_order_item: { - /** @description The amount (price) for this order item. */ - amount?: number | null - /** @description This currency of this order item. Required when `amount` is present. */ - currency?: string | null - /** @description Human-readable description for this order item. */ - description?: string | null - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: string | null - /** @description The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ - quantity?: number - /** @description The type of this order item. Must be `sku`, `tax`, or `shipping`. */ - type?: string | null - } - /** SourceOwner */ - source_owner: { - /** @description Owner's address. */ - address?: components['schemas']['address'] | null - /** @description Owner's email address. */ - email?: string | null - /** @description Owner's full name. */ - name?: string | null - /** @description Owner's phone number (including extension). */ - phone?: string | null - /** @description Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_address?: components['schemas']['address'] | null - /** @description Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_email?: string | null - /** @description Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_name?: string | null - /** @description Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_phone?: string | null - } - /** SourceReceiverFlow */ - source_receiver_flow: { - /** @description The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ - address?: string | null - /** @description The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. */ - amount_charged: number - /** @description The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. */ - amount_received: number - /** @description The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ - amount_returned: number - /** @description Type of refund attribute method, one of `email`, `manual`, or `none`. */ - refund_attributes_method: string - /** @description Type of refund attribute status, one of `missing`, `requested`, or `available`. */ - refund_attributes_status: string - } - /** SourceRedirectFlow */ - source_redirect_flow: { - /** @description The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. */ - failure_reason?: string | null - /** @description The URL you provide to redirect the customer to after they authenticated their payment. */ - return_url: string - /** @description The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). */ - status: string - /** @description The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ - url: string - } - /** - * SourceTransaction - * @description Some payment methods have no required amount that a customer must send. - * Customers can be instructed to send any amount, and it can be made up of - * multiple transactions. As such, sources can have multiple associated - * transactions. - */ - source_transaction: { - ach_credit_transfer?: components['schemas']['source_transaction_ach_credit_transfer_data'] - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. */ - amount: number - chf_credit_transfer?: components['schemas']['source_transaction_chf_credit_transfer_data'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - gbp_credit_transfer?: components['schemas']['source_transaction_gbp_credit_transfer_data'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'source_transaction' - paper_check?: components['schemas']['source_transaction_paper_check_data'] - sepa_credit_transfer?: components['schemas']['source_transaction_sepa_credit_transfer_data'] - /** @description The ID of the source this transaction is attached to. */ - source: string - /** @description The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ - status: string - /** - * @description The type of source this transaction is attached to. - * @enum {string} - */ - type: - | 'ach_credit_transfer' - | 'ach_debit' - | 'alipay' - | 'bancontact' - | 'card' - | 'card_present' - | 'eps' - | 'giropay' - | 'ideal' - | 'klarna' - | 'multibanco' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'three_d_secure' - | 'wechat' - } - /** SourceTransactionAchCreditTransferData */ - source_transaction_ach_credit_transfer_data: { - /** @description Customer data associated with the transfer. */ - customer_data?: string - /** @description Bank account fingerprint associated with the transfer. */ - fingerprint?: string - /** @description Last 4 digits of the account number associated with the transfer. */ - last4?: string - /** @description Routing number associated with the transfer. */ - routing_number?: string - } - /** SourceTransactionChfCreditTransferData */ - source_transaction_chf_credit_transfer_data: { - /** @description Reference associated with the transfer. */ - reference?: string - /** @description Sender's country address. */ - sender_address_country?: string - /** @description Sender's line 1 address. */ - sender_address_line1?: string - /** @description Sender's bank account IBAN. */ - sender_iban?: string - /** @description Sender's name. */ - sender_name?: string - } - /** SourceTransactionGbpCreditTransferData */ - source_transaction_gbp_credit_transfer_data: { - /** @description Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ - fingerprint?: string - /** @description The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. */ - funding_method?: string - /** @description Last 4 digits of sender account number associated with the transfer. */ - last4?: string - /** @description Sender entered arbitrary information about the transfer. */ - reference?: string - /** @description Sender account number associated with the transfer. */ - sender_account_number?: string - /** @description Sender name associated with the transfer. */ - sender_name?: string - /** @description Sender sort code associated with the transfer. */ - sender_sort_code?: string - } - /** SourceTransactionPaperCheckData */ - source_transaction_paper_check_data: { - /** @description Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ - available_at?: string - /** @description Comma-separated list of invoice IDs associated with the paper check. */ - invoices?: string - } - /** SourceTransactionSepaCreditTransferData */ - source_transaction_sepa_credit_transfer_data: { - /** @description Reference associated with the transfer. */ - reference?: string - /** @description Sender's bank account IBAN. */ - sender_iban?: string - /** @description Sender's name. */ - sender_name?: string - } - source_type_ach_credit_transfer: { - account_number?: string | null - bank_name?: string | null - fingerprint?: string | null - refund_account_holder_name?: string | null - refund_account_holder_type?: string | null - refund_routing_number?: string | null - routing_number?: string | null - swift_code?: string | null - } - source_type_ach_debit: { - bank_name?: string | null - country?: string | null - fingerprint?: string | null - last4?: string | null - routing_number?: string | null - type?: string | null - } - source_type_acss_debit: { - bank_address_city?: string | null - bank_address_line_1?: string | null - bank_address_line_2?: string | null - bank_address_postal_code?: string | null - bank_name?: string | null - category?: string | null - country?: string | null - fingerprint?: string | null - last4?: string | null - routing_number?: string | null - } - source_type_alipay: { - data_string?: string | null - native_url?: string | null - statement_descriptor?: string | null - } - source_type_au_becs_debit: { - bsb_number?: string | null - fingerprint?: string | null - last4?: string | null - } - source_type_bancontact: { - bank_code?: string | null - bank_name?: string | null - bic?: string | null - iban_last4?: string | null - preferred_language?: string | null - statement_descriptor?: string | null - } - source_type_card: { - address_line1_check?: string | null - address_zip_check?: string | null - brand?: string | null - country?: string | null - cvc_check?: string | null - dynamic_last4?: string | null - exp_month?: number | null - exp_year?: number | null - fingerprint?: string - funding?: string | null - last4?: string | null - name?: string | null - three_d_secure?: string - tokenization_method?: string | null - } - source_type_card_present: { - application_cryptogram?: string - application_preferred_name?: string - authorization_code?: string | null - authorization_response_code?: string - brand?: string | null - country?: string | null - cvm_type?: string - data_type?: string | null - dedicated_file_name?: string - emv_auth_data?: string - evidence_customer_signature?: string | null - evidence_transaction_certificate?: string | null - exp_month?: number | null - exp_year?: number | null - fingerprint?: string - funding?: string | null - last4?: string | null - pos_device_id?: string | null - pos_entry_mode?: string - read_method?: string | null - reader?: string | null - terminal_verification_results?: string - transaction_status_information?: string - } - source_type_eps: { - reference?: string | null - statement_descriptor?: string | null - } - source_type_giropay: { - bank_code?: string | null - bank_name?: string | null - bic?: string | null - statement_descriptor?: string | null - } - source_type_ideal: { - bank?: string | null - bic?: string | null - iban_last4?: string | null - statement_descriptor?: string | null - } - source_type_klarna: { - background_image_url?: string - client_token?: string | null - first_name?: string - last_name?: string - locale?: string - logo_url?: string - page_title?: string - pay_later_asset_urls_descriptive?: string - pay_later_asset_urls_standard?: string - pay_later_name?: string - pay_later_redirect_url?: string - pay_now_asset_urls_descriptive?: string - pay_now_asset_urls_standard?: string - pay_now_name?: string - pay_now_redirect_url?: string - pay_over_time_asset_urls_descriptive?: string - pay_over_time_asset_urls_standard?: string - pay_over_time_name?: string - pay_over_time_redirect_url?: string - payment_method_categories?: string - purchase_country?: string - purchase_type?: string - redirect_url?: string - shipping_delay?: number - shipping_first_name?: string - shipping_last_name?: string - } - source_type_multibanco: { - entity?: string | null - reference?: string | null - refund_account_holder_address_city?: string | null - refund_account_holder_address_country?: string | null - refund_account_holder_address_line1?: string | null - refund_account_holder_address_line2?: string | null - refund_account_holder_address_postal_code?: string | null - refund_account_holder_address_state?: string | null - refund_account_holder_name?: string | null - refund_iban?: string | null - } - source_type_p24: { - reference?: string | null - } - source_type_sepa_debit: { - bank_code?: string | null - branch_code?: string | null - country?: string | null - fingerprint?: string | null - last4?: string | null - mandate_reference?: string | null - mandate_url?: string | null - } - source_type_sofort: { - bank_code?: string | null - bank_name?: string | null - bic?: string | null - country?: string | null - iban_last4?: string | null - preferred_language?: string | null - statement_descriptor?: string | null - } - source_type_three_d_secure: { - address_line1_check?: string | null - address_zip_check?: string | null - authenticated?: boolean | null - brand?: string | null - card?: string | null - country?: string | null - customer?: string | null - cvc_check?: string | null - dynamic_last4?: string | null - exp_month?: number | null - exp_year?: number | null - fingerprint?: string - funding?: string | null - last4?: string | null - name?: string | null - three_d_secure?: string - tokenization_method?: string | null - } - source_type_wechat: { - prepay_id?: string - qr_code_url?: string | null - statement_descriptor?: string - } - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null - } - /** - * Subscription - * @description Subscriptions allow you to charge a customer on a recurring basis. - * - * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). - */ - subscription: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ - application_fee_percent?: number | null - automatic_tax: components['schemas']['subscription_automatic_tax'] - /** - * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null - /** - * Format: unix-time - * @description A date in the future at which the subscription will automatically get canceled - */ - cancel_at?: number | null - /** @description If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. */ - cancel_at_period_end: boolean - /** - * Format: unix-time - * @description If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. - */ - canceled_at?: number | null - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string} - */ - collection_method: 'charge_automatically' | 'send_invoice' - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** - * Format: unix-time - * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. - */ - current_period_end: number - /** - * Format: unix-time - * @description Start of the current period that the subscription has been invoiced for. - */ - current_period_start: number - /** @description ID of the customer who owns the subscription. */ - customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] - /** @description Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. */ - days_until_due?: number | null - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: (string | components['schemas']['payment_method']) | null - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: components['schemas']['tax_rate'][] | null - /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ - discount?: components['schemas']['discount'] | null - /** - * Format: unix-time - * @description If the subscription has ended, the date the subscription ended. - */ - ended_at?: number | null - /** @description Unique identifier for the object. */ - id: string - /** - * SubscriptionItemList - * @description List of subscription items, each with an attached price. - */ - items: { - /** @description Details about each object. */ - data: components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description The most recent invoice this subscription has generated. */ - latest_invoice?: (string | components['schemas']['invoice']) | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * Format: unix-time - * @description Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. - */ - next_pending_invoice_item_invoice?: number | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription' - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: components['schemas']['subscriptions_resource_pause_collection'] | null - /** @description Payment settings passed on to invoices created by the subscription. */ - payment_settings?: components['schemas']['subscriptions_resource_payment_settings'] | null - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: components['schemas']['subscription_pending_invoice_item_interval'] | null - /** @description You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). */ - pending_setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. */ - pending_update?: components['schemas']['subscriptions_resource_pending_update'] | null - /** @description The schedule attached to the subscription */ - schedule?: (string | components['schemas']['subscription_schedule']) | null - /** - * Format: unix-time - * @description Date when the subscription was first created. The date might differ from the `created` date due to backdating. - */ - start_date: number - /** - * @description Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. - * - * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. - * - * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. - * - * If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. - * - * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. - * @enum {string} - */ - status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: components['schemas']['subscription_transfer_data'] | null - /** - * Format: unix-time - * @description If the subscription has a trial, the end of that trial. - */ - trial_end?: number | null - /** - * Format: unix-time - * @description If the subscription has a trial, the beginning of that trial. - */ - trial_start?: number | null - } - /** SubscriptionAutomaticTax */ - subscription_automatic_tax: { - /** @description Whether Stripe automatically computes tax on this subscription. */ - enabled: boolean - } - /** SubscriptionBillingThresholds */ - subscription_billing_thresholds: { - /** @description Monetary threshold that triggers the subscription to create an invoice */ - amount_gte?: number | null - /** @description Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. */ - reset_billing_cycle_anchor?: boolean | null - } - /** - * SubscriptionItem - * @description Subscription items allow you to create customer subscriptions with more than - * one plan, making it easy to represent complex billing relationships. - */ - subscription_item: { - /** @description Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: components['schemas']['subscription_item_billing_thresholds'] | null - /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_item' - price: components['schemas']['price'] - /** @description The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ - quantity?: number - /** @description The `subscription` this `subscription_item` belongs to. */ - subscription: string - /** @description The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. */ - tax_rates?: components['schemas']['tax_rate'][] | null - } - /** SubscriptionItemBillingThresholds */ - subscription_item_billing_thresholds: { - /** @description Usage threshold that triggers the subscription to create an invoice */ - usage_gte?: number | null - } - /** subscription_payment_method_options_card */ - subscription_payment_method_options_card: { - mandate_options?: components['schemas']['invoice_mandate_options_card'] - /** - * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - * @enum {string|null} - */ - request_three_d_secure?: ('any' | 'automatic') | null - } - /** SubscriptionPendingInvoiceItemInterval */ - subscription_pending_invoice_item_interval: { - /** - * @description Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count: number - } - /** - * SubscriptionSchedule - * @description A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. - * - * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). - */ - subscription_schedule: { - /** - * Format: unix-time - * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - */ - canceled_at?: number | null - /** - * Format: unix-time - * @description Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. - */ - completed_at?: number | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ - current_phase?: components['schemas']['subscription_schedule_current_phase'] | null - /** @description ID of the customer who owns the subscription schedule. */ - customer: string | components['schemas']['customer'] | components['schemas']['deleted_customer'] - default_settings: components['schemas']['subscription_schedules_resource_default_settings'] - /** - * @description Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`. - * @enum {string} - */ - end_behavior: 'cancel' | 'none' | 'release' | 'renew' - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'subscription_schedule' - /** @description Configuration for the subscription schedule's phases. */ - phases: components['schemas']['subscription_schedule_phase_configuration'][] - /** - * Format: unix-time - * @description Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. - */ - released_at?: number | null - /** @description ID of the subscription once managed by the subscription schedule (if it is released). */ - released_subscription?: string | null - /** - * @description The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). - * @enum {string} - */ - status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' - /** @description ID of the subscription managed by the subscription schedule. */ - subscription?: (string | components['schemas']['subscription']) | null - } - /** - * SubscriptionScheduleAddInvoiceItem - * @description An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. - */ - subscription_schedule_add_invoice_item: { - /** @description ID of the price used to generate the invoice item. */ - price: string | components['schemas']['price'] | components['schemas']['deleted_price'] - /** @description The quantity of the invoice item. */ - quantity?: number | null - /** @description The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. */ - tax_rates?: components['schemas']['tax_rate'][] | null - } - /** - * SubscriptionScheduleConfigurationItem - * @description A phase item describes the price and quantity of a phase. - */ - subscription_schedule_configuration_item: { - /** @description Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: components['schemas']['subscription_item_billing_thresholds'] | null - /** @description ID of the price to which the customer should be subscribed. */ - price: string | components['schemas']['price'] | components['schemas']['deleted_price'] - /** @description Quantity of the plan to which the customer should be subscribed. */ - quantity?: number - /** @description The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. */ - tax_rates?: components['schemas']['tax_rate'][] | null - } - /** SubscriptionScheduleCurrentPhase */ - subscription_schedule_current_phase: { - /** - * Format: unix-time - * @description The end of this phase of the subscription schedule. - */ - end_date: number - /** - * Format: unix-time - * @description The start of this phase of the subscription schedule. - */ - start_date: number - } - /** - * SubscriptionSchedulePhaseConfiguration - * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. - */ - subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ - add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ - application_fee_percent?: number | null - automatic_tax?: components['schemas']['schedules_phase_automatic_tax'] - /** - * @description Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string|null} - */ - billing_cycle_anchor?: ('automatic' | 'phase_start') | null - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string|null} - */ - collection_method?: ('charge_automatically' | 'send_invoice') | null - /** @description ID of the coupon to use during this phase of the subscription schedule. */ - coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null - /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: (string | components['schemas']['payment_method']) | null - /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ - default_tax_rates?: components['schemas']['tax_rate'][] | null - /** - * Format: unix-time - * @description The end of this phase of the subscription schedule. - */ - end_date: number - /** @description The invoice settings applicable during this phase. */ - invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null - /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ - items: components['schemas']['subscription_schedule_configuration_item'][] - /** - * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. - * @enum {string} - */ - proration_behavior: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description The start of this phase of the subscription schedule. - */ - start_date: number - /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: components['schemas']['subscription_transfer_data'] | null - /** - * Format: unix-time - * @description When the trial ends within the phase. - */ - trial_end?: number | null - } - /** SubscriptionSchedulesResourceDefaultSettings */ - subscription_schedules_resource_default_settings: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ - application_fee_percent?: number | null - automatic_tax?: components['schemas']['subscription_schedules_resource_default_settings_automatic_tax'] - /** - * @description Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor: 'automatic' | 'phase_start' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: components['schemas']['subscription_billing_thresholds'] | null - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. - * @enum {string|null} - */ - collection_method?: ('charge_automatically' | 'send_invoice') | null - /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ - default_payment_method?: (string | components['schemas']['payment_method']) | null - /** @description The subscription schedule's default invoice settings. */ - invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null - /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: components['schemas']['subscription_transfer_data'] | null - } - /** SubscriptionSchedulesResourceDefaultSettingsAutomaticTax */ - subscription_schedules_resource_default_settings_automatic_tax: { - /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ - enabled: boolean - } - /** SubscriptionTransferData */ - subscription_transfer_data: { - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ - amount_percent?: number | null - /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: string | components['schemas']['account'] - } - /** - * SubscriptionsResourcePauseCollection - * @description The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription - * should be paused. - */ - subscriptions_resource_pause_collection: { - /** - * @description The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - * @enum {string} - */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** - * Format: unix-time - * @description The time after which the subscription will resume collecting payments. - */ - resumes_at?: number | null - } - /** SubscriptionsResourcePaymentMethodOptions */ - subscriptions_resource_payment_method_options: { - /** @description This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. */ - acss_debit?: components['schemas']['invoice_payment_method_options_acss_debit'] | null - /** @description This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. */ - bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null - /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ - card?: components['schemas']['subscription_payment_method_options_card'] | null - } - /** SubscriptionsResourcePaymentSettings */ - subscriptions_resource_payment_settings: { - /** @description Payment-method-specific configuration to provide to invoices created by the subscription. */ - payment_method_options?: components['schemas']['subscriptions_resource_payment_method_options'] | null - /** @description The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | null - } - /** - * SubscriptionsResourcePendingUpdate - * @description Pending Updates store the changes pending from a previous update that will be applied - * to the Subscription upon successful payment. - */ - subscriptions_resource_pending_update: { - /** - * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number | null - /** - * Format: unix-time - * @description The point after which the changes reflected by this update will be discarded and no longer applied. - */ - expires_at: number - /** @description List of subscription items, each with an attached plan, that will be set if the update is applied. */ - subscription_items?: components['schemas']['subscription_item'][] | null - /** - * Format: unix-time - * @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. - */ - trial_end?: number | null - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean | null - } - /** - * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. - */ - tax_code: { - /** @description A detailed description of which types of products the tax code represents. */ - description: string - /** @description Unique identifier for the object. */ - id: string - /** @description A short name for the tax code. */ - name: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_code' - } - /** TaxDeductedAtSource */ - tax_deducted_at_source: { - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_deducted_at_source' - /** - * Format: unix-time - * @description The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. - */ - period_end: number - /** - * Format: unix-time - * @description The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. - */ - period_start: number - /** @description The TAN that was supplied to Stripe when TDS was assessed */ - tax_deduction_account_number: string - } - /** - * tax_id - * @description You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). - * A customer's tax IDs are displayed on invoices and credit notes issued for the customer. - * - * Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). - */ - tax_id: { - /** @description Two-letter ISO code representing the country of the tax ID. */ - country?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description ID of the customer. */ - customer?: (string | components['schemas']['customer']) | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_id' - /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` - * @enum {string} - */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'unknown' - | 'us_ein' - | 'za_vat' - /** @description Value of the tax ID. */ - value: string - /** @description Tax ID verification information. */ - verification?: components['schemas']['tax_id_verification'] | null - } - /** tax_id_verification */ - tax_id_verification: { - /** - * @description Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. - * @enum {string} - */ - status: 'pending' | 'unavailable' | 'unverified' | 'verified' - /** @description Verified address. */ - verified_address?: string | null - /** @description Verified name. */ - verified_name?: string | null - } - /** - * TaxRate - * @description Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. - * - * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). - */ - tax_rate: { - /** @description Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string | null - /** @description The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. */ - display_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'tax_rate' - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string | null - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string|null} - */ - tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null - } - /** - * TerminalConnectionToken - * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. - * - * Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). - */ - 'terminal.connection_token': { - /** @description The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.connection_token' - /** @description Your application should pass this token to the Stripe Terminal SDK. */ - secret: string - } - /** - * TerminalLocationLocation - * @description A Location represents a grouping of readers. - * - * Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). - */ - 'terminal.location': { - address: components['schemas']['address'] - /** @description The display name of the location. */ - display_name: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.location' - } - /** - * TerminalReaderReader - * @description A Reader represents a physical device for accepting payment details. - * - * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). - */ - 'terminal.reader': { - /** @description The current software version of the reader. */ - device_sw_version?: string | null - /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. - * @enum {string} - */ - device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** @description Unique identifier for the object. */ - id: string - /** @description The local IP address of the reader. */ - ip_address?: string | null - /** @description Custom label given to the reader for easier identification. */ - label: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description The location identifier of the reader. */ - location?: (string | components['schemas']['terminal.location']) | null - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'terminal.reader' - /** @description Serial number of the reader. */ - serial_number: string - /** @description The networking status of the reader. */ - status?: string | null - } - /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. - */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: components['schemas']['card'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string - } - /** three_d_secure_details */ - three_d_secure_details: { - /** - * @description For authenticated transactions: how the customer was authenticated by - * the issuing bank. - * @enum {string|null} - */ - authentication_flow?: ('challenge' | 'frictionless') | null - /** - * @description Indicates the outcome of 3D Secure authentication. - * @enum {string|null} - */ - result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null - /** - * @description Additional information about why 3D Secure succeeded or failed based - * on the `result`. - * @enum {string|null} - */ - result_reason?: ('abandoned' | 'bypassed' | 'canceled' | 'card_not_enrolled' | 'network_not_supported' | 'protocol_error' | 'rejected') | null - /** - * @description The version of 3D Secure that was used. - * @enum {string|null} - */ - version?: ('1.0.2' | '2.1.0' | '2.2.0') | null - } - /** three_d_secure_usage */ - three_d_secure_usage: { - /** @description Whether 3D Secure is supported on this card. */ - supported: boolean - } - /** - * Token - * @description Tokenization is the process Stripe uses to collect sensitive card or bank - * account details, or personally identifiable information (PII), directly from - * your customers in a secure manner. A token representing this information is - * returned to your server to use. You should use our - * [recommended payments integrations](https://stripe.com/docs/payments) to perform this process - * client-side. This ensures that no sensitive card data touches your server, - * and allows your integration to operate in a PCI-compliant way. - * - * If you cannot use client-side tokenization, you can also create tokens using - * the API with either your publishable or secret API key. Keep in mind that if - * your integration uses this method, you are responsible for any PCI compliance - * that may be required, and you must keep your secret API key safe. Unlike with - * client-side tokenization, your customer's information is not sent directly to - * Stripe, so we cannot determine how it is handled or stored. - * - * Tokens cannot be stored or used more than once. To store card or bank account - * information for later use, you can create [Customer](https://stripe.com/docs/api#customers) - * objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that - * [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, - * performs best with integrations that use client-side tokenization. - * - * Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) - */ - token: { - bank_account?: components['schemas']['bank_account'] - card?: components['schemas']['card'] - /** @description IP address of the client that generated the token. */ - client_ip?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'token' - /** @description Type of the token: `account`, `bank_account`, `card`, or `pii`. */ - type: string - /** @description Whether this token has already been used (tokens can be used only once). */ - used: boolean - } - /** - * Topup - * @description To top up your Stripe balance, you create a top-up object. You can retrieve - * individual top-ups, as well as list all top-ups. Top-ups are identified by a - * unique, random ID. - * - * Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). - */ - topup: { - /** @description Amount transferred. */ - amount: number - /** @description ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. */ - expected_availability_date?: number | null - /** @description Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ - failure_code?: string | null - /** @description Message to user further explaining reason for top-up failure if available. */ - failure_message?: string | null - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'topup' - source: components['schemas']['source'] - /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ - statement_descriptor?: string | null - /** - * @description The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. - * @enum {string} - */ - status: 'canceled' | 'failed' | 'pending' | 'reversed' | 'succeeded' - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string | null - } - /** - * Transfer - * @description A `Transfer` object is created when you move funds between Stripe accounts as - * part of Connect. - * - * Before April 6, 2017, transfers also represented movement of funds from a - * Stripe account to a card or bank account. This behavior has since been split - * out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more - * information, read about the - * [transfer/payout split](https://stripe.com/docs/transfer-payout-split). - * - * Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). - */ - transfer: { - /** @description Amount in %s to be transferred. */ - amount: number - /** @description Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ - amount_reversed: number - /** @description Balance transaction that describes the impact of this transfer on your account balance. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** - * Format: unix-time - * @description Time that this record of the transfer was first created. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description ID of the Stripe account the transfer was sent to. */ - destination?: (string | components['schemas']['account']) | null - /** @description If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ - destination_payment?: string | components['schemas']['charge'] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'transfer' - /** - * TransferReversalList - * @description A list of reversals that have been applied to the transfer. - */ - reversals: { - /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ - reversed: boolean - /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ - source_transaction?: (string | components['schemas']['charge']) | null - /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string | null - } - /** transfer_data */ - transfer_data: { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** - * @description The account (if any) the payment will be attributed to for tax - * reporting, and where funds from the payment will be transferred to upon - * payment success. - */ - destination: string | components['schemas']['account'] - } - /** - * TransferReversal - * @description [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a - * connected account, either entirely or partially, and can also specify whether - * to refund any related application fees. Transfer reversals add to the - * platform's balance and subtract from the destination account's balance. - * - * Reversing a transfer that was made for a [destination - * charge](/docs/connect/destination-charges) is allowed only up to the amount of - * the charge. It is possible to reverse a - * [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) - * transfer only if the destination account has enough balance to cover the - * reversal. - * - * Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). - */ - transfer_reversal: { - /** @description Amount, in %s. */ - amount: number - /** @description Balance transaction that describes the impact on your account balance. */ - balance_transaction?: (string | components['schemas']['balance_transaction']) | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Linked payment refund for the transfer reversal. */ - destination_payment_refund?: (string | components['schemas']['refund']) | null - /** @description Unique identifier for the object. */ - id: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'transfer_reversal' - /** @description ID of the refund responsible for the transfer reversal. */ - source_refund?: (string | components['schemas']['refund']) | null - /** @description ID of the transfer that was reversed. */ - transfer: string | components['schemas']['transfer'] - } - /** TransferSchedule */ - transfer_schedule: { - /** @description The number of days charges for the account will be held before being paid out. */ - delay_days: number - /** @description How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ - interval: string - /** @description The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. */ - monthly_anchor?: number - /** @description The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ - weekly_anchor?: string - } - /** TransformQuantity */ - transform_quantity: { - /** @description Divide usage by this number. */ - divide_by: number - /** - * @description After division, either round the result `up` or `down`. - * @enum {string} - */ - round: 'down' | 'up' - } - /** TransformUsage */ - transform_usage: { - /** @description Divide usage by this number. */ - divide_by: number - /** - * @description After division, either round the result `up` or `down`. - * @enum {string} - */ - round: 'down' | 'up' - } - /** - * UsageRecord - * @description Usage records allow you to report customer usage and metrics to Stripe for - * metered billing of subscription prices. - * - * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). - */ - usage_record: { - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'usage_record' - /** @description The usage quantity for the specified date. */ - quantity: number - /** @description The ID of the subscription item this usage record contains data for. */ - subscription_item: string - /** - * Format: unix-time - * @description The timestamp when this usage occurred. - */ - timestamp: number - } - /** UsageRecordSummary */ - usage_record_summary: { - /** @description Unique identifier for the object. */ - id: string - /** @description The invoice in which this usage period has been billed for. */ - invoice?: string | null - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'usage_record_summary' - period: components['schemas']['period'] - /** @description The ID of the subscription item this summary is describing. */ - subscription_item: string - /** @description The total usage within this usage period. */ - total_usage: number - } - /** verification_session_redaction */ - verification_session_redaction: { - /** - * @description Indicates whether this object and its related objects have been redacted or not. - * @enum {string} - */ - status: 'processing' | 'redacted' - } - /** - * NotificationWebhookEndpoint - * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be - * notified about events that happen in your Stripe account or connected - * accounts. - * - * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. - * - * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). - */ - webhook_endpoint: { - /** @description The API version events are rendered as for this webhook endpoint. */ - api_version?: string | null - /** @description The ID of the associated Connect application. */ - application?: string | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description An optional description of what the webhook is used for. */ - description?: string | null - /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ - enabled_events: string[] - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'webhook_endpoint' - /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ - secret?: string - /** @description The status of the webhook. It can be `enabled` or `disabled`. */ - status: string - /** @description The URL of the webhook endpoint. */ - url: string - } - } -} - -export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } - } - } - } - /**

Retrieves a 3D Secure object.

*/ - Get3dSecureThreeDSecure: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - three_d_secure: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - /** address_specs */ - support_address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - support_email?: string - support_phone?: string - support_url?: string | '' - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * capabilities_param - * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - */ - capabilities?: { - /** capability_param */ - acss_debit_payments?: { - requested?: boolean - } - /** capability_param */ - afterpay_clearpay_payments?: { - requested?: boolean - } - /** capability_param */ - au_becs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bacs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bancontact_payments?: { - requested?: boolean - } - /** capability_param */ - boleto_payments?: { - requested?: boolean - } - /** capability_param */ - card_issuing?: { - requested?: boolean - } - /** capability_param */ - card_payments?: { - requested?: boolean - } - /** capability_param */ - cartes_bancaires_payments?: { - requested?: boolean - } - /** capability_param */ - eps_payments?: { - requested?: boolean - } - /** capability_param */ - fpx_payments?: { - requested?: boolean - } - /** capability_param */ - giropay_payments?: { - requested?: boolean - } - /** capability_param */ - grabpay_payments?: { - requested?: boolean - } - /** capability_param */ - ideal_payments?: { - requested?: boolean - } - /** capability_param */ - jcb_payments?: { - requested?: boolean - } - /** capability_param */ - klarna_payments?: { - requested?: boolean - } - /** capability_param */ - legacy_payments?: { - requested?: boolean - } - /** capability_param */ - oxxo_payments?: { - requested?: boolean - } - /** capability_param */ - p24_payments?: { - requested?: boolean - } - /** capability_param */ - sepa_debit_payments?: { - requested?: boolean - } - /** capability_param */ - sofort_payments?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_k?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_misc?: { - requested?: boolean - } - /** capability_param */ - transfers?: { - requested?: boolean - } - } - /** - * company_specs - * @description Information about the company or business. This field is available for any `business_type`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** - * documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - bank_account_ownership_verification?: { - files?: string[] - } - /** documents_param */ - company_license?: { - files?: string[] - } - /** documents_param */ - company_memorandum_of_association?: { - files?: string[] - } - /** documents_param */ - company_ministerial_decree?: { - files?: string[] - } - /** documents_param */ - company_registration_verification?: { - files?: string[] - } - /** documents_param */ - company_tax_id_verification?: { - files?: string[] - } - /** documents_param */ - proof_of_registration?: { - files?: string[] - } - } - /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * settings_specs_update - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_issuing_settings_specs */ - card_issuing?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: 'minimum' | number - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - service_agreement?: string - user_agent?: string - } - } - } - } - } - /** - *

With Connect, you can delete accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - DeleteAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account?: string - } - } - } - } - /**

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

*/ - PostAccountLinks: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The identifier of the account to create an account link for. */ - account: string - /** - * @description Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. - * @enum {string} - */ - collect?: 'currently_due' | 'eventually_due' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. */ - refresh_url?: string - /** @description The URL that the user will be redirected to upon leaving or completing the linked flow. */ - return_url?: string - /** - * @description The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. - * @enum {string} - */ - type: 'account_onboarding' | 'account_update' - } - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountBankAccounts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountBankAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountBankAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - } - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountBankAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - GetAccountCapabilities: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['capability'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves information about the specified Account Capability.

*/ - GetAccountCapabilitiesCapability: { - parameters: { - path: { - capability: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['capability'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing Account Capability.

*/ - PostAccountCapabilitiesCapability: { - parameters: { - path: { - capability: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['capability'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ - requested?: boolean - } - } - } - } - /**

List external accounts for an account.

*/ - GetAccountExternalAccounts: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (components['schemas']['bank_account'] | components['schemas']['card'])[] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountExternalAccounts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountExternalAccountsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountExternalAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - } - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountExternalAccountsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - PostAccountLoginLinks: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['login_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string - } - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountPeople: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - representative?: boolean - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new person.

*/ - PostAccountPeople: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountPeoplePerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing person.

*/ - PostAccountPeoplePerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountPeoplePerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountPersons: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - representative?: boolean - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new person.

*/ - PostAccountPersons: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountPersonsPerson: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing person.

*/ - PostAccountPersonsPerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - account?: string - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountPersonsPerson: { - parameters: { - path: { - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

*/ - GetAccounts: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

With Connect, you can create Stripe accounts for your users. - * To do this, you’ll first need to register your platform.

- */ - PostAccounts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - /** address_specs */ - support_address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - support_email?: string - support_phone?: string - support_url?: string | '' - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * capabilities_param - * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - */ - capabilities?: { - /** capability_param */ - acss_debit_payments?: { - requested?: boolean - } - /** capability_param */ - afterpay_clearpay_payments?: { - requested?: boolean - } - /** capability_param */ - au_becs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bacs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bancontact_payments?: { - requested?: boolean - } - /** capability_param */ - boleto_payments?: { - requested?: boolean - } - /** capability_param */ - card_issuing?: { - requested?: boolean - } - /** capability_param */ - card_payments?: { - requested?: boolean - } - /** capability_param */ - cartes_bancaires_payments?: { - requested?: boolean - } - /** capability_param */ - eps_payments?: { - requested?: boolean - } - /** capability_param */ - fpx_payments?: { - requested?: boolean - } - /** capability_param */ - giropay_payments?: { - requested?: boolean - } - /** capability_param */ - grabpay_payments?: { - requested?: boolean - } - /** capability_param */ - ideal_payments?: { - requested?: boolean - } - /** capability_param */ - jcb_payments?: { - requested?: boolean - } - /** capability_param */ - klarna_payments?: { - requested?: boolean - } - /** capability_param */ - legacy_payments?: { - requested?: boolean - } - /** capability_param */ - oxxo_payments?: { - requested?: boolean - } - /** capability_param */ - p24_payments?: { - requested?: boolean - } - /** capability_param */ - sepa_debit_payments?: { - requested?: boolean - } - /** capability_param */ - sofort_payments?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_k?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_misc?: { - requested?: boolean - } - /** capability_param */ - transfers?: { - requested?: boolean - } - } - /** - * company_specs - * @description Information about the company or business. This field is available for any `business_type`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ - country?: string - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** - * documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - bank_account_ownership_verification?: { - files?: string[] - } - /** documents_param */ - company_license?: { - files?: string[] - } - /** documents_param */ - company_memorandum_of_association?: { - files?: string[] - } - /** documents_param */ - company_ministerial_decree?: { - files?: string[] - } - /** documents_param */ - company_registration_verification?: { - files?: string[] - } - /** documents_param */ - company_tax_id_verification?: { - files?: string[] - } - /** documents_param */ - proof_of_registration?: { - files?: string[] - } - } - /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * settings_specs - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_issuing_settings_specs */ - card_issuing?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: 'minimum' | number - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - service_agreement?: string - user_agent?: string - } - /** - * @description The type of Stripe account to create. May be one of `custom`, `express` or `standard`. - * @enum {string} - */ - type?: 'custom' | 'express' | 'standard' - } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccountsAccount: { - parameters: { - path: { - account: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccountsAccount: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** - * business_profile_specs - * @description Business information about the account. - */ - business_profile?: { - mcc?: string - name?: string - product_description?: string - /** address_specs */ - support_address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - support_email?: string - support_phone?: string - support_url?: string | '' - url?: string - } - /** - * @description The business type. - * @enum {string} - */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** - * capabilities_param - * @description Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - */ - capabilities?: { - /** capability_param */ - acss_debit_payments?: { - requested?: boolean - } - /** capability_param */ - afterpay_clearpay_payments?: { - requested?: boolean - } - /** capability_param */ - au_becs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bacs_debit_payments?: { - requested?: boolean - } - /** capability_param */ - bancontact_payments?: { - requested?: boolean - } - /** capability_param */ - boleto_payments?: { - requested?: boolean - } - /** capability_param */ - card_issuing?: { - requested?: boolean - } - /** capability_param */ - card_payments?: { - requested?: boolean - } - /** capability_param */ - cartes_bancaires_payments?: { - requested?: boolean - } - /** capability_param */ - eps_payments?: { - requested?: boolean - } - /** capability_param */ - fpx_payments?: { - requested?: boolean - } - /** capability_param */ - giropay_payments?: { - requested?: boolean - } - /** capability_param */ - grabpay_payments?: { - requested?: boolean - } - /** capability_param */ - ideal_payments?: { - requested?: boolean - } - /** capability_param */ - jcb_payments?: { - requested?: boolean - } - /** capability_param */ - klarna_payments?: { - requested?: boolean - } - /** capability_param */ - legacy_payments?: { - requested?: boolean - } - /** capability_param */ - oxxo_payments?: { - requested?: boolean - } - /** capability_param */ - p24_payments?: { - requested?: boolean - } - /** capability_param */ - sepa_debit_payments?: { - requested?: boolean - } - /** capability_param */ - sofort_payments?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_k?: { - requested?: boolean - } - /** capability_param */ - tax_reporting_us_1099_misc?: { - requested?: boolean - } - /** capability_param */ - transfers?: { - requested?: boolean - } - } - /** - * company_specs - * @description Information about the company or business. This field is available for any `business_type`. - */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ - default_currency?: string - /** - * documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - bank_account_ownership_verification?: { - files?: string[] - } - /** documents_param */ - company_license?: { - files?: string[] - } - /** documents_param */ - company_memorandum_of_association?: { - files?: string[] - } - /** documents_param */ - company_ministerial_decree?: { - files?: string[] - } - /** documents_param */ - company_registration_verification?: { - files?: string[] - } - /** documents_param */ - company_tax_id_verification?: { - files?: string[] - } - /** documents_param */ - proof_of_registration?: { - files?: string[] - } - } - /** @description The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ - external_account?: string - /** - * individual_specs - * @description Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * settings_specs_update - * @description Options for customizing how the account functions within Stripe. - */ - settings?: { - /** branding_settings_specs */ - branding?: { - icon?: string - logo?: string - primary_color?: string - secondary_color?: string - } - /** card_issuing_settings_specs */ - card_issuing?: { - /** settings_terms_of_service_specs */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - } - /** card_payments_settings_specs */ - card_payments?: { - /** decline_charge_on_specs */ - decline_on?: { - avs_failure?: boolean - cvc_failure?: boolean - } - statement_descriptor_prefix?: string - } - /** payments_settings_specs */ - payments?: { - statement_descriptor?: string - statement_descriptor_kana?: string - statement_descriptor_kanji?: string - } - /** payout_settings_specs */ - payouts?: { - debit_negative_balances?: boolean - /** transfer_schedule_specs */ - schedule?: { - delay_days?: 'minimum' | number - /** @enum {string} */ - interval?: 'daily' | 'manual' | 'monthly' | 'weekly' - monthly_anchor?: number - /** @enum {string} */ - weekly_anchor?: 'friday' | 'monday' | 'saturday' | 'sunday' | 'thursday' | 'tuesday' | 'wednesday' - } - statement_descriptor?: string - } - } - /** - * tos_acceptance_specs - * @description Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - */ - tos_acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - service_agreement?: string - user_agent?: string - } - } - } - } - } - /** - *

With Connect, you can delete accounts you manage.

- * - *

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

- * - *

If you want to delete your own account, use the account information tab in your account settings instead.

- */ - DeleteAccountsAccount: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountsAccountBankAccounts: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - } - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

*/ - GetAccountsAccountCapabilities: { - parameters: { - path: { - account: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['capability'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves information about the specified Account Capability.

*/ - GetAccountsAccountCapabilitiesCapability: { - parameters: { - path: { - account: string - capability: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['capability'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing Account Capability.

*/ - PostAccountsAccountCapabilitiesCapability: { - parameters: { - path: { - account: string - capability: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['capability'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. */ - requested?: boolean - } - } - } - } - /**

List external accounts for an account.

*/ - GetAccountsAccountExternalAccounts: { - parameters: { - path: { - account: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (components['schemas']['bank_account'] | components['schemas']['card'])[] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create an external account for a given account.

*/ - PostAccountsAccountExternalAccounts: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Retrieve a specified external account for a given account.

*/ - GetAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

- * - *

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

- */ - PostAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: '' | 'company' | 'individual' - /** - * @description The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - * @enum {string} - */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - } - } - } - } - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_external_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a single-use login link for an Express account to access their Stripe dashboard.

- * - *

You may only create login links for Express accounts connected to your platform.

- */ - PostAccountsAccountLoginLinks: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['login_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string - } - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountsAccountPeople: { - parameters: { - path: { - account: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - representative?: boolean - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new person.

*/ - PostAccountsAccountPeople: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountsAccountPeoplePerson: { - parameters: { - path: { - account: string - person: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing person.

*/ - PostAccountsAccountPeoplePerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountsAccountPeoplePerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

*/ - GetAccountsAccountPersons: { - parameters: { - path: { - account: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filters on the list of people returned based on the person's relationship to the account's company. */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - representative?: boolean - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['person'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new person.

*/ - PostAccountsAccountPersons: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Retrieves an existing person.

*/ - GetAccountsAccountPersonsPerson: { - parameters: { - path: { - account: string - person: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing person.

*/ - PostAccountsAccountPersonsPerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * address_specs - * @description The person's address. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** - * japan_address_kana_specs - * @description The Kana variation of the person's address (Japan only). - */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** - * japan_address_kanji_specs - * @description The Kanji variation of the person's address (Japan only). - */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** @description The person's date of birth. */ - dob?: - | { - day: number - month: number - year: number - } - | '' - /** - * person_documents_specs - * @description Documents that may be submitted to satisfy various informational requests. - */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - /** @description The person's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The person's first name. */ - first_name?: string - /** @description The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string - /** @description The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string - /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: string[] | '' - /** @description The person's gender (International regulations require either "male" or "female"). */ - gender?: string - /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ - id_number?: string - /** @description The person's last name. */ - last_name?: string - /** @description The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string - /** @description The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string - /** @description The person's maiden name. */ - maiden_name?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ - nationality?: string - /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string - /** @description The person's phone number. */ - phone?: string - /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ - political_exposure?: string - /** - * relationship_specs - * @description The relationship that this person has with the account's legal entity. - */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - /** @description The last four digits of the person's Social Security number (U.S. only). */ - ssn_last_4?: string - /** - * person_verification_specs - * @description The person's verification status. - */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - } - } - } - /**

Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.

*/ - DeleteAccountsAccountPersonsPerson: { - parameters: { - path: { - account: string - person: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_person'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

With Connect, you may flag accounts as suspicious.

- * - *

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

- */ - PostAccountsAccountReject: { - parameters: { - path: { - account: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ - reason: string - } - } - } - } - /**

List apple pay domains.

*/ - GetApplePayDomains: { - parameters: { - query: { - domain_name?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['apple_pay_domain'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create an apple pay domain.

*/ - PostApplePayDomains: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['apple_pay_domain'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - domain_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Retrieve an apple pay domain.

*/ - GetApplePayDomainsDomain: { - parameters: { - path: { - domain: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['apple_pay_domain'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Delete an apple pay domain.

*/ - DeleteApplePayDomainsDomain: { - parameters: { - path: { - domain: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_apple_pay_domain'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

*/ - GetApplicationFees: { - parameters: { - query: { - /** Only return application fees for the charge specified by this charge ID. */ - charge?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['application_fee'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

*/ - GetApplicationFeesFeeRefundsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - fee: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['fee_refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - PostApplicationFeesFeeRefundsId: { - parameters: { - path: { - fee: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['fee_refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

*/ - GetApplicationFeesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['application_fee'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - PostApplicationFeesIdRefund: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['application_fee'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - amount?: number - directive?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - GetApplicationFeesIdRefunds: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['fee_refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Refunds an application fee that has previously been collected but not yet refunded. - * Funds will be refunded to the Stripe account from which the fee was originally collected.

- * - *

You can optionally refund only part of an application fee. - * You can do so multiple times, until the entire fee has been refunded.

- * - *

Once entirely refunded, an application fee can’t be refunded again. - * This method will raise an error when called on an already-refunded application fee, - * or when trying to refund more money than is left on an application fee.

- */ - PostApplicationFeesIdRefunds: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['fee_refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /** - *

Retrieves the current account balance, based on the authentication that was used to make the request. - * For a sample request, see Accounting for negative balances.

- */ - GetBalance: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['balance'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - GetBalanceTransactions: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ - payout?: string - /** Only returns the original transaction. */ - source?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - GetBalanceTransactionsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['balance_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

- * - *

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

- */ - GetBalanceHistory: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ - payout?: string - /** Only returns the original transaction. */ - source?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ - type?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the balance transaction with the given ID.

- * - *

Note that this endpoint previously used the path /v1/balance/history/:id.

- */ - GetBalanceHistoryId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['balance_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of configurations that describe the functionality of the customer portal.

*/ - GetBillingPortalConfigurations: { - parameters: { - query: { - /** Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). */ - is_default?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['billing_portal.configuration'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a configuration that describes the functionality and behavior of a PortalSession

*/ - PostBillingPortalConfigurations: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['billing_portal.configuration'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * business_profile_create_param - * @description The business information shown to customers in the portal. - */ - business_profile: { - headline?: string - privacy_policy_url: string - terms_of_service_url: string - } - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: string | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * features_creation_param - * @description Information about the features available in the portal. - */ - features: { - /** customer_update_creation_param */ - customer_update?: { - allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' - enabled: boolean - } - /** invoice_list_param */ - invoice_history?: { - enabled: boolean - } - /** payment_method_update_param */ - payment_method_update?: { - enabled: boolean - } - /** subscription_cancel_creation_param */ - subscription_cancel?: { - /** subscription_cancellation_reason_creation_param */ - cancellation_reason?: { - enabled: boolean - options: - | ( - | 'customer_service' - | 'low_quality' - | 'missing_features' - | 'other' - | 'switched_service' - | 'too_complex' - | 'too_expensive' - | 'unused' - )[] - | '' - } - enabled: boolean - /** @enum {string} */ - mode?: 'at_period_end' | 'immediately' - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - /** subscription_pause_param */ - subscription_pause?: { - enabled?: boolean - } - /** subscription_update_creation_param */ - subscription_update?: { - default_allowed_updates: ('price' | 'promotion_code' | 'quantity')[] | '' - enabled: boolean - products: - | { - prices: string[] - product: string - }[] - | '' - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Retrieves a configuration that describes the functionality of the customer portal.

*/ - GetBillingPortalConfigurationsConfiguration: { - parameters: { - path: { - configuration: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['billing_portal.configuration'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a configuration that describes the functionality of the customer portal.

*/ - PostBillingPortalConfigurationsConfiguration: { - parameters: { - path: { - configuration: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['billing_portal.configuration'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the configuration is active and can be used to create portal sessions. */ - active?: boolean - /** - * business_profile_update_param - * @description The business information shown to customers in the portal. - */ - business_profile?: { - headline?: string - privacy_policy_url?: string - terms_of_service_url?: string - } - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: string | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * features_updating_param - * @description Information about the features available in the portal. - */ - features?: { - /** customer_update_updating_param */ - customer_update?: { - allowed_updates?: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' - enabled?: boolean - } - /** invoice_list_param */ - invoice_history?: { - enabled: boolean - } - /** payment_method_update_param */ - payment_method_update?: { - enabled: boolean - } - /** subscription_cancel_updating_param */ - subscription_cancel?: { - /** subscription_cancellation_reason_updating_param */ - cancellation_reason?: { - enabled: boolean - options?: - | ( - | 'customer_service' - | 'low_quality' - | 'missing_features' - | 'other' - | 'switched_service' - | 'too_complex' - | 'too_expensive' - | 'unused' - )[] - | '' - } - enabled?: boolean - /** @enum {string} */ - mode?: 'at_period_end' | 'immediately' - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - /** subscription_pause_param */ - subscription_pause?: { - enabled?: boolean - } - /** subscription_update_updating_param */ - subscription_update?: { - default_allowed_updates?: ('price' | 'promotion_code' | 'quantity')[] | '' - enabled?: boolean - products?: - | { - prices: string[] - product: string - }[] - | '' - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Creates a session of the customer portal.

*/ - PostBillingPortalSessions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['billing_portal.session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. */ - configuration?: string - /** @description The ID of an existing customer. */ - customer: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. - * @enum {string} - */ - locale?: - | 'auto' - | 'bg' - | 'cs' - | 'da' - | 'de' - | 'el' - | 'en' - | 'en-AU' - | 'en-CA' - | 'en-GB' - | 'en-IE' - | 'en-IN' - | 'en-NZ' - | 'en-SG' - | 'es' - | 'es-419' - | 'et' - | 'fi' - | 'fil' - | 'fr' - | 'fr-CA' - | 'hr' - | 'hu' - | 'id' - | 'it' - | 'ja' - | 'ko' - | 'lt' - | 'lv' - | 'ms' - | 'mt' - | 'nb' - | 'nl' - | 'pl' - | 'pt' - | 'pt-BR' - | 'ro' - | 'ru' - | 'sk' - | 'sl' - | 'sv' - | 'th' - | 'tr' - | 'vi' - | 'zh' - | 'zh-HK' - | 'zh-TW' - /** @description The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ - on_behalf_of?: string - /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url?: string - } - } - } - } - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - GetBitcoinReceivers: { - parameters: { - query: { - /** Filter for active receivers. */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Filter for filled receivers. */ - filled?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Filter for receivers with uncaptured funds. */ - uncaptured_funds?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['bitcoin_receiver'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - receiver: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - receiver?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ - GetCharges: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return charges for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return charges for this transfer group. */ - transfer_group?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['charge'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ - PostCharges: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['charge'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee_amount?: number - /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ - capture?: boolean - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - cvc?: string - exp_month: number - exp_year: number - metadata?: { [key: string]: string } - name?: string - number: string - /** @enum {string} */ - object?: 'card' - } - | string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description The ID of an existing customer that will be charged in this request. */ - customer?: string - /** @description An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ - description?: string - destination?: - | { - account: string - amount?: number - } - | string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ - on_behalf_of?: string - /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** - * optional_fields_shipping - * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. */ - source?: string - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_specs - * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - */ - transfer_data?: { - amount?: number - destination: string - } - /** @description A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). */ - transfer_group?: string - } - } - } - } - /**

Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.

*/ - GetChargesCharge: { - parameters: { - path: { - charge: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['charge'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostChargesCharge: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['charge'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. */ - customer?: string - /** @description An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * fraud_details - * @description A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. - */ - fraud_details?: { - /** @enum {string} */ - user_report: '' | 'fraudulent' | 'safe' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. */ - receipt_email?: string - /** - * optional_fields_shipping - * @description Shipping information for the charge. Helps prevent fraud on charges for physical goods. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - } - /** - *

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.

- * - *

Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

- */ - PostChargesChargeCapture: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['charge'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ - amount?: number - /** @description An application fee to add on to this charge. */ - application_fee?: number - /** @description An application fee amount to add on to this charge, which must be less than or equal to the original amount. */ - application_fee_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. */ - receipt_email?: string - /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_specs - * @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - */ - transfer_data?: { - amount?: number - } - /** @description A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - } - /**

Retrieve a dispute for a specified charge.

*/ - GetChargesChargeDispute: { - parameters: { - path: { - charge: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - PostChargesChargeDispute: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string - billing_address?: string - cancellation_policy?: string - cancellation_policy_disclosure?: string - cancellation_rebuttal?: string - customer_communication?: string - customer_email_address?: string - customer_name?: string - customer_purchase_ip?: string - customer_signature?: string - duplicate_charge_documentation?: string - duplicate_charge_explanation?: string - duplicate_charge_id?: string - product_description?: string - receipt?: string - refund_policy?: string - refund_policy_disclosure?: string - refund_refusal_explanation?: string - service_date?: string - service_documentation?: string - shipping_address?: string - shipping_carrier?: string - shipping_date?: string - shipping_documentation?: string - shipping_tracking_number?: string - uncategorized_file?: string - uncategorized_text?: string - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean - } - } - } - } - PostChargesChargeDisputeClose: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.

- * - *

Creating a new refund will refund a charge that has previously been created but not yet refunded. - * Funds will be refunded to the credit or debit card that was originally charged.

- * - *

You can optionally refund only part of a charge. - * You can do so multiple times, until the entire charge has been refunded.

- * - *

Once entirely refunded, a charge can’t be refunded again. - * This method will raise an error when called on an already-refunded charge, - * or when trying to refund more money than is left on a charge.

- */ - PostChargesChargeRefund: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['charge'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - } - /**

You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

*/ - GetChargesChargeRefunds: { - parameters: { - path: { - charge: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create a refund.

*/ - PostChargesChargeRefunds: { - parameters: { - path: { - charge: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - } - /**

Retrieves the details of an existing refund.

*/ - GetChargesChargeRefundsRefund: { - parameters: { - path: { - charge: string - refund: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Update a specified refund.

*/ - PostChargesChargeRefundsRefund: { - parameters: { - path: { - charge: string - refund: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of Checkout Sessions.

*/ - GetCheckoutSessions: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return the Checkout Session for the PaymentIntent specified. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return the Checkout Session for the subscription specified. */ - subscription?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['checkout.session'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a Session object.

*/ - PostCheckoutSessions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['checkout.session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * after_expiration_params - * @description Configure actions after a Checkout Session has expired. - */ - after_expiration?: { - /** recovery_params */ - recovery?: { - allow_promotion_codes?: boolean - enabled: boolean - } - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Specify whether Checkout should collect the customer's billing address. - * @enum {string} - */ - billing_address_collection?: 'auto' | 'required' - /** @description The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string - /** - * @description A unique string to reference the Checkout Session. This can be a - * customer ID, a cart ID, or similar, and can be used to reconcile the - * session with your internal systems. - */ - client_reference_id?: string - /** - * consent_collection_params - * @description Configure fields for the Checkout Session to gather active consent from customers. - */ - consent_collection?: { - /** @enum {string} */ - promotions?: 'auto' - } - /** - * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card - * payment method will be used to prefill the email, name, card details, and billing address - * on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - * will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. - * - * If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. - * If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. - * - * If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow. - * - * You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. - */ - customer?: string - /** - * @description Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. - * - * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout - * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. - * - * Can only be set in `payment` and `setup` mode. - * @enum {string} - */ - customer_creation?: 'always' | 'if_required' - /** - * @description If provided, this value will be used when the Customer object is created. - * If not provided, customers will be asked to enter their email address. - * Use this parameter to prefill customer data if you already have an email - * on file. To access information about the customer once a session is - * complete, use the `customer` field. - */ - customer_email?: string - /** - * customer_update_params - * @description Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. - */ - customer_update?: { - /** @enum {string} */ - address?: 'auto' | 'never' - /** @enum {string} */ - name?: 'auto' | 'never' - /** @enum {string} */ - shipping?: 'auto' | 'never' - } - /** @description The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. */ - discounts?: { - coupon?: string - promotion_code?: string - }[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. - */ - expires_at?: number - /** - * @description A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - * - * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. - */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - description?: string - dynamic_tax_rates?: string[] - price?: string - /** price_data_with_product_data */ - price_data?: { - currency: string - product?: string - /** product_data */ - product_data?: { - description?: string - images?: string[] - metadata?: { [key: string]: string } - name: string - tax_code?: string - } - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] - }[] - /** - * @description The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - * @enum {string} - */ - locale?: - | 'auto' - | 'bg' - | 'cs' - | 'da' - | 'de' - | 'el' - | 'en' - | 'en-GB' - | 'es' - | 'es-419' - | 'et' - | 'fi' - | 'fil' - | 'fr' - | 'fr-CA' - | 'hr' - | 'hu' - | 'id' - | 'it' - | 'ja' - | 'ko' - | 'lt' - | 'lv' - | 'ms' - | 'mt' - | 'nb' - | 'nl' - | 'pl' - | 'pt' - | 'pt-BR' - | 'ro' - | 'ru' - | 'sk' - | 'sl' - | 'sv' - | 'th' - | 'tr' - | 'vi' - | 'zh' - | 'zh-HK' - | 'zh-TW' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description The mode of the Checkout Session. Required when using prices or `setup` mode. Pass `subscription` if the Checkout Session includes at least one recurring item. - * @enum {string} - */ - mode?: 'payment' | 'setup' | 'subscription' - /** - * payment_intent_data_params - * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - */ - payment_intent_data?: { - application_fee_amount?: number - /** @enum {string} */ - capture_method?: 'automatic' | 'manual' - description?: string - metadata?: { [key: string]: string } - on_behalf_of?: string - receipt_email?: string - /** @enum {string} */ - setup_future_usage?: 'off_session' | 'on_session' - /** shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - statement_descriptor?: string - statement_descriptor_suffix?: string - /** transfer_data_params */ - transfer_data?: { - amount?: number - destination: string - } - transfer_group?: string - } - /** - * payment_method_options_param - * @description Payment-method-specific configuration. - */ - payment_method_options?: { - /** payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** payment_method_options_param */ - boleto?: { - expires_after_days?: number - } - /** payment_method_options_param */ - oxxo?: { - expires_after_days?: number - } - /** payment_method_options_param */ - wechat_pay?: { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - } - /** - * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - * - * Read more about the supported payment methods and their requirements in our [payment - * method details guide](/docs/payments/checkout/payment-methods). - * - * If multiple payment methods are passed, Checkout will dynamically reorder them to - * prioritize the most relevant payment methods based on the customer's location and - * other characteristics. - */ - payment_method_types?: ( - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - /** - * phone_number_collection_params - * @description Controls phone number collection settings for the session. - * - * We recommend that you review your privacy policy and check with your legal contacts - * before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). - */ - phone_number_collection?: { - enabled: boolean - } - /** - * setup_intent_data_param - * @description A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - */ - setup_intent_data?: { - description?: string - metadata?: { [key: string]: string } - on_behalf_of?: string - } - /** - * shipping_address_collection_params - * @description When set, provides configuration for Checkout to collect a shipping address from a customer. - */ - shipping_address_collection?: { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** @description The shipping rate options to apply to this Session. */ - shipping_options?: { - shipping_rate?: string - /** method_params */ - shipping_rate_data?: { - /** delivery_estimate */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - } - display_name: string - /** fixed_amount */ - fixed_amount?: { - amount: number - currency: string - } - metadata?: { [key: string]: string } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - tax_code?: string - /** @enum {string} */ - type?: 'fixed_amount' - } - }[] - /** - * @description Describes the type of transaction being performed by Checkout in order to customize - * relevant text on the page, such as the submit button. `submit_type` can only be - * specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - * in `subscription` or `setup` mode. - * @enum {string} - */ - submit_type?: 'auto' | 'book' | 'donate' | 'pay' - /** - * subscription_data_params - * @description A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - */ - subscription_data?: { - application_fee_percent?: number - default_tax_rates?: string[] - items?: { - plan: string - quantity?: number - tax_rates?: string[] - }[] - metadata?: { [key: string]: string } - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** Format: unix-time */ - trial_end?: number - trial_period_days?: number - } - /** - * @description The URL to which Stripe should send customers when payment or setup - * is complete. - * If you’d like to use information from the successful Checkout Session on your page, - * read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - */ - success_url: string - /** - * tax_id_collection_params - * @description Controls tax ID collection settings for the session. - */ - tax_id_collection?: { - enabled: boolean - } - } - } - } - } - /**

Retrieves a Session object.

*/ - GetCheckoutSessionsSession: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['checkout.session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

A Session can be expired when it is in one of these statuses: open

- * - *

After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.

- */ - PostCheckoutSessionsSessionExpire: { - parameters: { - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['checkout.session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetCheckoutSessionsSessionLineItems: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Lists all Country Spec objects available in the API.

*/ - GetCountrySpecs: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['country_spec'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a Country Spec for a given Country code.

*/ - GetCountrySpecsCountry: { - parameters: { - path: { - country: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['country_spec'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your coupons.

*/ - GetCoupons: { - parameters: { - query: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['coupon'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

- * - *

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

- */ - PostCoupons: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['coupon'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ - amount_off?: number - /** - * applies_to_params - * @description A hash containing directions for what this Coupon will apply discounts to. - */ - applies_to?: { - products?: string[] - } - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ - currency?: string - /** - * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. - * @enum {string} - */ - duration?: 'forever' | 'once' | 'repeating' - /** @description Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. */ - duration_in_months?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. */ - id?: string - /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ - max_redemptions?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string - /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ - percent_off?: number - /** - * Format: unix-time - * @description Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. - */ - redeem_by?: number - } - } - } - } - /**

Retrieves the coupon with the given ID.

*/ - GetCouponsCoupon: { - parameters: { - path: { - coupon: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['coupon'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

*/ - PostCouponsCoupon: { - parameters: { - path: { - coupon: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['coupon'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ - name?: string - } - } - } - } - /**

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

*/ - DeleteCouponsCoupon: { - parameters: { - path: { - coupon: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_coupon'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of credit notes.

*/ - GetCreditNotes: { - parameters: { - query: { - /** Only return credit notes for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return credit notes for the invoice specified by this invoice ID. */ - invoice?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['credit_note'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - * its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - * in any combination of the following:

- * - *
    - *
  • Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
  • - *
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • - *
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
  • - *
- * - *

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

- * - *

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount - * or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

- */ - PostCreditNotes: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['credit_note'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ - amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the invoice. */ - invoice: string - /** @description Line items that make up the credit note. */ - lines?: { - amount?: number - description?: string - invoice_line_item?: string - quantity?: number - tax_rates?: string[] | '' - /** @enum {string} */ - type: 'custom_line_item' | 'invoice_line_item' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - }[] - /** @description The credit note's memo appears on the credit note PDF. */ - memo?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** - * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - * @enum {string} - */ - reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' - /** @description ID of an existing refund to link this credit note to. */ - refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - } - } - } - } - /**

When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetCreditNotesCreditNoteLines: { - parameters: { - path: { - credit_note: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the credit note object with the given identifier.

*/ - GetCreditNotesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['credit_note'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing credit note.

*/ - PostCreditNotesId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['credit_note'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Credit note memo. */ - memo?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Marks a credit note as void. Learn more about voiding credit notes.

*/ - PostCreditNotesIdVoid: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['credit_note'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Get a preview of a credit note without creating it.

*/ - GetCreditNotesPreview: { - parameters: { - query: { - /** The integer amount in %s representing the total amount of the credit note. */ - amount?: number - /** The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** ID of the invoice. */ - invoice: string - /** Line items that make up the credit note. */ - lines?: { - amount?: number - description?: string - invoice_line_item?: string - quantity?: number - tax_rates?: string[] | '' - /** @enum {string} */ - type: 'custom_line_item' | 'invoice_line_item' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - }[] - /** The credit note's memo appears on the credit note PDF. */ - memo?: string - /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ - reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' - /** ID of an existing refund to link this credit note to. */ - refund?: string - /** The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['credit_note'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

*/ - GetCreditNotesPreviewLines: { - parameters: { - query: { - /** The integer amount in %s representing the total amount of the credit note. */ - amount?: number - /** The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ - credit_amount?: number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** ID of the invoice. */ - invoice: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Line items that make up the credit note. */ - lines?: { - amount?: number - description?: string - invoice_line_item?: string - quantity?: number - tax_rates?: string[] | '' - /** @enum {string} */ - type: 'custom_line_item' | 'invoice_line_item' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - }[] - /** The credit note's memo appears on the credit note PDF. */ - memo?: string - /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ - out_of_band_amount?: number - /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ - reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' - /** ID of an existing refund to link this credit note to. */ - refund?: string - /** The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ - refund_amount?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['credit_note_line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

*/ - GetCustomers: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. */ - email?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['customer'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new customer object.

*/ - PostCustomers: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The customer's address. */ - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number - coupon?: string - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: - | { - name: string - value: string - }[] - | '' - default_payment_method?: string - footer?: string - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The customer's full name or business name. */ - name?: string - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number - payment_method?: string - /** @description The customer's phone number. */ - phone?: string - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[] - /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ - promotion_code?: string - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | '' - source?: string - /** - * tax_param - * @description Tax details about the customer. - */ - tax?: { - ip_address?: string | '' - } - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description The customer's tax IDs. */ - tax_id_data?: { - /** @enum {string} */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'us_ein' - | 'za_vat' - value: string - }[] - } - } - } - } - /**

Retrieves a Customer object.

*/ - GetCustomersCustomer: { - parameters: { - path: { - customer: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer'] | components['schemas']['deleted_customer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

- * - *

This request accepts mostly the same arguments as the customer creation call.

- */ - PostCustomersCustomer: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The customer's address. */ - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ - balance?: number - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - cvc?: string - exp_month: number - exp_year: number - metadata?: { [key: string]: string } - name?: string - number: string - /** @enum {string} */ - object?: 'card' - } - | string - coupon?: string - /** @description ID of Alipay account to make the customer's new default for invoice payments. */ - default_alipay_account?: string - /** @description ID of bank account to make the customer's new default for invoice payments. */ - default_bank_account?: string - /** @description ID of card to make the customer's new default for invoice payments. */ - default_card?: string - /** - * @description If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - * - * Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - * - * If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - */ - default_source?: string - /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string - /** @description Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string - /** - * customer_param - * @description Default invoice settings for this customer. - */ - invoice_settings?: { - custom_fields?: - | { - name: string - value: string - }[] - | '' - default_payment_method?: string - footer?: string - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The customer's full name or business name. */ - name?: string - /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number - /** @description The customer's phone number. */ - phone?: string - /** @description Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[] - /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ - promotion_code?: string - /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | '' - source?: string - /** - * tax_param - * @description Tax details about the customer. - */ - tax?: { - ip_address?: string | '' - } - /** - * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - * @enum {string} - */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - } - } - } - } - /**

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

*/ - DeleteCustomersCustomer: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_customer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of transactions that updated the customer’s balances.

*/ - GetCustomersCustomerBalanceTransactions: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['customer_balance_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates an immutable transaction that updates the customer’s credit balance.

*/ - PostCustomersCustomerBalanceTransactions: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer_balance_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Retrieves a specific customer balance transaction that updated the customer’s balances.

*/ - GetCustomersCustomerBalanceTransactionsTransaction: { - parameters: { - path: { - customer: string - transaction: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer_balance_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Most credit balance transaction fields are immutable, but you may update its description and metadata.

*/ - PostCustomersCustomerBalanceTransactionsTransaction: { - parameters: { - path: { - customer: string - transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['customer_balance_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

*/ - GetCustomersCustomerBankAccounts: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bank_account'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerBankAccounts: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - cvc?: string - exp_month: number - exp_year: number - metadata?: { [key: string]: string } - name?: string - number: string - /** @enum {string} */ - object?: 'card' - } - | string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - } - /**

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

*/ - GetCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bank_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerBankAccountsIdVerify: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bank_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

You can see a list of the cards belonging to a customer. - * Note that the 10 most recent sources are always available on the Customer object. - * If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

- */ - GetCustomersCustomerCards: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerCards: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - cvc?: string - exp_month: number - exp_year: number - metadata?: { [key: string]: string } - name?: string - number: string - /** @enum {string} */ - object?: 'card' - } - | string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - } - /**

You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.

*/ - GetCustomersCustomerCardsId: { - parameters: { - path: { - customer: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['card'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerCardsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerCardsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - GetCustomersCustomerDiscount: { - parameters: { - path: { - customer: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['discount'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_discount'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetCustomersCustomerPaymentMethods: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter sources according to a particular object type. */ - object?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

When you create a new credit card, you must specify a customer or recipient on which to create it.

- * - *

If the card’s owner has no default card, then the new card will become the default. - * However, if the owner already has a default, then it will not change. - * To change the default, you should update the customer to have a new default_source.

- */ - PostCustomersCustomerSources: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ - alipay_account?: string - /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: - | { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - country: string - currency?: string - /** @enum {string} */ - object?: 'bank_account' - routing_number?: string - } - | string - /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - cvc?: string - exp_month: number - exp_year: number - metadata?: { [key: string]: string } - name?: string - number: string - /** @enum {string} */ - object?: 'card' - } - | string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string - } - } - } - } - /**

Retrieve a specified source for a given customer.

*/ - GetCustomersCustomerSourcesId: { - parameters: { - path: { - customer: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerSourcesId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['card'] | components['schemas']['bank_account'] | components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the person or business that owns the bank account. */ - account_holder_name?: string - /** - * @description The type of entity that holds the account. This can be either `individual` or `company`. - * @enum {string} - */ - account_holder_type?: 'company' | 'individual' - /** @description City/District/Suburb/Town/Village. */ - address_city?: string - /** @description Billing address country, if provided when creating card. */ - address_country?: string - /** @description Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string - /** @description Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string - /** @description State/County/Province/Region. */ - address_state?: string - /** @description ZIP or postal code. */ - address_zip?: string - /** @description Two digit number representing the card’s expiration month. */ - exp_month?: string - /** @description Four digit number representing the card’s expiration year. */ - exp_year?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Cardholder name. */ - name?: string - /** owner */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - } - } - } - } - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerSourcesId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_source'] | components['schemas']['deleted_payment_source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerSourcesIdVerify: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bank_account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.

*/ - GetCustomersCustomerSubscriptions: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new subscription on an existing customer.

*/ - PostCustomersCustomerSubscriptions: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - PostCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | { - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - } - } - } - } - /** - *

Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - DeleteCustomersCustomerSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Can be set to `true` if `at_period_end` is not set to `true`. Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean - } - } - } - } - GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['discount'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - path: { - customer: string - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_discount'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of tax IDs for a customer.

*/ - GetCustomersCustomerTaxIds: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['tax_id'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new TaxID object for a customer.

*/ - PostCustomersCustomerTaxIds: { - parameters: { - path: { - customer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_id'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` - * @enum {string} - */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'us_ein' - | 'za_vat' - /** @description Value of the tax ID. */ - value: string - } - } - } - } - /**

Retrieves the TaxID object with the given identifier.

*/ - GetCustomersCustomerTaxIdsId: { - parameters: { - path: { - customer: string - id: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_id'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Deletes an existing TaxID object.

*/ - DeleteCustomersCustomerTaxIdsId: { - parameters: { - path: { - customer: string - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_tax_id'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your disputes.

*/ - GetDisputes: { - parameters: { - query: { - /** Only return disputes associated to the charge specified by this charge ID. */ - charge?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['dispute'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the dispute with the given ID.

*/ - GetDisputesDispute: { - parameters: { - path: { - dispute: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

- * - *

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

- */ - PostDisputesDispute: { - parameters: { - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * dispute_evidence_params - * @description Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - */ - evidence?: { - access_activity_log?: string - billing_address?: string - cancellation_policy?: string - cancellation_policy_disclosure?: string - cancellation_rebuttal?: string - customer_communication?: string - customer_email_address?: string - customer_name?: string - customer_purchase_ip?: string - customer_signature?: string - duplicate_charge_documentation?: string - duplicate_charge_explanation?: string - duplicate_charge_id?: string - product_description?: string - receipt?: string - refund_policy?: string - refund_policy_disclosure?: string - refund_refusal_explanation?: string - service_date?: string - service_documentation?: string - shipping_address?: string - shipping_carrier?: string - shipping_date?: string - shipping_documentation?: string - shipping_tracking_number?: string - uncategorized_file?: string - uncategorized_text?: string - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ - submit?: boolean - } - } - } - } - /** - *

Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

- * - *

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

- */ - PostDisputesDisputeClose: { - parameters: { - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Creates a short-lived API key for a given resource.

*/ - PostEphemeralKeys: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['ephemeral_key'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The ID of the Customer you'd like to modify using the resulting ephemeral key. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ - issuing_card?: string - } - } - } - } - /**

Invalidates a short-lived API key for a given resource.

*/ - DeleteEphemeralKeysKey: { - parameters: { - path: { - key: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['ephemeral_key'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).

*/ - GetEvents: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ - delivery_success?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ - type?: string - /** An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ - types?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['event'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

*/ - GetEventsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['event'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.

*/ - GetExchangeRates: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['exchange_rate'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the exchange rates from the given currency to every supported currency.

*/ - GetExchangeRatesRateId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - rate_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['exchange_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of file links.

*/ - GetFileLinks: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Filter links by their expiration status. By default, all links are returned. */ - expired?: boolean - /** Only return links for the given file. */ - file?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['file_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new file link object.

*/ - PostFileLinks: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['file_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp after which the link will no longer be usable. - */ - expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ - file: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Retrieves the file link with the given ID.

*/ - GetFileLinksLink: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['file_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing file link object. Expired links can no longer be updated.

*/ - PostFileLinksLink: { - parameters: { - path: { - link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['file_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: 'now' | number | '' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

*/ - GetFiles: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The file purpose to filter queries by. If none is provided, files will not be filtered by purpose. */ - purpose?: - | 'account_requirement' - | 'additional_verification' - | 'business_icon' - | 'business_logo' - | 'customer_signature' - | 'dispute_evidence' - | 'document_provider_identity_document' - | 'finance_report_run' - | 'identity_document' - | 'identity_document_downloadable' - | 'pci_document' - | 'selfie' - | 'sigma_scheduled_query' - | 'tax_document_user_upload' - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['file'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

To upload a file to Stripe, you’ll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

- * - *

All of Stripe’s officially supported Client libraries should have support for sending multipart/form-data.

- */ - PostFiles: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['file'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'multipart/form-data': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the `multipart/form-data` protocol). */ - file: string - /** - * file_link_creation_params - * @description Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. - */ - file_link_data?: { - create: boolean - /** Format: unix-time */ - expires_at?: number - metadata?: { [key: string]: string } | '' - } - /** - * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. - * @enum {string} - */ - purpose: - | 'account_requirement' - | 'additional_verification' - | 'business_icon' - | 'business_logo' - | 'customer_signature' - | 'dispute_evidence' - | 'identity_document' - | 'pci_document' - | 'tax_document_user_upload' - } - } - } - } - /**

Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.

*/ - GetFilesFile: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - file: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['file'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List all verification reports.

*/ - GetIdentityVerificationReports: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return VerificationReports of this type */ - type?: 'document' | 'id_number' - /** Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. */ - verification_session?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['identity.verification_report'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves an existing VerificationReport

*/ - GetIdentityVerificationReportsReport: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - report: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_report'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of VerificationSessions

*/ - GetIdentityVerificationSessions: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ - status?: 'canceled' | 'processing' | 'requires_input' | 'verified' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['identity.verification_session'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a VerificationSession object.

- * - *

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url.

- * - *

If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.

- * - *

Related guide: Verify your users’ identity documents.

- */ - PostIdentityVerificationSessions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * session_options_param - * @description A set of options for the session’s verification checks. - */ - options?: { - document?: - | { - allowed_types?: ('driving_license' | 'id_card' | 'passport')[] - require_id_number?: boolean - require_live_capture?: boolean - require_matching_selfie?: boolean - } - | '' - } - /** @description The URL that the user will be redirected to upon completing the verification flow. */ - return_url?: string - /** - * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - * @enum {string} - */ - type: 'document' | 'id_number' - } - } - } - } - /** - *

Retrieves the details of a VerificationSession that was previously created.

- * - *

When the session status is requires_input, you can use this method to retrieve a valid - * client_secret or url to allow re-submission.

- */ - GetIdentityVerificationSessionsSession: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates a VerificationSession object.

- * - *

When the session status is requires_input, you can use this method to update the - * verification check and options.

- */ - PostIdentityVerificationSessionsSession: { - parameters: { - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * session_options_param - * @description A set of options for the session’s verification checks. - */ - options?: { - document?: - | { - allowed_types?: ('driving_license' | 'id_card' | 'passport')[] - require_id_number?: boolean - require_live_capture?: boolean - require_matching_selfie?: boolean - } - | '' - } - /** - * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - * @enum {string} - */ - type?: 'document' | 'id_number' - } - } - } - } - /** - *

A VerificationSession object can be canceled when it is in requires_input status.

- * - *

Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.

- */ - PostIdentityVerificationSessionsSessionCancel: { - parameters: { - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Redact a VerificationSession to remove all collected information from Stripe. This will redact - * the VerificationSession and all objects related to it, including VerificationReports, Events, - * request logs, etc.

- * - *

A VerificationSession object can be redacted when it is in requires_input or verified - * status. Redacting a VerificationSession in requires_action - * state will automatically cancel it.

- * - *

The redaction process may take up to four days. When the redaction process is in progress, the - * VerificationSession’s redaction.status field will be set to processing; when the process is - * finished, it will change to redacted and an identity.verification_session.redacted event - * will be emitted.

- * - *

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the - * fields that contain personal data will be replaced by the string [redacted] or a similar - * placeholder. The metadata field will also be erased. Redacted objects cannot be updated or - * used for any purpose.

- * - *

Learn more.

- */ - PostIdentityVerificationSessionsSessionRedact: { - parameters: { - path: { - session: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['identity.verification_session'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

*/ - GetInvoiceitems: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. */ - invoice?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. */ - pending?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['invoiceitem'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

*/ - PostInvoiceitems: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoiceitem'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ - amount?: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: string - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ - discountable?: boolean - /** @description The coupons to redeem into discounts for the invoice item or invoice line item. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. */ - invoice?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * period - * @description The period associated with this invoice item. - */ - period?: { - /** Format: unix-time */ - end: number - /** Format: unix-time */ - start: number - } - /** @description The ID of the price object. */ - price?: string - /** - * one_time_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number - /** @description The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. */ - subscription?: string - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ - tax_rates?: string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ - unit_amount?: number - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string - } - } - } - } - /**

Retrieves the invoice item with the given ID.

*/ - GetInvoiceitemsInvoiceitem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - invoiceitem: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoiceitem'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

*/ - PostInvoiceitemsInvoiceitem: { - parameters: { - path: { - invoiceitem: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoiceitem'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ - amount?: number - /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string - /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ - discountable?: boolean - /** @description The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * period - * @description The period associated with this invoice item. - */ - period?: { - /** Format: unix-time */ - end: number - /** Format: unix-time */ - start: number - } - /** @description The ID of the price object. */ - price?: string - /** - * one_time_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** @description Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number - /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ - unit_amount?: number - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string - } - } - } - } - /**

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

*/ - DeleteInvoiceitemsInvoiceitem: { - parameters: { - path: { - invoiceitem: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_invoiceitem'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ - GetInvoices: { - parameters: { - query: { - /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return invoices for the customer specified by this customer ID. */ - customer?: string - due_date?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) */ - status?: 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' - /** Only return invoices for the subscription specified by this subscription ID. */ - subscription?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['invoice'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ - PostInvoices: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ - application_fee_amount?: number - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this invoice. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description A list of up to 4 custom fields to be displayed on the invoice. */ - custom_fields?: - | { - name: string - value: string - }[] - | '' - /** @description The ID of the customer who will be billed. */ - customer: string - /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string - /** @description The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** - * Format: unix-time - * @description The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. - */ - due_date?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Footer to be displayed on the invoice. */ - footer?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: string - /** - * payment_settings - * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ - statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ - subscription?: string - /** - * transfer_data_specs - * @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. - */ - transfer_data?: { - amount?: number - destination: string - } - } - } - } - } - /**

Retrieves the invoice with the given ID.

*/ - GetInvoicesInvoice: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Draft invoices are fully editable. Once an invoice is finalized, - * monetary values, as well as collection_method, become uneditable.

- * - *

If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, - * sending reminders for, or automatically reconciling invoices, pass - * auto_advance=false.

- */ - PostInvoicesInvoice: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ - application_fee_amount?: number - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ - auto_advance?: boolean - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this invoice. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ - custom_fields?: - | { - name: string - value: string - }[] - | '' - /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ - days_until_due?: number - /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ - default_payment_method?: string - /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' - /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string - /** @description The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** - * Format: unix-time - * @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - */ - due_date?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Footer to be displayed on the invoice. */ - footer?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: string | '' - /** - * payment_settings - * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ - statement_descriptor?: string - /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount?: number - destination: string - } - | '' - } - } - } - } - /**

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

*/ - DeleteInvoicesInvoice: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

*/ - PostInvoicesInvoiceFinalize: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ - auto_advance?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetInvoicesInvoiceLines: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

*/ - PostInvoicesInvoiceMarkUncollectible: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

*/ - PostInvoicesInvoicePay: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - * - * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. - */ - forgive?: boolean - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ - off_session?: boolean - /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ - paid_out_of_band?: boolean - /** @description A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. */ - payment_method?: string - /** @description A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. */ - source?: string - } - } - } - } - /** - *

Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

- * - *

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

- */ - PostInvoicesInvoiceSend: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

*/ - PostInvoicesInvoiceVoid: { - parameters: { - path: { - invoice: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

- * - *

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.

- * - *

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

- */ - GetInvoicesUpcoming: { - parameters: { - query: { - /** Settings for automatic tax lookup for this invoice preview. */ - automatic_tax?: { - enabled: boolean - } - /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ - coupon?: string - /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ - customer?: string - /** Details about the customer you want to invoice or overrides for an existing customer. */ - customer_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | '' - /** tax_param */ - tax?: { - ip_address?: string | '' - } - /** @enum {string} */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - tax_ids?: { - /** @enum {string} */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'us_ein' - | 'za_vat' - value: string - }[] - } - /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** List of invoice items to add or update in the upcoming invoice preview. */ - invoice_items?: { - amount?: number - currency?: string - description?: string - discountable?: boolean - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - invoiceitem?: string - metadata?: { [key: string]: string } | '' - /** period */ - period?: { - /** Format: unix-time */ - end: number - /** Format: unix-time */ - start: number - } - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - }[] - /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ - schedule?: string - /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ - subscription?: string - /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ - subscription_billing_cycle_anchor?: ('now' | 'unchanged') | number - /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ - subscription_cancel_at?: number | '' - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - subscription_cancel_at_period_end?: boolean - /** This simulates the subscription being canceled or expired immediately. */ - subscription_cancel_now?: boolean - /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: string[] | '' - /** A list of up to 20 subscription items, each with an attached price. */ - subscription_items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ - subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ - subscription_proration_date?: number - /** Date a subscription is intended to start (can be future or past) */ - subscription_start_date?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: 'now' | number - /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - subscription_trial_from_plan?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['invoice'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetInvoicesUpcomingLines: { - parameters: { - query: { - /** Settings for automatic tax lookup for this invoice preview. */ - automatic_tax?: { - enabled: boolean - } - /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ - coupon?: string - /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ - customer?: string - /** Details about the customer you want to invoice or overrides for an existing customer. */ - customer_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | '' - /** tax_param */ - tax?: { - ip_address?: string | '' - } - /** @enum {string} */ - tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - tax_ids?: { - /** @enum {string} */ - type: - | 'ae_trn' - | 'au_abn' - | 'au_arn' - | 'br_cnpj' - | 'br_cpf' - | 'ca_bn' - | 'ca_gst_hst' - | 'ca_pst_bc' - | 'ca_pst_mb' - | 'ca_pst_sk' - | 'ca_qst' - | 'ch_vat' - | 'cl_tin' - | 'es_cif' - | 'eu_vat' - | 'gb_vat' - | 'ge_vat' - | 'hk_br' - | 'id_npwp' - | 'il_vat' - | 'in_gst' - | 'is_vat' - | 'jp_cn' - | 'jp_rn' - | 'kr_brn' - | 'li_uid' - | 'mx_rfc' - | 'my_frp' - | 'my_itn' - | 'my_sst' - | 'no_vat' - | 'nz_gst' - | 'ru_inn' - | 'ru_kpp' - | 'sa_vat' - | 'sg_gst' - | 'sg_uen' - | 'th_vat' - | 'tw_vat' - | 'ua_vat' - | 'us_ein' - | 'za_vat' - value: string - }[] - } - /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** List of invoice items to add or update in the upcoming invoice preview. */ - invoice_items?: { - amount?: number - currency?: string - description?: string - discountable?: boolean - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - invoiceitem?: string - metadata?: { [key: string]: string } | '' - /** period */ - period?: { - /** Format: unix-time */ - end: number - /** Format: unix-time */ - start: number - } - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - }[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ - schedule?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. */ - subscription?: string - /** For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. */ - subscription_billing_cycle_anchor?: ('now' | 'unchanged') | number - /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ - subscription_cancel_at?: number | '' - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - subscription_cancel_at_period_end?: boolean - /** This simulates the subscription being canceled or expired immediately. */ - subscription_cancel_now?: boolean - /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: string[] | '' - /** A list of up to 20 subscription items, each with an attached price. */ - subscription_items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ - subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ - subscription_proration_date?: number - /** Date a subscription is intended to start (can be future or past) */ - subscription_start_date?: number - /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: 'now' | number - /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - subscription_trial_from_plan?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['line_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of issuer fraud records.

*/ - GetIssuerFraudRecords: { - parameters: { - query: { - /** Only return issuer fraud records for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuer_fraud_record'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingAuthorizations: { - parameters: { - query: { - /** Only return authorizations that belong to the given card. */ - card?: string - /** Only return authorizations that belong to the given cardholder. */ - cardholder?: string - /** Only return authorizations that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. */ - status?: 'closed' | 'pending' | 'reversed' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.authorization'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves an Issuing Authorization object.

*/ - GetIssuingAuthorizationsAuthorization: { - parameters: { - path: { - authorization: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.authorization'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingAuthorizationsAuthorization: { - parameters: { - path: { - authorization: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.authorization'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.

*/ - PostIssuingAuthorizationsAuthorizationApprove: { - parameters: { - path: { - authorization: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.authorization'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.

*/ - PostIssuingAuthorizationsAuthorizationDecline: { - parameters: { - path: { - authorization: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.authorization'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingCardholders: { - parameters: { - query: { - /** Only return cardholders that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return cardholders that have the given email address. */ - email?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return cardholders that have the given phone number. */ - phone_number?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. */ - status?: 'active' | 'blocked' | 'inactive' - /** Only return cardholders that have the given type. One of `individual` or `company`. */ - type?: 'company' | 'individual' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.cardholder'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new Issuing Cardholder object that can be issued cards.

*/ - PostIssuingCardholders: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.cardholder'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - } - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string - } - /** @description The cardholder's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number - month: number - year: number - } - first_name: string - last_name: string - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ - name: string - /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ - phone_number?: string - /** - * authorization_controls_param_v2 - * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - spending_limits_currency?: string - } - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - * @enum {string} - */ - status?: 'active' | 'inactive' - /** - * @description One of `individual` or `company`. - * @enum {string} - */ - type: 'company' | 'individual' - } - } - } - } - /**

Retrieves an Issuing Cardholder object.

*/ - GetIssuingCardholdersCardholder: { - parameters: { - path: { - cardholder: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.cardholder'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingCardholdersCardholder: { - parameters: { - path: { - cardholder: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.cardholder'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_specs - * @description The cardholder's billing address. - */ - billing?: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - } - /** - * company_param - * @description Additional information about a `company` cardholder. - */ - company?: { - tax_id?: string - } - /** @description The cardholder's email address. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * individual_param - * @description Additional information about an `individual` cardholder. - */ - individual?: { - /** date_of_birth_specs */ - dob?: { - day: number - month: number - year: number - } - first_name: string - last_name: string - /** person_verification_param */ - verification?: { - /** person_verification_document_param */ - document?: { - back?: string - front?: string - } - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. */ - phone_number?: string - /** - * authorization_controls_param_v2 - * @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - spending_limits_currency?: string - } - /** - * @description Specifies whether to permit authorizations on this cardholder's cards. - * @enum {string} - */ - status?: 'active' | 'inactive' - } - } - } - } - /**

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingCards: { - parameters: { - query: { - /** Only return cards belonging to the Cardholder with the provided ID. */ - cardholder?: string - /** Only return cards that were issued during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Only return cards that have the given expiration month. */ - exp_month?: number - /** Only return cards that have the given expiration year. */ - exp_year?: number - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return cards that have the given last four digits. */ - last4?: string - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ - status?: 'active' | 'canceled' | 'inactive' - /** Only return cards that have the given type. One of `virtual` or `physical`. */ - type?: 'physical' | 'virtual' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates an Issuing Card object.

*/ - PostIssuingCards: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.card'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ - cardholder?: string - /** @description The currency for the card. */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The card this is meant to be a replacement for (if any). */ - replacement_for?: string - /** - * @description If `replacement_for` is specified, this should indicate why that card is being replaced. - * @enum {string} - */ - replacement_reason?: 'damaged' | 'expired' | 'lost' | 'stolen' - /** - * shipping_specs - * @description The address where the card will be shipped. - */ - shipping?: { - /** required_address */ - address: { - city: string - country: string - line1: string - line2?: string - postal_code: string - state?: string - } - name: string - /** @enum {string} */ - service?: 'express' | 'priority' | 'standard' - /** @enum {string} */ - type?: 'bulk' | 'individual' - } - /** - * authorization_controls_param - * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - } - /** - * @description Whether authorizations can be approved on this card. Defaults to `inactive`. - * @enum {string} - */ - status?: 'active' | 'inactive' - /** - * @description The type of card to issue. Possible values are `physical` or `virtual`. - * @enum {string} - */ - type: 'physical' | 'virtual' - } - } - } - } - /**

Retrieves an Issuing Card object.

*/ - GetIssuingCardsCard: { - parameters: { - path: { - card: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.card'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingCardsCard: { - parameters: { - path: { - card: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.card'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason why the `status` of this card is `canceled`. - * @enum {string} - */ - cancellation_reason?: 'lost' | 'stolen' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * encrypted_pin_param - * @description The desired new PIN for this card. - */ - pin?: { - encrypted_number?: string - } - /** - * authorization_controls_param - * @description Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - */ - spending_controls?: { - allowed_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - blocked_categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - spending_limits?: { - amount: number - categories?: ( - | 'ac_refrigeration_repair' - | 'accounting_bookkeeping_services' - | 'advertising_services' - | 'agricultural_cooperative' - | 'airlines_air_carriers' - | 'airports_flying_fields' - | 'ambulance_services' - | 'amusement_parks_carnivals' - | 'antique_reproductions' - | 'antique_shops' - | 'aquariums' - | 'architectural_surveying_services' - | 'art_dealers_and_galleries' - | 'artists_supply_and_craft_shops' - | 'auto_and_home_supply_stores' - | 'auto_body_repair_shops' - | 'auto_paint_shops' - | 'auto_service_shops' - | 'automated_cash_disburse' - | 'automated_fuel_dispensers' - | 'automobile_associations' - | 'automotive_parts_and_accessories_stores' - | 'automotive_tire_stores' - | 'bail_and_bond_payments' - | 'bakeries' - | 'bands_orchestras' - | 'barber_and_beauty_shops' - | 'betting_casino_gambling' - | 'bicycle_shops' - | 'billiard_pool_establishments' - | 'boat_dealers' - | 'boat_rentals_and_leases' - | 'book_stores' - | 'books_periodicals_and_newspapers' - | 'bowling_alleys' - | 'bus_lines' - | 'business_secretarial_schools' - | 'buying_shopping_services' - | 'cable_satellite_and_other_pay_television_and_radio' - | 'camera_and_photographic_supply_stores' - | 'candy_nut_and_confectionery_stores' - | 'car_and_truck_dealers_new_used' - | 'car_and_truck_dealers_used_only' - | 'car_rental_agencies' - | 'car_washes' - | 'carpentry_services' - | 'carpet_upholstery_cleaning' - | 'caterers' - | 'charitable_and_social_service_organizations_fundraising' - | 'chemicals_and_allied_products' - | 'child_care_services' - | 'childrens_and_infants_wear_stores' - | 'chiropodists_podiatrists' - | 'chiropractors' - | 'cigar_stores_and_stands' - | 'civic_social_fraternal_associations' - | 'cleaning_and_maintenance' - | 'clothing_rental' - | 'colleges_universities' - | 'commercial_equipment' - | 'commercial_footwear' - | 'commercial_photography_art_and_graphics' - | 'commuter_transport_and_ferries' - | 'computer_network_services' - | 'computer_programming' - | 'computer_repair' - | 'computer_software_stores' - | 'computers_peripherals_and_software' - | 'concrete_work_services' - | 'construction_materials' - | 'consulting_public_relations' - | 'correspondence_schools' - | 'cosmetic_stores' - | 'counseling_services' - | 'country_clubs' - | 'courier_services' - | 'court_costs' - | 'credit_reporting_agencies' - | 'cruise_lines' - | 'dairy_products_stores' - | 'dance_hall_studios_schools' - | 'dating_escort_services' - | 'dentists_orthodontists' - | 'department_stores' - | 'detective_agencies' - | 'digital_goods_applications' - | 'digital_goods_games' - | 'digital_goods_large_volume' - | 'digital_goods_media' - | 'direct_marketing_catalog_merchant' - | 'direct_marketing_combination_catalog_and_retail_merchant' - | 'direct_marketing_inbound_telemarketing' - | 'direct_marketing_insurance_services' - | 'direct_marketing_other' - | 'direct_marketing_outbound_telemarketing' - | 'direct_marketing_subscription' - | 'direct_marketing_travel' - | 'discount_stores' - | 'doctors' - | 'door_to_door_sales' - | 'drapery_window_covering_and_upholstery_stores' - | 'drinking_places' - | 'drug_stores_and_pharmacies' - | 'drugs_drug_proprietaries_and_druggist_sundries' - | 'dry_cleaners' - | 'durable_goods' - | 'duty_free_stores' - | 'eating_places_restaurants' - | 'educational_services' - | 'electric_razor_stores' - | 'electrical_parts_and_equipment' - | 'electrical_services' - | 'electronics_repair_shops' - | 'electronics_stores' - | 'elementary_secondary_schools' - | 'employment_temp_agencies' - | 'equipment_rental' - | 'exterminating_services' - | 'family_clothing_stores' - | 'fast_food_restaurants' - | 'financial_institutions' - | 'fines_government_administrative_entities' - | 'fireplace_fireplace_screens_and_accessories_stores' - | 'floor_covering_stores' - | 'florists' - | 'florists_supplies_nursery_stock_and_flowers' - | 'freezer_and_locker_meat_provisioners' - | 'fuel_dealers_non_automotive' - | 'funeral_services_crematories' - | 'furniture_home_furnishings_and_equipment_stores_except_appliances' - | 'furniture_repair_refinishing' - | 'furriers_and_fur_shops' - | 'general_services' - | 'gift_card_novelty_and_souvenir_shops' - | 'glass_paint_and_wallpaper_stores' - | 'glassware_crystal_stores' - | 'golf_courses_public' - | 'government_services' - | 'grocery_stores_supermarkets' - | 'hardware_equipment_and_supplies' - | 'hardware_stores' - | 'health_and_beauty_spas' - | 'hearing_aids_sales_and_supplies' - | 'heating_plumbing_a_c' - | 'hobby_toy_and_game_shops' - | 'home_supply_warehouse_stores' - | 'hospitals' - | 'hotels_motels_and_resorts' - | 'household_appliance_stores' - | 'industrial_supplies' - | 'information_retrieval_services' - | 'insurance_default' - | 'insurance_underwriting_premiums' - | 'intra_company_purchases' - | 'jewelry_stores_watches_clocks_and_silverware_stores' - | 'landscaping_services' - | 'laundries' - | 'laundry_cleaning_services' - | 'legal_services_attorneys' - | 'luggage_and_leather_goods_stores' - | 'lumber_building_materials_stores' - | 'manual_cash_disburse' - | 'marinas_service_and_supplies' - | 'masonry_stonework_and_plaster' - | 'massage_parlors' - | 'medical_and_dental_labs' - | 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies' - | 'medical_services' - | 'membership_organizations' - | 'mens_and_boys_clothing_and_accessories_stores' - | 'mens_womens_clothing_stores' - | 'metal_service_centers' - | 'miscellaneous' - | 'miscellaneous_apparel_and_accessory_shops' - | 'miscellaneous_auto_dealers' - | 'miscellaneous_business_services' - | 'miscellaneous_food_stores' - | 'miscellaneous_general_merchandise' - | 'miscellaneous_general_services' - | 'miscellaneous_home_furnishing_specialty_stores' - | 'miscellaneous_publishing_and_printing' - | 'miscellaneous_recreation_services' - | 'miscellaneous_repair_shops' - | 'miscellaneous_specialty_retail' - | 'mobile_home_dealers' - | 'motion_picture_theaters' - | 'motor_freight_carriers_and_trucking' - | 'motor_homes_dealers' - | 'motor_vehicle_supplies_and_new_parts' - | 'motorcycle_shops_and_dealers' - | 'motorcycle_shops_dealers' - | 'music_stores_musical_instruments_pianos_and_sheet_music' - | 'news_dealers_and_newsstands' - | 'non_fi_money_orders' - | 'non_fi_stored_value_card_purchase_load' - | 'nondurable_goods' - | 'nurseries_lawn_and_garden_supply_stores' - | 'nursing_personal_care' - | 'office_and_commercial_furniture' - | 'opticians_eyeglasses' - | 'optometrists_ophthalmologist' - | 'orthopedic_goods_prosthetic_devices' - | 'osteopaths' - | 'package_stores_beer_wine_and_liquor' - | 'paints_varnishes_and_supplies' - | 'parking_lots_garages' - | 'passenger_railways' - | 'pawn_shops' - | 'pet_shops_pet_food_and_supplies' - | 'petroleum_and_petroleum_products' - | 'photo_developing' - | 'photographic_photocopy_microfilm_equipment_and_supplies' - | 'photographic_studios' - | 'picture_video_production' - | 'piece_goods_notions_and_other_dry_goods' - | 'plumbing_heating_equipment_and_supplies' - | 'political_organizations' - | 'postal_services_government_only' - | 'precious_stones_and_metals_watches_and_jewelry' - | 'professional_services' - | 'public_warehousing_and_storage' - | 'quick_copy_repro_and_blueprint' - | 'railroads' - | 'real_estate_agents_and_managers_rentals' - | 'record_stores' - | 'recreational_vehicle_rentals' - | 'religious_goods_stores' - | 'religious_organizations' - | 'roofing_siding_sheet_metal' - | 'secretarial_support_services' - | 'security_brokers_dealers' - | 'service_stations' - | 'sewing_needlework_fabric_and_piece_goods_stores' - | 'shoe_repair_hat_cleaning' - | 'shoe_stores' - | 'small_appliance_repair' - | 'snowmobile_dealers' - | 'special_trade_services' - | 'specialty_cleaning' - | 'sporting_goods_stores' - | 'sporting_recreation_camps' - | 'sports_and_riding_apparel_stores' - | 'sports_clubs_fields' - | 'stamp_and_coin_stores' - | 'stationary_office_supplies_printing_and_writing_paper' - | 'stationery_stores_office_and_school_supply_stores' - | 'swimming_pools_sales' - | 't_ui_travel_germany' - | 'tailors_alterations' - | 'tax_payments_government_agencies' - | 'tax_preparation_services' - | 'taxicabs_limousines' - | 'telecommunication_equipment_and_telephone_sales' - | 'telecommunication_services' - | 'telegraph_services' - | 'tent_and_awning_shops' - | 'testing_laboratories' - | 'theatrical_ticket_agencies' - | 'timeshares' - | 'tire_retreading_and_repair' - | 'tolls_bridge_fees' - | 'tourist_attractions_and_exhibits' - | 'towing_services' - | 'trailer_parks_campgrounds' - | 'transportation_services' - | 'travel_agencies_tour_operators' - | 'truck_stop_iteration' - | 'truck_utility_trailer_rentals' - | 'typesetting_plate_making_and_related_services' - | 'typewriter_stores' - | 'u_s_federal_government_agencies_or_departments' - | 'uniforms_commercial_clothing' - | 'used_merchandise_and_secondhand_stores' - | 'utilities' - | 'variety_stores' - | 'veterinary_services' - | 'video_amusement_game_supplies' - | 'video_game_arcades' - | 'video_tape_rental_stores' - | 'vocational_trade_schools' - | 'watch_jewelry_repair' - | 'welding_repair' - | 'wholesale_clubs' - | 'wig_and_toupee_stores' - | 'wires_money_orders' - | 'womens_accessory_and_specialty_shops' - | 'womens_ready_to_wear_stores' - | 'wrecking_and_salvage_yards' - )[] - /** @enum {string} */ - interval: 'all_time' | 'daily' | 'monthly' | 'per_authorization' | 'weekly' | 'yearly' - }[] - } - /** - * @description Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - * @enum {string} - */ - status?: 'active' | 'canceled' | 'inactive' - } - } - } - } - /**

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingDisputes: { - parameters: { - query: { - /** Select Issuing disputes that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Select Issuing disputes with the given status. */ - status?: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' - /** Select the Issuing dispute for the given transaction. */ - transaction?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.dispute'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

*/ - PostIssuingDisputes: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * evidence_param - * @description Evidence provided for the dispute. - */ - evidence?: { - canceled?: - | { - additional_documentation?: string | '' - canceled_at?: number | '' - cancellation_policy_provided?: boolean | '' - cancellation_reason?: string - expected_at?: number | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - /** @enum {string} */ - return_status?: '' | 'merchant_rejected' | 'successful' - returned_at?: number | '' - } - | '' - duplicate?: - | { - additional_documentation?: string | '' - card_statement?: string | '' - cash_receipt?: string | '' - check_image?: string | '' - explanation?: string - original_transaction?: string - } - | '' - fraudulent?: - | { - additional_documentation?: string | '' - explanation?: string - } - | '' - merchandise_not_as_described?: - | { - additional_documentation?: string | '' - explanation?: string - received_at?: number | '' - return_description?: string - /** @enum {string} */ - return_status?: '' | 'merchant_rejected' | 'successful' - returned_at?: number | '' - } - | '' - not_received?: - | { - additional_documentation?: string | '' - expected_at?: number | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - } - | '' - other?: - | { - additional_documentation?: string | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - } - | '' - /** @enum {string} */ - reason?: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' - service_not_as_described?: - | { - additional_documentation?: string | '' - canceled_at?: number | '' - cancellation_reason?: string - explanation?: string - received_at?: number | '' - } - | '' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string - } - } - } - } - /**

Retrieves an Issuing Dispute object.

*/ - GetIssuingDisputesDispute: { - parameters: { - path: { - dispute: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

*/ - PostIssuingDisputesDispute: { - parameters: { - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * evidence_param - * @description Evidence provided for the dispute. - */ - evidence?: { - canceled?: - | { - additional_documentation?: string | '' - canceled_at?: number | '' - cancellation_policy_provided?: boolean | '' - cancellation_reason?: string - expected_at?: number | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - /** @enum {string} */ - return_status?: '' | 'merchant_rejected' | 'successful' - returned_at?: number | '' - } - | '' - duplicate?: - | { - additional_documentation?: string | '' - card_statement?: string | '' - cash_receipt?: string | '' - check_image?: string | '' - explanation?: string - original_transaction?: string - } - | '' - fraudulent?: - | { - additional_documentation?: string | '' - explanation?: string - } - | '' - merchandise_not_as_described?: - | { - additional_documentation?: string | '' - explanation?: string - received_at?: number | '' - return_description?: string - /** @enum {string} */ - return_status?: '' | 'merchant_rejected' | 'successful' - returned_at?: number | '' - } - | '' - not_received?: - | { - additional_documentation?: string | '' - expected_at?: number | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - } - | '' - other?: - | { - additional_documentation?: string | '' - explanation?: string - product_description?: string - /** @enum {string} */ - product_type?: '' | 'merchandise' | 'service' - } - | '' - /** @enum {string} */ - reason?: 'canceled' | 'duplicate' | 'fraudulent' | 'merchandise_not_as_described' | 'not_received' | 'other' | 'service_not_as_described' - service_not_as_described?: - | { - additional_documentation?: string | '' - canceled_at?: number | '' - cancellation_reason?: string - explanation?: string - received_at?: number | '' - } - | '' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

*/ - PostIssuingDisputesDisputeSubmit: { - parameters: { - path: { - dispute: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.dispute'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of Issuing Settlement objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingSettlements: { - parameters: { - query: { - /** Only return issuing settlements that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.settlement'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves an Issuing Settlement object.

*/ - GetIssuingSettlementsSettlement: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - settlement: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.settlement'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Settlement object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingSettlementsSettlement: { - parameters: { - path: { - settlement: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.settlement'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetIssuingTransactions: { - parameters: { - query: { - /** Only return transactions that belong to the given card. */ - card?: string - /** Only return transactions that belong to the given cardholder. */ - cardholder?: string - /** Only return transactions that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return transactions that have the given type. One of `capture` or `refund`. */ - type?: 'capture' | 'refund' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuing.transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves an Issuing Transaction object.

*/ - GetIssuingTransactionsTransaction: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostIssuingTransactionsTransaction: { - parameters: { - path: { - transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuing.transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Retrieves a Mandate object.

*/ - GetMandatesMandate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - mandate: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['mandate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - GetOrderReturns: { - parameters: { - query: { - /** Date this return was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - GetOrderReturnsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order_return'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - GetOrders: { - parameters: { - query: { - /** Date this order was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return orders for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return orders with the given IDs. */ - ids?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: { - canceled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - fulfilled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - paid?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - returned?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - } - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new order object.

*/ - PostOrders: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - } - } - } - } - /**

Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.

*/ - GetOrdersId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostOrdersId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } - } - } - } - /**

Pay an order by providing a source to create a payment.

*/ - PostOrdersIdPay: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string - } - } - } - } - /**

Return all or part of an order. The order must have a status of paid or fulfilled before it can be returned. Once all items have been returned, the order will become canceled or returned depending on which status the order started in.

*/ - PostOrdersIdReturns: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['order_return'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: - | { - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - | '' - } - } - } - } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { - parameters: { - query: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return PaymentIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a PaymentIntent object.

- * - *

After the PaymentIntent is created, attach a payment method and confirm - * to continue the payment. You can read more about the different payment flows - * available via the Payment Intents API here.

- * - *

When confirm=true is used during creation, it is equivalent to creating - * and confirming the PaymentIntent in the same call. You may use any parameters - * available in the confirm API when confirm=true - * is supplied.

- */ - PostPaymentIntents: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number - /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. - */ - automatic_payment_methods?: { - enabled: boolean - } - /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} - */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: boolean | ('one_off' | 'recurring') - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string - } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number - } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - destination: string - } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean - } - } - } - } - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - GetPaymentIntentsIntent: { - parameters: { - query: { - /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ - client_secret?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates properties on a PaymentIntent object without confirming.

- * - *

Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to - * update and confirm at the same time, we recommend updating properties via - * the confirm API instead.

- */ - PostPaymentIntentsIntent: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | '' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string - } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number - } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - | '' - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - } - } - } - } - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

- */ - PostPaymentIntentsIntentCancel: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number - } - } - } - } - } - /** - *

Confirm that your customer intends to pay with current or provided - * payment method. Upon confirmation, the PaymentIntent will attempt to initiate - * a payment.

- * - *

If the selected payment method requires additional authentication steps, the - * PaymentIntent will transition to the requires_action status and - * suggest additional actions via next_action. If payment fails, - * the PaymentIntent will transition to the requires_payment_method status. If - * payment succeeds, the PaymentIntent will transition to the succeeded - * status (or requires_capture, if capture_method is set to manual).

- * - *

If the confirmation_method is automatic, payment may be attempted - * using our client SDKs - * and the PaymentIntent’s client_secret. - * After next_actions are handled by the client, no additional - * confirmation is required to complete the payment.

- * - *

If the confirmation_method is manual, all payment attempts must be - * initiated using a secret key. - * If any actions are required for the payment, the PaymentIntent will - * return to the requires_confirmation state - * after those actions are completed. Your server needs to then - * explicitly re-confirm the PaymentIntent to initiate the next payment - * attempt. Read the expanded documentation - * to learn more about manual confirmation.

- */ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ - error_on_requires_action?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description ID of the mandate to be used for this payment. */ - mandate?: string - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } - } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - off_session?: boolean | ('one_off' | 'recurring') - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string - } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number - } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' - /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - | '' - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean - } - } - } - } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of your payment links.

*/ - GetPaymentLinks: { - parameters: { - query: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a payment link.

*/ - PostPaymentLinks: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} - */ - billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - price: string - quantity: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: 'card'[] - /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. - * - * We recommend that you review your privacy policy and check with your legal contacts. - */ - phone_number_collection?: { - enabled: boolean - } - /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. - */ - shipping_address_collection?: { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - */ - subscription_data?: { - trial_period_days?: number - } - /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - */ - transfer_data?: { - amount?: number - destination: string - } - } - } - } - } - /**

Retrieve a payment link.

*/ - GetPaymentLinksPaymentLink: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a payment link.

*/ - PostPaymentLinksPaymentLink: { - parameters: { - path: { - payment_link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} - */ - billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - id: string - quantity?: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | '' - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: - | { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - | '' - } - } - } - } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetPaymentLinksPaymentLinkLineItems: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - payment_link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - GetPaymentMethods: { - parameters: { - query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

- * - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

- */ - PostPaymentMethods: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - */ - afterpay_clearpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - */ - alipay?: { [key: string]: unknown } - /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - */ - bacs_debit?: { - account_number?: string - sort_code?: string - } - /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - */ - bancontact?: { [key: string]: unknown } - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: - | { - cvc?: string - exp_month: number - exp_year: number - number: string - } - | { - token: string - } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: { [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: { [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: { [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: { [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - PostPaymentMethodsPaymentMethod: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number - exp_year?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /** - *

Attaches a PaymentMethod object to a Customer.

- * - *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent - * or a PaymentIntent with setup_future_usage. - * These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the - * /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. - * See Optimizing cards for future payments for more information about setting up future payments.

- * - *

To use this PaymentMethod as the default for invoice or subscription payments, - * set invoice_settings.default_payment_method, - * on the Customer to the PaymentMethod’s ID.

- */ - PostPaymentMethodsPaymentMethodAttach: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - GetPayouts: { - parameters: { - query: { - arrival_date?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payout'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you’ll receive an “Insufficient Funds” error.

- * - *

If your API key is in test mode, money won’t actually be sent, though everything else will occur as if in live mode.

- * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source types, you’ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.

- */ - PostPayouts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) - * @enum {string} - */ - method?: 'instant' | 'standard' - /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - } - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - PostPayoutsPayoutReverse: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Returns a list of your plans.

*/ - GetPlans: { - parameters: { - query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - PostPlans: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - active?: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number - /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - */ - amount_decimal?: string - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string - /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - product?: - | { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } - | string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: 'licensed' | 'metered' - } - } - } - } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - } - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your prices.

*/ - GetPrices: { - parameters: { - query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return prices for the given currency. */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return the price with these lookup_keys, if any exist. */ - lookup_keys?: string[] - /** Only return prices for the given product. */ - product?: string - /** Only return prices with these recurring fields. */ - recurring?: { - /** @enum {string} */ - interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - type?: 'one_time' | 'recurring' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['price'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - PostPrices: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** @description The ID of the product that this price will belong to. */ - product?: string - /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. - */ - product_data?: { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } - /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. - */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_quantity?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - unit_amount?: number - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string - } - } - } - } - /**

Retrieves the price with the given ID.

*/ - GetPricesPrice: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - price: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - PostPricesPrice: { - parameters: { - path: { - price: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean - } - } - } - } - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - GetProducts: { - parameters: { - query: { - /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return products that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return products with the given IDs. */ - ids?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return products with the given url. */ - url?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['product'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new product object.

*/ - PostProducts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string - /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. - */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. - */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string - } - } - } - } - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - GetProductsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostProductsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] | '' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string | '' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string - } - } - } - } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - DeleteProductsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your promotion codes.

*/ - GetPromotionCodes: { - parameters: { - query: { - /** Filter promotion codes by whether they are active. */ - active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - code?: string - /** Only return promotion codes for this coupon. */ - coupon?: string - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return promotion codes that are restricted to this customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['promotion_code'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - PostPromotionCodes: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['promotion_code'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ - active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string - /** @description The coupon for this promotion code. */ - coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. - */ - expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. - */ - restrictions?: { - first_time_transaction?: boolean - minimum_amount?: number - minimum_amount_currency?: string - } - } - } - } - } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - GetPromotionCodesPromotionCode: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - promotion_code: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['promotion_code'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - PostPromotionCodesPromotionCode: { - parameters: { - path: { - promotion_code: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['promotion_code'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of your quotes.

*/ - GetQuotes: { - parameters: { - query: { - /** The ID of the customer whose quotes will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the quote. */ - status?: 'accepted' | 'canceled' | 'draft' | 'open' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['quote'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - PostQuotes: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string - /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - */ - from_quote?: { - is_revision?: boolean - quote: string - } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' - /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' - } - } - } - } - /**

Retrieves the quote with the given ID.

*/ - GetQuotesQuote: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A quote models prices and services for a customer.

*/ - PostQuotesQuote: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string - /** @description A header that will be displayed on the quote PDF. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - id?: string - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' - /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' - } - } - } - } - /**

Accepts the specified quote.

*/ - PostQuotesQuoteAccept: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Cancels the quote.

*/ - PostQuotesQuoteCancel: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - GetQuotesQuoteComputedUpfrontLineItems: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Finalizes the quote.

*/ - PostQuotesQuoteFinalize: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - } - } - } - } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetQuotesQuoteLineItems: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Download the PDF for a finalized quote

*/ - GetQuotesQuotePdf: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/pdf': string - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { - parameters: { - query: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the details of an early fraud warning that has previously been created.

- * - *

Please refer to the early fraud warning object reference for more details.

- */ - GetRadarEarlyFraudWarningsEarlyFraudWarning: { - parameters: { - path: { - early_fraud_warning: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.early_fraud_warning'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetRadarValueListItems: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ - value?: string - /** Identifier for the parent value list this item belongs to. */ - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['radar.value_list_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - PostRadarValueListItems: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.value_list_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string - } - } - } - } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.value_list_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - DeleteRadarValueListItemsItem: { - parameters: { - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_radar.value_list_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetRadarValueLists: { - parameters: { - query: { - /** The alias used to reference the value list when writing rules. */ - alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - contains?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['radar.value_list'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - PostRadarValueLists: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.value_list'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - * @enum {string} - */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name: string - } - } - } - } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.value_list'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ - PostRadarValueListsValueList: { - parameters: { - path: { - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['radar.value_list'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name?: string - } - } - } - } - /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ - DeleteRadarValueListsValueList: { - parameters: { - path: { - value_list: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_radar.value_list'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - GetRecipients: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - type?: 'corporation' | 'individual' - /** Only return recipients that are verified or unverified. */ - verified?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['recipient'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a new Recipient object and verifies the recipient’s identity. - * Also verifies the recipient’s bank account information or debit card, if either is provided.

- */ - PostRecipients: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['recipient'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string - } - } - } - } - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - GetRecipientsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['recipient'] | components['schemas']['deleted_recipient'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified recipient by setting the values of the parameters passed. - * Any parameters not provided will be left unchanged.

- * - *

If you update the name or tax ID, the identity verification will automatically be rerun. - * If you update the bank account, the bank account validation will automatically be rerun.

- */ - PostRecipientsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['recipient'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - } - } - } - } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_recipient'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ - GetRefunds: { - parameters: { - query: { - /** Only return refunds for the charge specified by this charge ID. */ - charge?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return refunds for the PaymentIntent specified by this ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['refund'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Create a refund.

*/ - PostRefunds: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - amount?: number - charge?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - refund: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata as an argument.

- */ - PostRefundsRefund: { - parameters: { - path: { - refund: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['refund'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['reporting.report_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ - PostReportingReportRuns: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['reporting.report_run'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - /** Format: unix-time */ - interval_end?: number - /** Format: unix-time */ - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' - | 'Africa/Kampala' - | 'Africa/Khartoum' - | 'Africa/Kigali' - | 'Africa/Kinshasa' - | 'Africa/Lagos' - | 'Africa/Libreville' - | 'Africa/Lome' - | 'Africa/Luanda' - | 'Africa/Lubumbashi' - | 'Africa/Lusaka' - | 'Africa/Malabo' - | 'Africa/Maputo' - | 'Africa/Maseru' - | 'Africa/Mbabane' - | 'Africa/Mogadishu' - | 'Africa/Monrovia' - | 'Africa/Nairobi' - | 'Africa/Ndjamena' - | 'Africa/Niamey' - | 'Africa/Nouakchott' - | 'Africa/Ouagadougou' - | 'Africa/Porto-Novo' - | 'Africa/Sao_Tome' - | 'Africa/Timbuktu' - | 'Africa/Tripoli' - | 'Africa/Tunis' - | 'Africa/Windhoek' - | 'America/Adak' - | 'America/Anchorage' - | 'America/Anguilla' - | 'America/Antigua' - | 'America/Araguaina' - | 'America/Argentina/Buenos_Aires' - | 'America/Argentina/Catamarca' - | 'America/Argentina/ComodRivadavia' - | 'America/Argentina/Cordoba' - | 'America/Argentina/Jujuy' - | 'America/Argentina/La_Rioja' - | 'America/Argentina/Mendoza' - | 'America/Argentina/Rio_Gallegos' - | 'America/Argentina/Salta' - | 'America/Argentina/San_Juan' - | 'America/Argentina/San_Luis' - | 'America/Argentina/Tucuman' - | 'America/Argentina/Ushuaia' - | 'America/Aruba' - | 'America/Asuncion' - | 'America/Atikokan' - | 'America/Atka' - | 'America/Bahia' - | 'America/Bahia_Banderas' - | 'America/Barbados' - | 'America/Belem' - | 'America/Belize' - | 'America/Blanc-Sablon' - | 'America/Boa_Vista' - | 'America/Bogota' - | 'America/Boise' - | 'America/Buenos_Aires' - | 'America/Cambridge_Bay' - | 'America/Campo_Grande' - | 'America/Cancun' - | 'America/Caracas' - | 'America/Catamarca' - | 'America/Cayenne' - | 'America/Cayman' - | 'America/Chicago' - | 'America/Chihuahua' - | 'America/Coral_Harbour' - | 'America/Cordoba' - | 'America/Costa_Rica' - | 'America/Creston' - | 'America/Cuiaba' - | 'America/Curacao' - | 'America/Danmarkshavn' - | 'America/Dawson' - | 'America/Dawson_Creek' - | 'America/Denver' - | 'America/Detroit' - | 'America/Dominica' - | 'America/Edmonton' - | 'America/Eirunepe' - | 'America/El_Salvador' - | 'America/Ensenada' - | 'America/Fort_Nelson' - | 'America/Fort_Wayne' - | 'America/Fortaleza' - | 'America/Glace_Bay' - | 'America/Godthab' - | 'America/Goose_Bay' - | 'America/Grand_Turk' - | 'America/Grenada' - | 'America/Guadeloupe' - | 'America/Guatemala' - | 'America/Guayaquil' - | 'America/Guyana' - | 'America/Halifax' - | 'America/Havana' - | 'America/Hermosillo' - | 'America/Indiana/Indianapolis' - | 'America/Indiana/Knox' - | 'America/Indiana/Marengo' - | 'America/Indiana/Petersburg' - | 'America/Indiana/Tell_City' - | 'America/Indiana/Vevay' - | 'America/Indiana/Vincennes' - | 'America/Indiana/Winamac' - | 'America/Indianapolis' - | 'America/Inuvik' - | 'America/Iqaluit' - | 'America/Jamaica' - | 'America/Jujuy' - | 'America/Juneau' - | 'America/Kentucky/Louisville' - | 'America/Kentucky/Monticello' - | 'America/Knox_IN' - | 'America/Kralendijk' - | 'America/La_Paz' - | 'America/Lima' - | 'America/Los_Angeles' - | 'America/Louisville' - | 'America/Lower_Princes' - | 'America/Maceio' - | 'America/Managua' - | 'America/Manaus' - | 'America/Marigot' - | 'America/Martinique' - | 'America/Matamoros' - | 'America/Mazatlan' - | 'America/Mendoza' - | 'America/Menominee' - | 'America/Merida' - | 'America/Metlakatla' - | 'America/Mexico_City' - | 'America/Miquelon' - | 'America/Moncton' - | 'America/Monterrey' - | 'America/Montevideo' - | 'America/Montreal' - | 'America/Montserrat' - | 'America/Nassau' - | 'America/New_York' - | 'America/Nipigon' - | 'America/Nome' - | 'America/Noronha' - | 'America/North_Dakota/Beulah' - | 'America/North_Dakota/Center' - | 'America/North_Dakota/New_Salem' - | 'America/Ojinaga' - | 'America/Panama' - | 'America/Pangnirtung' - | 'America/Paramaribo' - | 'America/Phoenix' - | 'America/Port-au-Prince' - | 'America/Port_of_Spain' - | 'America/Porto_Acre' - | 'America/Porto_Velho' - | 'America/Puerto_Rico' - | 'America/Punta_Arenas' - | 'America/Rainy_River' - | 'America/Rankin_Inlet' - | 'America/Recife' - | 'America/Regina' - | 'America/Resolute' - | 'America/Rio_Branco' - | 'America/Rosario' - | 'America/Santa_Isabel' - | 'America/Santarem' - | 'America/Santiago' - | 'America/Santo_Domingo' - | 'America/Sao_Paulo' - | 'America/Scoresbysund' - | 'America/Shiprock' - | 'America/Sitka' - | 'America/St_Barthelemy' - | 'America/St_Johns' - | 'America/St_Kitts' - | 'America/St_Lucia' - | 'America/St_Thomas' - | 'America/St_Vincent' - | 'America/Swift_Current' - | 'America/Tegucigalpa' - | 'America/Thule' - | 'America/Thunder_Bay' - | 'America/Tijuana' - | 'America/Toronto' - | 'America/Tortola' - | 'America/Vancouver' - | 'America/Virgin' - | 'America/Whitehorse' - | 'America/Winnipeg' - | 'America/Yakutat' - | 'America/Yellowknife' - | 'Antarctica/Casey' - | 'Antarctica/Davis' - | 'Antarctica/DumontDUrville' - | 'Antarctica/Macquarie' - | 'Antarctica/Mawson' - | 'Antarctica/McMurdo' - | 'Antarctica/Palmer' - | 'Antarctica/Rothera' - | 'Antarctica/South_Pole' - | 'Antarctica/Syowa' - | 'Antarctica/Troll' - | 'Antarctica/Vostok' - | 'Arctic/Longyearbyen' - | 'Asia/Aden' - | 'Asia/Almaty' - | 'Asia/Amman' - | 'Asia/Anadyr' - | 'Asia/Aqtau' - | 'Asia/Aqtobe' - | 'Asia/Ashgabat' - | 'Asia/Ashkhabad' - | 'Asia/Atyrau' - | 'Asia/Baghdad' - | 'Asia/Bahrain' - | 'Asia/Baku' - | 'Asia/Bangkok' - | 'Asia/Barnaul' - | 'Asia/Beirut' - | 'Asia/Bishkek' - | 'Asia/Brunei' - | 'Asia/Calcutta' - | 'Asia/Chita' - | 'Asia/Choibalsan' - | 'Asia/Chongqing' - | 'Asia/Chungking' - | 'Asia/Colombo' - | 'Asia/Dacca' - | 'Asia/Damascus' - | 'Asia/Dhaka' - | 'Asia/Dili' - | 'Asia/Dubai' - | 'Asia/Dushanbe' - | 'Asia/Famagusta' - | 'Asia/Gaza' - | 'Asia/Harbin' - | 'Asia/Hebron' - | 'Asia/Ho_Chi_Minh' - | 'Asia/Hong_Kong' - | 'Asia/Hovd' - | 'Asia/Irkutsk' - | 'Asia/Istanbul' - | 'Asia/Jakarta' - | 'Asia/Jayapura' - | 'Asia/Jerusalem' - | 'Asia/Kabul' - | 'Asia/Kamchatka' - | 'Asia/Karachi' - | 'Asia/Kashgar' - | 'Asia/Kathmandu' - | 'Asia/Katmandu' - | 'Asia/Khandyga' - | 'Asia/Kolkata' - | 'Asia/Krasnoyarsk' - | 'Asia/Kuala_Lumpur' - | 'Asia/Kuching' - | 'Asia/Kuwait' - | 'Asia/Macao' - | 'Asia/Macau' - | 'Asia/Magadan' - | 'Asia/Makassar' - | 'Asia/Manila' - | 'Asia/Muscat' - | 'Asia/Nicosia' - | 'Asia/Novokuznetsk' - | 'Asia/Novosibirsk' - | 'Asia/Omsk' - | 'Asia/Oral' - | 'Asia/Phnom_Penh' - | 'Asia/Pontianak' - | 'Asia/Pyongyang' - | 'Asia/Qatar' - | 'Asia/Qostanay' - | 'Asia/Qyzylorda' - | 'Asia/Rangoon' - | 'Asia/Riyadh' - | 'Asia/Saigon' - | 'Asia/Sakhalin' - | 'Asia/Samarkand' - | 'Asia/Seoul' - | 'Asia/Shanghai' - | 'Asia/Singapore' - | 'Asia/Srednekolymsk' - | 'Asia/Taipei' - | 'Asia/Tashkent' - | 'Asia/Tbilisi' - | 'Asia/Tehran' - | 'Asia/Tel_Aviv' - | 'Asia/Thimbu' - | 'Asia/Thimphu' - | 'Asia/Tokyo' - | 'Asia/Tomsk' - | 'Asia/Ujung_Pandang' - | 'Asia/Ulaanbaatar' - | 'Asia/Ulan_Bator' - | 'Asia/Urumqi' - | 'Asia/Ust-Nera' - | 'Asia/Vientiane' - | 'Asia/Vladivostok' - | 'Asia/Yakutsk' - | 'Asia/Yangon' - | 'Asia/Yekaterinburg' - | 'Asia/Yerevan' - | 'Atlantic/Azores' - | 'Atlantic/Bermuda' - | 'Atlantic/Canary' - | 'Atlantic/Cape_Verde' - | 'Atlantic/Faeroe' - | 'Atlantic/Faroe' - | 'Atlantic/Jan_Mayen' - | 'Atlantic/Madeira' - | 'Atlantic/Reykjavik' - | 'Atlantic/South_Georgia' - | 'Atlantic/St_Helena' - | 'Atlantic/Stanley' - | 'Australia/ACT' - | 'Australia/Adelaide' - | 'Australia/Brisbane' - | 'Australia/Broken_Hill' - | 'Australia/Canberra' - | 'Australia/Currie' - | 'Australia/Darwin' - | 'Australia/Eucla' - | 'Australia/Hobart' - | 'Australia/LHI' - | 'Australia/Lindeman' - | 'Australia/Lord_Howe' - | 'Australia/Melbourne' - | 'Australia/NSW' - | 'Australia/North' - | 'Australia/Perth' - | 'Australia/Queensland' - | 'Australia/South' - | 'Australia/Sydney' - | 'Australia/Tasmania' - | 'Australia/Victoria' - | 'Australia/West' - | 'Australia/Yancowinna' - | 'Brazil/Acre' - | 'Brazil/DeNoronha' - | 'Brazil/East' - | 'Brazil/West' - | 'CET' - | 'CST6CDT' - | 'Canada/Atlantic' - | 'Canada/Central' - | 'Canada/Eastern' - | 'Canada/Mountain' - | 'Canada/Newfoundland' - | 'Canada/Pacific' - | 'Canada/Saskatchewan' - | 'Canada/Yukon' - | 'Chile/Continental' - | 'Chile/EasterIsland' - | 'Cuba' - | 'EET' - | 'EST' - | 'EST5EDT' - | 'Egypt' - | 'Eire' - | 'Etc/GMT' - | 'Etc/GMT+0' - | 'Etc/GMT+1' - | 'Etc/GMT+10' - | 'Etc/GMT+11' - | 'Etc/GMT+12' - | 'Etc/GMT+2' - | 'Etc/GMT+3' - | 'Etc/GMT+4' - | 'Etc/GMT+5' - | 'Etc/GMT+6' - | 'Etc/GMT+7' - | 'Etc/GMT+8' - | 'Etc/GMT+9' - | 'Etc/GMT-0' - | 'Etc/GMT-1' - | 'Etc/GMT-10' - | 'Etc/GMT-11' - | 'Etc/GMT-12' - | 'Etc/GMT-13' - | 'Etc/GMT-14' - | 'Etc/GMT-2' - | 'Etc/GMT-3' - | 'Etc/GMT-4' - | 'Etc/GMT-5' - | 'Etc/GMT-6' - | 'Etc/GMT-7' - | 'Etc/GMT-8' - | 'Etc/GMT-9' - | 'Etc/GMT0' - | 'Etc/Greenwich' - | 'Etc/UCT' - | 'Etc/UTC' - | 'Etc/Universal' - | 'Etc/Zulu' - | 'Europe/Amsterdam' - | 'Europe/Andorra' - | 'Europe/Astrakhan' - | 'Europe/Athens' - | 'Europe/Belfast' - | 'Europe/Belgrade' - | 'Europe/Berlin' - | 'Europe/Bratislava' - | 'Europe/Brussels' - | 'Europe/Bucharest' - | 'Europe/Budapest' - | 'Europe/Busingen' - | 'Europe/Chisinau' - | 'Europe/Copenhagen' - | 'Europe/Dublin' - | 'Europe/Gibraltar' - | 'Europe/Guernsey' - | 'Europe/Helsinki' - | 'Europe/Isle_of_Man' - | 'Europe/Istanbul' - | 'Europe/Jersey' - | 'Europe/Kaliningrad' - | 'Europe/Kiev' - | 'Europe/Kirov' - | 'Europe/Lisbon' - | 'Europe/Ljubljana' - | 'Europe/London' - | 'Europe/Luxembourg' - | 'Europe/Madrid' - | 'Europe/Malta' - | 'Europe/Mariehamn' - | 'Europe/Minsk' - | 'Europe/Monaco' - | 'Europe/Moscow' - | 'Europe/Nicosia' - | 'Europe/Oslo' - | 'Europe/Paris' - | 'Europe/Podgorica' - | 'Europe/Prague' - | 'Europe/Riga' - | 'Europe/Rome' - | 'Europe/Samara' - | 'Europe/San_Marino' - | 'Europe/Sarajevo' - | 'Europe/Saratov' - | 'Europe/Simferopol' - | 'Europe/Skopje' - | 'Europe/Sofia' - | 'Europe/Stockholm' - | 'Europe/Tallinn' - | 'Europe/Tirane' - | 'Europe/Tiraspol' - | 'Europe/Ulyanovsk' - | 'Europe/Uzhgorod' - | 'Europe/Vaduz' - | 'Europe/Vatican' - | 'Europe/Vienna' - | 'Europe/Vilnius' - | 'Europe/Volgograd' - | 'Europe/Warsaw' - | 'Europe/Zagreb' - | 'Europe/Zaporozhye' - | 'Europe/Zurich' - | 'Factory' - | 'GB' - | 'GB-Eire' - | 'GMT' - | 'GMT+0' - | 'GMT-0' - | 'GMT0' - | 'Greenwich' - | 'HST' - | 'Hongkong' - | 'Iceland' - | 'Indian/Antananarivo' - | 'Indian/Chagos' - | 'Indian/Christmas' - | 'Indian/Cocos' - | 'Indian/Comoro' - | 'Indian/Kerguelen' - | 'Indian/Mahe' - | 'Indian/Maldives' - | 'Indian/Mauritius' - | 'Indian/Mayotte' - | 'Indian/Reunion' - | 'Iran' - | 'Israel' - | 'Jamaica' - | 'Japan' - | 'Kwajalein' - | 'Libya' - | 'MET' - | 'MST' - | 'MST7MDT' - | 'Mexico/BajaNorte' - | 'Mexico/BajaSur' - | 'Mexico/General' - | 'NZ' - | 'NZ-CHAT' - | 'Navajo' - | 'PRC' - | 'PST8PDT' - | 'Pacific/Apia' - | 'Pacific/Auckland' - | 'Pacific/Bougainville' - | 'Pacific/Chatham' - | 'Pacific/Chuuk' - | 'Pacific/Easter' - | 'Pacific/Efate' - | 'Pacific/Enderbury' - | 'Pacific/Fakaofo' - | 'Pacific/Fiji' - | 'Pacific/Funafuti' - | 'Pacific/Galapagos' - | 'Pacific/Gambier' - | 'Pacific/Guadalcanal' - | 'Pacific/Guam' - | 'Pacific/Honolulu' - | 'Pacific/Johnston' - | 'Pacific/Kiritimati' - | 'Pacific/Kosrae' - | 'Pacific/Kwajalein' - | 'Pacific/Majuro' - | 'Pacific/Marquesas' - | 'Pacific/Midway' - | 'Pacific/Nauru' - | 'Pacific/Niue' - | 'Pacific/Norfolk' - | 'Pacific/Noumea' - | 'Pacific/Pago_Pago' - | 'Pacific/Palau' - | 'Pacific/Pitcairn' - | 'Pacific/Pohnpei' - | 'Pacific/Ponape' - | 'Pacific/Port_Moresby' - | 'Pacific/Rarotonga' - | 'Pacific/Saipan' - | 'Pacific/Samoa' - | 'Pacific/Tahiti' - | 'Pacific/Tarawa' - | 'Pacific/Tongatapu' - | 'Pacific/Truk' - | 'Pacific/Wake' - | 'Pacific/Wallis' - | 'Pacific/Yap' - | 'Poland' - | 'Portugal' - | 'ROC' - | 'ROK' - | 'Singapore' - | 'Turkey' - | 'UCT' - | 'US/Alaska' - | 'US/Aleutian' - | 'US/Arizona' - | 'US/Central' - | 'US/East-Indiana' - | 'US/Eastern' - | 'US/Hawaii' - | 'US/Indiana-Starke' - | 'US/Michigan' - | 'US/Mountain' - | 'US/Pacific' - | 'US/Pacific-New' - | 'US/Samoa' - | 'UTC' - | 'Universal' - | 'W-SU' - | 'WET' - | 'Zulu' - } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string - } - } - } - } - /**

Retrieves the details of an existing Report Run.

*/ - GetReportingReportRunsReportRun: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - report_run: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['reporting.report_run'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a full list of Report Types.

*/ - GetReportingReportTypes: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['reporting.report_type'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - GetReportingReportTypesReportType: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - report_type: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['reporting.report_type'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ - GetReviews: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['review'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - review: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['review'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - PostReviewsReviewApprove: { - parameters: { - path: { - review: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['review'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - GetSetupAttempts: { - parameters: { - query: { - /** - * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a - * dictionary with a number of different query options. - */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** - * Only return SetupAttempts created by the SetupIntent specified by - * this ID. - */ - setup_intent: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['setup_attempt'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { - parameters: { - query: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return SetupIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return SetupIntents associated with the specified payment method. */ - payment_method?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a SetupIntent object.

- * - *

After the SetupIntent is created, attach a payment method and confirm - * to collect any required permissions to charge the payment method later.

- */ - PostSetupIntents: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: 'off_session' | 'on_session' - } - } - } - } - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - GetSetupIntentsIntent: { - parameters: { - query: { - /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ - client_secret?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - } - } - } - } - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - PostSetupIntentsIntentCancel: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Confirm that your customer intends to set up the current or - * provided payment method. For example, you would confirm a SetupIntent - * when a customer hits the “Save” button on a payment method management - * page on your website.

- * - *

If the selected payment method does not require any additional - * steps from the customer, the SetupIntent will transition to the - * succeeded status.

- * - *

Otherwise, it will transition to the requires_action status and - * suggest additional actions via next_action. If setup fails, - * the SetupIntent will transition to the - * requires_payment_method status.

- */ - PostSetupIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string - } - } - } - } - /**

Verifies microdeposits on a SetupIntent object.

*/ - PostSetupIntentsIntentVerifyMicrodeposits: { - parameters: { - path: { - intent: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['setup_intent'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of your shipping rates.

*/ - GetShippingRates: { - parameters: { - query: { - /** Only return shipping rates that are active or inactive. */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return shipping rates for the given currency. */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['shipping_rate'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new shipping rate object.

*/ - PostShippingRates: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['shipping_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number - currency: string - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: 'fixed_amount' - } - } - } - } - /**

Returns the shipping rate object with the given ID.

*/ - GetShippingRatesShippingRateToken: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - shipping_rate_token: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['shipping_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing shipping rate object.

*/ - PostShippingRatesShippingRateToken: { - parameters: { - path: { - shipping_rate_token: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['shipping_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an scheduled query run.

*/ - GetSigmaScheduledQueryRunsScheduledQueryRun: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - scheduled_query_run: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['scheduled_query_run'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - GetSkus: { - parameters: { - query: { - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ - attributes?: { [key: string]: string } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return SKUs with the given IDs. */ - ids?: string[] - /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ - in_stock?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['sku'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. - */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string - } - } - } - } - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - GetSkusId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

- */ - PostSkusId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['sku'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_update_specs - * @description Description of the SKU's inventory. - */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string - } - } - } - } - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - DeleteSkusId: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_sku'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new source object.

*/ - PostSources: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - metadata?: { [key: string]: string } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** @enum {string} */ - usage?: 'reusable' | 'single_use' - } - } - } - } - /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ - GetSourcesSource: { - parameters: { - query: { - /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ - client_secret?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

- */ - PostSourcesSource: { - parameters: { - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - amount?: number - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - } - } - } - } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - mandate_notification: string - source: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source_mandate_notification'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['source_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ - GetSourcesSourceSourceTransactionsSourceTransaction: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - source: string - source_transaction: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source_transaction'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { - parameters: { - path: { - source: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['source'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] - } - } - } - } - /**

Returns a list of your subscription items for a given subscription.

*/ - GetSubscriptionItems: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The ID of the subscription whose items will be retrieved. */ - subscription: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - PostSubscriptionItems: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' - } - } - } - } - /**

Retrieves the subscription item with the given ID.

*/ - GetSubscriptionItemsItem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the plan or quantity of an item on a current subscription.

*/ - PostSubscriptionItemsItem: { - parameters: { - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' - } - } - } - } - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - DeleteSubscriptionItemsItem: { - parameters: { - path: { - item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_subscription_item'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - } - } - } - } - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - subscription_item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

- * - *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

- * - *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

- * - *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

- */ - PostSubscriptionItemsSubscriptionItemUsageRecords: { - parameters: { - path: { - subscription_item: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['usage_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: 'now' | number - } - } - } - } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { - parameters: { - query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that have not started yet. */ - scheduled?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptionSchedules: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - /** Format: unix-time */ - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - trial?: boolean - /** Format: unix-time */ - trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: number | 'now' - } - } - } - } - /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ - GetSubscriptionSchedulesSchedule: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. - */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - end_date?: number | 'now' - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: number | 'now' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - trial?: boolean - trial_end?: number | 'now' - }[] - /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - } - } - } - } - /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ - PostSubscriptionSchedulesScheduleCancel: { - parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } - } - } - } - /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ - PostSubscriptionSchedulesScheduleRelease: { - parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } - } - } - } - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - GetSubscriptions: { - parameters: { - query: { - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - current_period_end?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - current_period_start?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter for subscriptions that contain this recurring price ID. */ - price?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ - PostSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | { - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - } - } - } - } - /** - *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

- * - *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

- * - *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

- */ - DeleteSubscriptionsSubscriptionExposedId: { - parameters: { - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean - } - } - } - } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { - parameters: { - path: { - subscription_exposed_id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_discount'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - GetTaxCodes: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['tax_code'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ - GetTaxCodesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_code'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ - GetTaxRates: { - parameters: { - query: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - active?: boolean - /** Optional range for filtering created date. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ - inclusive?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['tax_rate'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new tax rate.

*/ - PostTaxRates: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' - } - } - } - } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - tax_rate: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { - parameters: { - path: { - tax_rate: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['tax_rate'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' - } - } - } - } - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - PostTerminalConnectionTokens: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.connection_token'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string - } - } - } - } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['terminal.location'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - PostTerminalLocations: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.location'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - location: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.location'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalLocationsLocation: { - parameters: { - path: { - location: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.location'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { - parameters: { - path: { - location: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_terminal.location'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { - parameters: { - query: { - /** Filters readers by device type */ - device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A location ID to filter the response list to only readers at the specific location */ - location?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: 'offline' | 'online' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description A list of readers */ - data: components['schemas']['terminal.reader'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.reader'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. */ - location?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string - } - } - } - } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - reader: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalReadersReader: { - parameters: { - path: { - reader: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The new label of the reader. */ - label?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { - parameters: { - path: { - reader: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_terminal.reader'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Creates a single-use token that represents a bank account’s details. - * This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

- */ - PostTokens: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['token'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - ownership_declaration_shown_and_signed?: boolean - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. - */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - routing_number?: string - } - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - currency?: string - cvc?: string - exp_month: string - exp_year: string - name?: string - number: string - } - | string - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string - /** - * cvc_params - * @description The updated CVC value this token will represent. - */ - cvc_update?: { - cvc: string - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * person_token_specs - * @description Information for the person this token will represent. - */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - nationality?: string - phone?: string - political_exposure?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string - } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** - * pii_token_specs - * @description The PII this token will represent. - */ - pii?: { - id_number?: string - } - } - } - } - } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - token: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['token'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of top-ups.

*/ - GetTopups: { - parameters: { - query: { - /** A positive integer representing how much to transfer. */ - amount?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ - status?: 'canceled' | 'failed' | 'pending' | 'succeeded' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['topup'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Top up the balance of an account

*/ - PostTopups: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['topup'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ - statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string - } - } - } - } - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - GetTopupsTopup: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - topup: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['topup'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - PostTopupsTopup: { - parameters: { - path: { - topup: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['topup'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - PostTopupsTopupCancel: { - parameters: { - path: { - topup: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['topup'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ - GetTransfers: { - parameters: { - query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transfers for the destination specified by this account ID. */ - destination?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return transfers with the specified transfer group. */ - transfer_group?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['transfer'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.

*/ - PostTransfers: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } - } - } - } - /**

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

*/ - GetTransfersIdReversals: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

When you create a new reversal, you must specify a transfer to create it on.

- * - *

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

- * - *

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

- */ - PostTransfersIdReversals: { - parameters: { - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer_reversal'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } - } - } - } - /**

Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.

*/ - GetTransfersTransfer: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request accepts only metadata as an argument.

- */ - PostTransfersTransfer: { - parameters: { - path: { - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ - GetTransfersTransferReversalsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer_reversal'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

- * - *

This request only accepts metadata and description as arguments.

- */ - PostTransfersTransferReversalsId: { - parameters: { - path: { - id: string - transfer: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['transfer_reversal'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

Returns a list of your webhook endpoints.

*/ - GetWebhookEndpoints: { - parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['webhook_endpoint'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

*/ - PostWebhookEndpoints: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['webhook_endpoint'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * @description Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - * @enum {string} - */ - api_version?: - | '2011-01-01' - | '2011-06-21' - | '2011-06-28' - | '2011-08-01' - | '2011-09-15' - | '2011-11-17' - | '2012-02-23' - | '2012-03-25' - | '2012-06-18' - | '2012-06-28' - | '2012-07-09' - | '2012-09-24' - | '2012-10-26' - | '2012-11-07' - | '2013-02-11' - | '2013-02-13' - | '2013-07-05' - | '2013-08-12' - | '2013-08-13' - | '2013-10-29' - | '2013-12-03' - | '2014-01-31' - | '2014-03-13' - | '2014-03-28' - | '2014-05-19' - | '2014-06-13' - | '2014-06-17' - | '2014-07-22' - | '2014-07-26' - | '2014-08-04' - | '2014-08-20' - | '2014-09-08' - | '2014-10-07' - | '2014-11-05' - | '2014-11-20' - | '2014-12-08' - | '2014-12-17' - | '2014-12-22' - | '2015-01-11' - | '2015-01-26' - | '2015-02-10' - | '2015-02-16' - | '2015-02-18' - | '2015-03-24' - | '2015-04-07' - | '2015-06-15' - | '2015-07-07' - | '2015-07-13' - | '2015-07-28' - | '2015-08-07' - | '2015-08-19' - | '2015-09-03' - | '2015-09-08' - | '2015-09-23' - | '2015-10-01' - | '2015-10-12' - | '2015-10-16' - | '2016-02-03' - | '2016-02-19' - | '2016-02-22' - | '2016-02-23' - | '2016-02-29' - | '2016-03-07' - | '2016-06-15' - | '2016-07-06' - | '2016-10-19' - | '2017-01-27' - | '2017-02-14' - | '2017-04-06' - | '2017-05-25' - | '2017-06-05' - | '2017-08-15' - | '2017-12-14' - | '2018-01-23' - | '2018-02-05' - | '2018-02-06' - | '2018-02-28' - | '2018-05-21' - | '2018-07-27' - | '2018-08-23' - | '2018-09-06' - | '2018-09-24' - | '2018-10-31' - | '2018-11-08' - | '2019-02-11' - | '2019-02-19' - | '2019-03-14' - | '2019-05-16' - | '2019-08-14' - | '2019-09-09' - | '2019-10-08' - | '2019-10-17' - | '2019-11-05' - | '2019-12-03' - | '2020-03-02' - | '2020-08-27' - /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ - connect?: boolean - /** @description An optional description of what the webhook is used for. */ - description?: string - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events: ( - | '*' - | 'account.application.authorized' - | 'account.application.deauthorized' - | 'account.external_account.created' - | 'account.external_account.deleted' - | 'account.external_account.updated' - | 'account.updated' - | 'application_fee.created' - | 'application_fee.refund.updated' - | 'application_fee.refunded' - | 'balance.available' - | 'billing_portal.configuration.created' - | 'billing_portal.configuration.updated' - | 'capability.updated' - | 'charge.captured' - | 'charge.dispute.closed' - | 'charge.dispute.created' - | 'charge.dispute.funds_reinstated' - | 'charge.dispute.funds_withdrawn' - | 'charge.dispute.updated' - | 'charge.expired' - | 'charge.failed' - | 'charge.pending' - | 'charge.refund.updated' - | 'charge.refunded' - | 'charge.succeeded' - | 'charge.updated' - | 'checkout.session.async_payment_failed' - | 'checkout.session.async_payment_succeeded' - | 'checkout.session.completed' - | 'checkout.session.expired' - | 'coupon.created' - | 'coupon.deleted' - | 'coupon.updated' - | 'credit_note.created' - | 'credit_note.updated' - | 'credit_note.voided' - | 'customer.created' - | 'customer.deleted' - | 'customer.discount.created' - | 'customer.discount.deleted' - | 'customer.discount.updated' - | 'customer.source.created' - | 'customer.source.deleted' - | 'customer.source.expiring' - | 'customer.source.updated' - | 'customer.subscription.created' - | 'customer.subscription.deleted' - | 'customer.subscription.pending_update_applied' - | 'customer.subscription.pending_update_expired' - | 'customer.subscription.trial_will_end' - | 'customer.subscription.updated' - | 'customer.tax_id.created' - | 'customer.tax_id.deleted' - | 'customer.tax_id.updated' - | 'customer.updated' - | 'file.created' - | 'identity.verification_session.canceled' - | 'identity.verification_session.created' - | 'identity.verification_session.processing' - | 'identity.verification_session.redacted' - | 'identity.verification_session.requires_input' - | 'identity.verification_session.verified' - | 'invoice.created' - | 'invoice.deleted' - | 'invoice.finalization_failed' - | 'invoice.finalized' - | 'invoice.marked_uncollectible' - | 'invoice.paid' - | 'invoice.payment_action_required' - | 'invoice.payment_failed' - | 'invoice.payment_succeeded' - | 'invoice.sent' - | 'invoice.upcoming' - | 'invoice.updated' - | 'invoice.voided' - | 'invoiceitem.created' - | 'invoiceitem.deleted' - | 'invoiceitem.updated' - | 'issuing_authorization.created' - | 'issuing_authorization.request' - | 'issuing_authorization.updated' - | 'issuing_card.created' - | 'issuing_card.updated' - | 'issuing_cardholder.created' - | 'issuing_cardholder.updated' - | 'issuing_dispute.closed' - | 'issuing_dispute.created' - | 'issuing_dispute.funds_reinstated' - | 'issuing_dispute.submitted' - | 'issuing_dispute.updated' - | 'issuing_transaction.created' - | 'issuing_transaction.updated' - | 'mandate.updated' - | 'order.created' - | 'order.payment_failed' - | 'order.payment_succeeded' - | 'order.updated' - | 'order_return.created' - | 'payment_intent.amount_capturable_updated' - | 'payment_intent.canceled' - | 'payment_intent.created' - | 'payment_intent.payment_failed' - | 'payment_intent.processing' - | 'payment_intent.requires_action' - | 'payment_intent.succeeded' - | 'payment_link.created' - | 'payment_link.updated' - | 'payment_method.attached' - | 'payment_method.automatically_updated' - | 'payment_method.detached' - | 'payment_method.updated' - | 'payout.canceled' - | 'payout.created' - | 'payout.failed' - | 'payout.paid' - | 'payout.updated' - | 'person.created' - | 'person.deleted' - | 'person.updated' - | 'plan.created' - | 'plan.deleted' - | 'plan.updated' - | 'price.created' - | 'price.deleted' - | 'price.updated' - | 'product.created' - | 'product.deleted' - | 'product.updated' - | 'promotion_code.created' - | 'promotion_code.updated' - | 'quote.accepted' - | 'quote.canceled' - | 'quote.created' - | 'quote.finalized' - | 'radar.early_fraud_warning.created' - | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' - | 'reporting.report_run.failed' - | 'reporting.report_run.succeeded' - | 'reporting.report_type.updated' - | 'review.closed' - | 'review.opened' - | 'setup_intent.canceled' - | 'setup_intent.created' - | 'setup_intent.requires_action' - | 'setup_intent.setup_failed' - | 'setup_intent.succeeded' - | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' - | 'source.canceled' - | 'source.chargeable' - | 'source.failed' - | 'source.mandate_notification' - | 'source.refund_attributes_required' - | 'source.transaction.created' - | 'source.transaction.updated' - | 'subscription_schedule.aborted' - | 'subscription_schedule.canceled' - | 'subscription_schedule.completed' - | 'subscription_schedule.created' - | 'subscription_schedule.expiring' - | 'subscription_schedule.released' - | 'subscription_schedule.updated' - | 'tax_rate.created' - | 'tax_rate.updated' - | 'topup.canceled' - | 'topup.created' - | 'topup.failed' - | 'topup.reversed' - | 'topup.succeeded' - | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' - | 'transfer.reversed' - | 'transfer.updated' - )[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The URL of the webhook endpoint. */ - url: string - } - } - } - } - /**

Retrieves the webhook endpoint with the given ID.

*/ - GetWebhookEndpointsWebhookEndpoint: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - webhook_endpoint: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['webhook_endpoint'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

*/ - PostWebhookEndpointsWebhookEndpoint: { - parameters: { - path: { - webhook_endpoint: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['webhook_endpoint'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description An optional description of what the webhook is used for. */ - description?: string - /** @description Disable the webhook endpoint if set to true. */ - disabled?: boolean - /** @description The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. */ - enabled_events?: ( - | '*' - | 'account.application.authorized' - | 'account.application.deauthorized' - | 'account.external_account.created' - | 'account.external_account.deleted' - | 'account.external_account.updated' - | 'account.updated' - | 'application_fee.created' - | 'application_fee.refund.updated' - | 'application_fee.refunded' - | 'balance.available' - | 'billing_portal.configuration.created' - | 'billing_portal.configuration.updated' - | 'capability.updated' - | 'charge.captured' - | 'charge.dispute.closed' - | 'charge.dispute.created' - | 'charge.dispute.funds_reinstated' - | 'charge.dispute.funds_withdrawn' - | 'charge.dispute.updated' - | 'charge.expired' - | 'charge.failed' - | 'charge.pending' - | 'charge.refund.updated' - | 'charge.refunded' - | 'charge.succeeded' - | 'charge.updated' - | 'checkout.session.async_payment_failed' - | 'checkout.session.async_payment_succeeded' - | 'checkout.session.completed' - | 'checkout.session.expired' - | 'coupon.created' - | 'coupon.deleted' - | 'coupon.updated' - | 'credit_note.created' - | 'credit_note.updated' - | 'credit_note.voided' - | 'customer.created' - | 'customer.deleted' - | 'customer.discount.created' - | 'customer.discount.deleted' - | 'customer.discount.updated' - | 'customer.source.created' - | 'customer.source.deleted' - | 'customer.source.expiring' - | 'customer.source.updated' - | 'customer.subscription.created' - | 'customer.subscription.deleted' - | 'customer.subscription.pending_update_applied' - | 'customer.subscription.pending_update_expired' - | 'customer.subscription.trial_will_end' - | 'customer.subscription.updated' - | 'customer.tax_id.created' - | 'customer.tax_id.deleted' - | 'customer.tax_id.updated' - | 'customer.updated' - | 'file.created' - | 'identity.verification_session.canceled' - | 'identity.verification_session.created' - | 'identity.verification_session.processing' - | 'identity.verification_session.redacted' - | 'identity.verification_session.requires_input' - | 'identity.verification_session.verified' - | 'invoice.created' - | 'invoice.deleted' - | 'invoice.finalization_failed' - | 'invoice.finalized' - | 'invoice.marked_uncollectible' - | 'invoice.paid' - | 'invoice.payment_action_required' - | 'invoice.payment_failed' - | 'invoice.payment_succeeded' - | 'invoice.sent' - | 'invoice.upcoming' - | 'invoice.updated' - | 'invoice.voided' - | 'invoiceitem.created' - | 'invoiceitem.deleted' - | 'invoiceitem.updated' - | 'issuing_authorization.created' - | 'issuing_authorization.request' - | 'issuing_authorization.updated' - | 'issuing_card.created' - | 'issuing_card.updated' - | 'issuing_cardholder.created' - | 'issuing_cardholder.updated' - | 'issuing_dispute.closed' - | 'issuing_dispute.created' - | 'issuing_dispute.funds_reinstated' - | 'issuing_dispute.submitted' - | 'issuing_dispute.updated' - | 'issuing_transaction.created' - | 'issuing_transaction.updated' - | 'mandate.updated' - | 'order.created' - | 'order.payment_failed' - | 'order.payment_succeeded' - | 'order.updated' - | 'order_return.created' - | 'payment_intent.amount_capturable_updated' - | 'payment_intent.canceled' - | 'payment_intent.created' - | 'payment_intent.payment_failed' - | 'payment_intent.processing' - | 'payment_intent.requires_action' - | 'payment_intent.succeeded' - | 'payment_link.created' - | 'payment_link.updated' - | 'payment_method.attached' - | 'payment_method.automatically_updated' - | 'payment_method.detached' - | 'payment_method.updated' - | 'payout.canceled' - | 'payout.created' - | 'payout.failed' - | 'payout.paid' - | 'payout.updated' - | 'person.created' - | 'person.deleted' - | 'person.updated' - | 'plan.created' - | 'plan.deleted' - | 'plan.updated' - | 'price.created' - | 'price.deleted' - | 'price.updated' - | 'product.created' - | 'product.deleted' - | 'product.updated' - | 'promotion_code.created' - | 'promotion_code.updated' - | 'quote.accepted' - | 'quote.canceled' - | 'quote.created' - | 'quote.finalized' - | 'radar.early_fraud_warning.created' - | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' - | 'reporting.report_run.failed' - | 'reporting.report_run.succeeded' - | 'reporting.report_type.updated' - | 'review.closed' - | 'review.opened' - | 'setup_intent.canceled' - | 'setup_intent.created' - | 'setup_intent.requires_action' - | 'setup_intent.setup_failed' - | 'setup_intent.succeeded' - | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' - | 'source.canceled' - | 'source.chargeable' - | 'source.failed' - | 'source.mandate_notification' - | 'source.refund_attributes_required' - | 'source.transaction.created' - | 'source.transaction.updated' - | 'subscription_schedule.aborted' - | 'subscription_schedule.canceled' - | 'subscription_schedule.completed' - | 'subscription_schedule.created' - | 'subscription_schedule.expiring' - | 'subscription_schedule.released' - | 'subscription_schedule.updated' - | 'tax_rate.created' - | 'tax_rate.updated' - | 'topup.canceled' - | 'topup.created' - | 'topup.failed' - | 'topup.reversed' - | 'topup.succeeded' - | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' - | 'transfer.reversed' - | 'transfer.updated' - )[] - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The URL of the webhook endpoint. */ - url?: string - } - } - } - } - /**

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

*/ - DeleteWebhookEndpointsWebhookEndpoint: { - parameters: { - path: { - webhook_endpoint: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_webhook_endpoint'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } -} - -export interface external {} diff --git a/test/v3/index.test.js b/test/v3/index.test.js index efa5e9cac..bf7fc8b30 100644 --- a/test/v3/index.test.js +++ b/test/v3/index.test.js @@ -71,17 +71,6 @@ describe("cli", () => { const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); expect(generated).to.equal(expected); }); - - it(`reads ${schema} spec (v3) from file (alphabetize)`, async () => { - const filename = schema.replace(/\.(json|yaml)/, ".alphabetized.ts"); - - execSync(`${cmd} specs/${schema} -o generated/${filename} --prettier-config fixtures/.prettierrc --alphabetize`, { - cwd, - }); - const generated = fs.readFileSync(new URL(`./generated/${filename}`, cwd), "utf8"); - const expected = eol.lf(fs.readFileSync(new URL(`./expected/${filename}`, cwd), "utf8")); - expect(generated).to.equal(expected); - }); }); it("reads spec (v3) from remote resource", async () => { From dfc005d60a7a30ab63d3fcab1d706f13a91dd764 Mon Sep 17 00:00:00 2001 From: Jeremy Liberman Date: Sun, 9 Oct 2022 11:01:51 -0500 Subject: [PATCH 5/5] Add test for alphabetized operations and clean up operation tests --- test/core/operation.test.js | 33 ++++++++++++++++++++------------- test/core/paths.test.js | 26 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/test/core/operation.test.js b/test/core/operation.test.js index 4b309342c..2ab105f9c 100644 --- a/test/core/operation.test.js +++ b/test/core/operation.test.js @@ -188,9 +188,9 @@ describe("parameters", () => { }`); }); - describe("with alphabetize", () => { - function createOperationTransform(schema) { - return transformOperationObj(schema, { + describe("alphabetize", () => { + function assertSchema(actual, expected) { + const result = transformOperationObj(actual, { ...defaults, alphabetize: true, version: 3, @@ -213,10 +213,11 @@ describe("parameters", () => { ], }, }); + expect(result.trim()).to.equal(expected.trim()); } - it("sorts content types", () => { - const actual = createOperationTransform({ + it("content types", () => { + const actual = { requestBody: { content: { "font/woff2": { @@ -236,8 +237,9 @@ describe("parameters", () => { }, }, }, - }); - expect(actual.trim()).to.equal(`parameters: { + }; + + const expected = `parameters: { path: { "p2"?: string; "p3"?: string; @@ -252,11 +254,13 @@ describe("parameters", () => { "font/woff": string; "font/woff2": string; } - }`); + }`; + + assertSchema(actual, expected); }); - it("sorts operation parameters", () => { - const actual = createOperationTransform({ + it("operation parameters", () => { + const actual = { parameters: [ { in: "path", @@ -273,15 +277,18 @@ describe("parameters", () => { }, }, ], - }); - expect(actual.trim()).to.equal(`parameters: { + }; + + const expected = `parameters: { path: { "p1"?: string; "p2"?: number; "p3"?: string; } - }`); + }`; + + assertSchema(actual, expected); }); }); }); diff --git a/test/core/paths.test.js b/test/core/paths.test.js index d5676d5e7..4787eb854 100644 --- a/test/core/paths.test.js +++ b/test/core/paths.test.js @@ -535,6 +535,32 @@ describe("transformPathsObj", () => { expect(result).to.equal(format(expected)); } + it("operations", () => { + const actual = { + "/pies": { get: {} }, + "/cakes": { get: {} }, + "/donuts": { get: {} }, + "/cookies": { get: {} }, + }; + + const expected = ` + "/cakes": { + get: {}; + }; + "/cookies": { + get: {}; + }; + "/donuts": { + get: {}; + }; + "/pies": { + get: {}; + }; +`; + + assertSchema(actual, expected); + }); + it("parameters", () => { const actual = { "/contact": {